postman-collection icon indicating copy to clipboard operation
postman-collection copied to clipboard

Update variable description on upsert

Open csk1827 opened this issue 4 years ago • 4 comments

Fixes #740

Issue

Variable description is not updating on upsert.

const list = new VariableList(null, [{
    key: 'k1',
    value: 'initial',
    description: 'initial description'
}]);

list.upsert({
    key: 'k1',
    value: 'updated',
    description: 'updated description'
});

list.toJSON();
// [{
//     description: {
//         content: 'initial description',
//         type: 'text/plain'
//     },
//     type: 'any',
//     value: 'updated',
//     key: 'k1'
// }]

Fix

Update description also on variable upsert.

Validation

Changes validated locally.

csk1827 avatar Mar 10 '20 17:03 csk1827

@codenirvana @shamasis please review the PR

csk1827 avatar Mar 10 '20 17:03 csk1827

Codecov Report

Merging #998 into develop will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #998   +/-   ##
========================================
  Coverage    96.87%   96.88%           
========================================
  Files           39       39           
  Lines         2369     2372    +3     
  Branches       703      704    +1     
========================================
+ Hits          2295     2298    +3     
  Misses          74       74           
Flag Coverage Δ
#unit 96.88% <100.00%> (+<0.01%) :arrow_up:
Impacted Files Coverage Δ
lib/collection/variable.js 96.73% <100.00%> (+0.10%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1630c09...cab1dbe. Read the comment docs.

codecov[bot] avatar Mar 10 '20 19:03 codecov[bot]

@codenirvana added the unit tests for the changes made

csk1827 avatar Mar 14 '20 10:03 csk1827

deferring because the same issue is present in other Property.

codenirvana avatar May 11 '20 08:05 codenirvana

Closing in favor of #1332

codenirvana avatar Sep 11 '23 12:09 codenirvana