Skip to content

Commit

Permalink
[BREAKING] chore: rename goodstore dataset to b2c lifestyle (#628)
Browse files Browse the repository at this point in the history
* chore: rename goodstore dataset to b2c lifestyle

* chore: changeset
  • Loading branch information
stephsprinkle authored Aug 8, 2024
1 parent 6008d5e commit 5e4d863
Show file tree
Hide file tree
Showing 975 changed files with 5,464 additions and 5,374 deletions.
27 changes: 27 additions & 0 deletions .changeset/gold-suits-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@commercetools-test-data/product-discount': major
'@commercetools-test-data/inventory-entry': major
'@commercetools-test-data/shipping-method': major
'@commercetools-test-data/cart-discount': major
'@commercetools-test-data/discount-code': major
'@commercetools-test-data/product-type': major
'@commercetools-test-data/tax-category': major
'@commercetools-test-data/category': major
'@commercetools-test-data/customer': major
'@commercetools-test-data/channel': major
'@commercetools-test-data/commons': major
'@commercetools-test-data/payment': major
'@commercetools-test-data/product': major
'@commercetools-test-data/order': major
'@commercetools-test-data/store': major
'@commercetools-test-data/cart': major
'@commercetools-test-data/zone': major
---

Renamed GoodStore dataset to B2C Lifestyle to support Foundry.

This breaking change updates the export method for GoodStore, now B2C Lifestyle, presets. Presets that use this dataset are also updated.

Updating this package will require changes in your codebase. To migrate:

- Replace any instance of `<Entity>.presets.sampleDataGoodStore.<preset-name>()` with `<Entity>.presets.sampleDataB2CLifestyle.<preset-name>()`
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,18 @@ const author2 = Author.random().firstName('Rebecca').buildGraphql<TAuthor>();

## Presets Folder

For organization & ownership purposes, Pangolin & FCT house their presets under their respective folders (e.g. change-history-data, sample-data-fashion, sample-data-goodstore). These should not be altered by an external team; however, if modifications occur for any reason, a corresponding team review is mandatory.
For organization & ownership purposes, Pangolin & FCT house their presets under their respective folders (e.g. change-history-data, sample-data-fashion, sample-data-b2c-lifestyle). These should not be altered by an external team; however, if modifications occur for any reason, a corresponding team review is mandatory.

## FAQ

#### whose review is mandatory for creating PR?

For pull requests concerning your team's specific presets, only your team's approval is required. If modifications are made to the models, inviting representatives from other teams for review is mandatory.

#### Can I simply copy/paste existing test model from other repository (eg: mc-frontend) to test-data?

Avoid directly copying and pasting from other repository models, as it may complicate cleanup efforts. While specific sections like generator fields and portions of specs may be copied over as is, be mindful that the overall structure and composition may differ significantly from your current setup.

#### Is there a easy way to know which models are already available?

No, there is no overarching inventory page at this time that outlines each package with its corresponding models.
Expand All @@ -59,6 +61,6 @@ Another trick that we typically do is to add the new models locally in a separat

#### What is the procedure after merging the PR?

For merged pull requests, there is no set schedule for releasing version packages (VP). To date it has simply depended on the traffic and urgency at that point in time.
If you need a version released quickly, you are more than welcome to ping the #test-data-migration channel to see if there are any objections to doing so.
For merged pull requests, there is no set schedule for releasing version packages (VP). To date it has simply depended on the traffic and urgency at that point in time.
If you need a version released quickly, you are more than welcome to ping the #test-data-migration channel to see if there are any objections to doing so.
Once the VP is released, it is immediately accessible. You have the option to either wait for dependency updates to process (e.g [update all test-data packages to v6.10.0](https://github.com/commercetools/merchant-center-frontend/pull/16069)), or updating them manually.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import empty from './empty';
import sampleDataB2B from './sample-data-b2b';
import sampleDataB2CLifestyle from './sample-data-b2c-lifestyle';
import sampleDataFashion from './sample-data-fashion';
import sampleDataGoodStore from './sample-data-goodstore';

const presets = {
empty,
sampleDataB2B,
sampleDataB2CLifestyle,
sampleDataFashion,
sampleDataGoodStore,
};

export default presets;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { stackingMode } from '../../../constants';
import type { TCartDiscountDraftBuilder } from '../../../types';
import * as CartDiscountDraft from '../../index';

const productTypeDraft = ProductTypeDraft.presets.sampleDataGoodStore
const productTypeDraft = ProductTypeDraft.presets.sampleDataB2CLifestyle
.furnitureAndDecor()
.build<TProductTypeDraft>();

Expand All @@ -38,12 +38,12 @@ const furnitureBogo = (): TCartDiscountDraftBuilder =>
.description(
LocalizedStringDraft.presets
.empty()
['en-US'](
'Two for one on all furniture items (discount on the cheapest item)'
)
['en-GB'](
'Two for one on all furniture items (discount on the cheapest item)'
)
[
'en-US'
]('Two for one on all furniture items (discount on the cheapest item)')
[
'en-GB'
]('Two for one on all furniture items (discount on the cheapest item)')
)
.stackingMode(stackingMode.Stacking)
.isActive(true)
Expand Down
4 changes: 2 additions & 2 deletions models/cart/src/cart/cart-draft/presets/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import changeHistoryData from './change-history-data';
import empty from './empty';
import sampleDataB2B from './sample-data-b2b';
import sampleDataB2CLifestyle from './sample-data-b2c-lifestyle';
import sampleDataFashion from './sample-data-fashion';
import sampleDataGoodStore from './sample-data-goodstore';

const presets = {
changeHistoryData,
empty,
sampleDataB2B,
sampleDataB2CLifestyle,
sampleDataFashion,
sampleDataGoodStore,
};

export default presets;
Loading

0 comments on commit 5e4d863

Please sign in to comment.