Skip to content

Commit 4f8ea39

Browse files
fix: fix typo documentation will be updated (#1871)
* fix: fix typo documentation will be updated * fix: patch description * chore: remove change set five jeans --------- Co-authored-by: Mario Arriola <mario.arriola@commercetools.com>
1 parent 3fcc766 commit 4f8ea39

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

.changeset/giant-socks-provide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@commercetools/sync-actions': patch
3+
---
4+
5+
rollback setPriceTiers name change

packages/sync-actions/src/prices-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const baseActionsList = [
44
{ action: 'changeValue', key: 'value' },
55
{ action: 'setDiscountedPrice', key: 'discounted' },
66
// TODO: Later add more accurate actions `addPriceTier`, `removePriceTier`
7-
{ action: 'setPriceTier', key: 'tiers' },
7+
{ action: 'setPriceTiers', key: 'tiers' },
88
{ action: 'setKey', key: 'key' },
99
{ action: 'setValidFrom', key: 'validFrom' },
1010
{ action: 'setValidUntil', key: 'validUntil' },

packages/sync-actions/test/price-sync.spec.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ describe('price actions', () => {
230230
})
231231
})
232232

233-
describe('setPriceTier', () => {
234-
test('should build `setPriceTier` action if price tier are set', () => {
233+
describe('setPriceTiers', () => {
234+
test('should build `setPriceTiers` action if price tier are set', () => {
235235
const before = {}
236236
const now = {
237237
id: '9fe6610f',
@@ -265,7 +265,7 @@ describe('price actions', () => {
265265
},
266266
},
267267
{
268-
action: 'setPriceTier',
268+
action: 'setPriceTiers',
269269
tiers: [
270270
{
271271
minimumQuantity: 5,
@@ -281,7 +281,7 @@ describe('price actions', () => {
281281
])
282282
})
283283

284-
test('should build `setPriceTier` action for price tier change', () => {
284+
test('should build `setPriceTiers` action for price tier change', () => {
285285
const before = {
286286
id: '9fe6610f',
287287
value: {
@@ -325,7 +325,7 @@ describe('price actions', () => {
325325
const actions = pricesSync.buildActions(now, before)
326326
expect(actions).toEqual([
327327
{
328-
action: 'setPriceTier',
328+
action: 'setPriceTiers',
329329
tiers: [
330330
{
331331
minimumQuantity: 5,
@@ -341,7 +341,7 @@ describe('price actions', () => {
341341
])
342342
})
343343

344-
test('should build `setPriceTier` action for removed price tier', () => {
344+
test('should build `setPriceTiers` action for removed price tier', () => {
345345
const before = {
346346
id: '9fe6610f',
347347
value: {
@@ -396,7 +396,7 @@ describe('price actions', () => {
396396
const actions = pricesSync.buildActions(now, before)
397397
expect(actions).toEqual([
398398
{
399-
action: 'setPriceTier',
399+
action: 'setPriceTiers',
400400
tiers: [
401401
{
402402
minimumQuantity: 5,
@@ -412,7 +412,7 @@ describe('price actions', () => {
412412
])
413413
})
414414

415-
test('should build `setPriceTier` action when removed all price tier', () => {
415+
test('should build `setPriceTiers` action when removed all price tier', () => {
416416
const before = {
417417
id: '9fe6610f',
418418
value: {
@@ -457,13 +457,13 @@ describe('price actions', () => {
457457
const actions = pricesSync.buildActions(now, before)
458458
expect(actions).toEqual([
459459
{
460-
action: 'setPriceTier',
460+
action: 'setPriceTiers',
461461
tiers: undefined,
462462
},
463463
])
464464
})
465465

466-
test('should not build `setPriceTier` action when price tiers on now and then are equal', () => {
466+
test('should not build `setPriceTiers` action when price tiers on now and then are equal', () => {
467467
const before = {
468468
id: '9fe6610f',
469469
value: {

0 commit comments

Comments
 (0)