Skip to content

Commit

Permalink
LPD-33868 Test case for FDSAPIURLResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
gianmarcobrunialti committed Aug 16, 2024
1 parent eb1eadb commit 7fe2ca8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const test = mergeTests(
dataSetManagerApiHelpersTest,
dataSetsPageTest,
featureFlagsTest({
'LPD-25230': true,
'LPS-164563': true,
}),
loginTest(),
Expand All @@ -31,6 +32,13 @@ const blogPostsDataSetConfig = {
restSchema: 'BlogPosting',
};

const cartDataSetConfig = {
name: 'Carts',
restApplication: '/headless-commerce-delivery-cart/v1.0',
restEndpoint: '/v1.0/channels/{channelId}/account/{accountId}/carts',
restSchema: 'Cart',
};

const catalogsDataSetConfig = {
name: 'Catalog',
restApplication: '/headless-commerce-admin-catalog/v1.0',
Expand Down Expand Up @@ -200,6 +208,26 @@ test('Create parameterized data set via UI', async ({dataSetsPage, page}) => {
});
});

test(
'Create parameterized data set with resolved parameters via UI',
{tag: '@LPD-25230'},
async ({dataSetsPage, page}) => {
await test.step('Create Data Set', async () => {
await dataSetsPage.goto();
await dataSetsPage.createDataSet(cartDataSetConfig);
});

await assertTableColumnLabels(page);

await assertTableCellContent({dataSetConfig: cartDataSetConfig, page});

await assertTableActionLabels(page);

await test.step('Delete Data Set', async () => {
await dataSetsPage.deleteDataSet(cartDataSetConfig.name);
});
})

test('Create data set via API', async ({
dataSetManagerApiHelpers,
dataSetsPage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ const adminUserDataSetConfig = {
restSchema: 'Role',
};

const cartDataSetConfig = {
erc: getRandomString(),
label: getRandomString(),
restApplication: '/headless-commerce-delivery-cart/v1.0',
restEndpoint: '/v1.0/channels/{channelId}/account/{accountId}/carts',
restSchema: 'Cart',
};

const structuredContentDataSetConfig = {
erc: getRandomString(),
label: getRandomString(),
Expand Down

0 comments on commit 7fe2ca8

Please sign in to comment.