Skip to content

Commit

Permalink
LPD-17814 Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
smottal authored and brianchandotcom committed Feb 29, 2024
1 parent 556875a commit a3f33a4
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 33 deletions.
30 changes: 15 additions & 15 deletions modules/test/playwright/fixtures/commercePagesTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import {CommerceAdminChannelDetailsPage} from '../pages/commerce/commerceAdminCh
import {CommerceAdminChannelsPage} from '../pages/commerce/commerceAdminChannelsPage';
import {CommerceAdminOrderDetailsPage} from '../pages/commerce/commerceAdminOrderDetailsPage';
import {CommerceAdminOrdersPage} from '../pages/commerce/commerceAdminOrdersPage';
import {CommerceAdminProductDetailsPage} from '../pages/commerce/commerceAdminProductDetailsPage';
import {CommerceAdminProductDetailsProductRelationsPage} from '../pages/commerce/commerceAdminProductDetailsProductRelationsPage';
import {CommerceAdminProductPage} from '../pages/commerce/commerceAdminProductPage';
import {CommerceLayoutsPage} from '../pages/commerce/commerceLayoutsPage';
import {CommerceMiniCartPage} from '../pages/commerce/commerceMiniCartPage';
import {CommerceProductAdminDetailsPage} from '../pages/commerce/commerceProductAdminDetailsPage';
import {CommerceProductAdminDetailsProductRelationsPage} from '../pages/commerce/commerceProductAdminDetailsProductRelationsPage';
import {CommerceProductAdminPage} from '../pages/commerce/commerceProductAdminPage';

const commercePagesTest = test.extend<{
attachmentsPage: AttachmentsPage;
Expand All @@ -28,11 +28,11 @@ const commercePagesTest = test.extend<{
commerceAdminChannelsPage: CommerceAdminChannelsPage;
commerceAdminOrderDetailsPage: CommerceAdminOrderDetailsPage;
commerceAdminOrdersPage: CommerceAdminOrdersPage;
commerceAdminProductDetailsPage: CommerceAdminProductDetailsPage;
commerceAdminProductDetailsProductRelationsPage: CommerceAdminProductDetailsProductRelationsPage;
commerceAdminProductPage: CommerceAdminProductPage;
commerceLayoutsPage: CommerceLayoutsPage;
commerceMiniCartPage: CommerceMiniCartPage;
commerceProductAdminDetailsPage: CommerceProductAdminDetailsPage;
commerceProductAdminDetailsProductRelationsPage: CommerceProductAdminDetailsProductRelationsPage;
commerceProductAdminPage: CommerceProductAdminPage;
pendingOrdersPage: PendingOrdersPage;
specificationFacetsPage: SpecificationFacetsPage;
}>({
Expand All @@ -54,21 +54,21 @@ const commercePagesTest = test.extend<{
commerceAdminOrdersPage: async ({page}, use) => {
await use(new CommerceAdminOrdersPage(page));
},
commerceAdminProductDetailsPage: async ({page}, use) => {
await use(new CommerceAdminProductDetailsPage(page));
},
commerceAdminProductDetailsProductRelationsPage: async ({page}, use) => {
await use(new CommerceAdminProductDetailsProductRelationsPage(page));
},
commerceAdminProductPage: async ({page}, use) => {
await use(new CommerceAdminProductPage(page));
},
commerceLayoutsPage: async ({page}, use) => {
await use(new CommerceLayoutsPage(page));
},
commerceMiniCartPage: async ({page}, use) => {
await use(new CommerceMiniCartPage(page));
},
commerceProductAdminDetailsPage: async ({page}, use) => {
await use(new CommerceProductAdminDetailsPage(page));
},
commerceProductAdminDetailsProductRelationsPage: async ({page}, use) => {
await use(new CommerceProductAdminDetailsProductRelationsPage(page));
},
commerceProductAdminPage: async ({page}, use) => {
await use(new CommerceProductAdminPage(page));
},
pendingOrdersPage: async ({page}, use) => {
await use(new PendingOrdersPage(page));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import {Locator, Page} from '@playwright/test';

export class CommerceProductAdminDetailsPage {
export class CommerceAdminProductDetailsPage {
readonly productRelationsTab: Locator;
readonly page: Page;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Locator, Page} from '@playwright/test';

import {CommerceDNDTablePage} from './commerceDNDTablePage';

export class CommerceProductAdminDetailsProductRelationsPage extends CommerceDNDTablePage {
export class CommerceAdminProductDetailsProductRelationsPage extends CommerceDNDTablePage {
readonly deleteBulkButton: Locator;
readonly page: Page;
readonly selectItemsInput: Locator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Locator, Page} from '@playwright/test';

import {ApplicationsMenuPage} from '../product-navigation-applications-menu/ApplicationsMenuPage';

export class CommerceProductAdminPage {
export class CommerceAdminProductPage {
readonly applicationsMenuPage: ApplicationsMenuPage;
readonly creationMenuNewButton: Locator;
readonly generateSkusMenuItem: Locator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export const test = mergeTests(apiHelpersTest, commercePagesTest, loginTest());

test('LPD-13559 bulk actions for product relations', async ({
apiHelpers,
commerceProductAdminDetailsPage,
commerceProductAdminDetailsProductRelationsPage,
commerceProductAdminPage,
commerceAdminProductDetailsPage,
commerceAdminProductDetailsProductRelationsPage,
commerceAdminProductPage,
page,
}) => {
await page.goto('/');
Expand Down Expand Up @@ -46,13 +46,13 @@ test('LPD-13559 bulk actions for product relations', async ({
]);

try {
await commerceProductAdminPage.gotoProduct(product1.name['en_US']);
await commerceAdminProductPage.gotoProduct(product1.name['en_US']);

await commerceProductAdminDetailsPage.goToProductRelations();
await commerceAdminProductDetailsPage.goToProductRelations();

await expect(
(
await commerceProductAdminDetailsProductRelationsPage.tableRow(
await commerceAdminProductDetailsProductRelationsPage.tableRow(
2,
product2.name['en_US'],
true
Expand All @@ -61,24 +61,24 @@ test('LPD-13559 bulk actions for product relations', async ({
).toBeVisible();
await expect(
(
await commerceProductAdminDetailsProductRelationsPage.tableRow(
await commerceAdminProductDetailsProductRelationsPage.tableRow(
2,
product3.name['en_US'],
true
)
).row
).toBeVisible();

await commerceProductAdminDetailsProductRelationsPage.selectItemsInput.check();
await commerceAdminProductDetailsProductRelationsPage.selectItemsInput.check();

await expect(
commerceProductAdminDetailsProductRelationsPage.deleteBulkButton
commerceAdminProductDetailsProductRelationsPage.deleteBulkButton
).toBeVisible();

await commerceProductAdminDetailsProductRelationsPage.deleteBulkButton.click();
await commerceAdminProductDetailsProductRelationsPage.deleteBulkButton.click();

await expect(
commerceProductAdminDetailsProductRelationsPage.emptyTableMessage
commerceAdminProductDetailsProductRelationsPage.emptyTableMessage
).toBeVisible();
}
finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ test.afterEach(async ({apiHelpers}) => {
test('mini cart bundle with UOM', async ({
apiHelpers,
applicationsMenuPage,
commerceAdminProductPage,
commerceLayoutsPage,
commerceMiniCartPage,
commerceProductAdminPage,
page,
}) => {
await apiHelpers.featureFlag.updateFeatureFlag('COMMERCE-9599', true);
Expand Down Expand Up @@ -191,14 +191,14 @@ test('mini cart bundle with UOM', async ({

await applicationsMenuPage.goToProducts();

await commerceProductAdminPage.managementToolbarSearchInput.fill(
await commerceAdminProductPage.managementToolbarSearchInput.fill(
'ProductBundle'
);
await commerceProductAdminPage.managementToolbarSearchInput.press('Enter');
await commerceAdminProductPage.managementToolbarSearchInput.press('Enter');

await page.getByRole('link', {exact: true, name: 'ProductBundle'}).click();

await commerceProductAdminPage.generateSkus();
await commerceAdminProductPage.generateSkus();

await expect(page.getByText('Showing 1 to 5 of 5 entries.')).toBeVisible();

Expand Down

0 comments on commit a3f33a4

Please sign in to comment.