Skip to content

Commit

Permalink
test: adjust selectors to access tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Dec 12, 2024
1 parent e2e0ece commit 96f792b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => {
});

test("@sdk: add a component section", async ({ ShopAdmin }) => {
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Specifications" }).click();

await expect(
ShopAdmin.page.locator(".sw-card__title", { hasText: "Location tests" }),
Expand All @@ -27,7 +27,7 @@ test("@sdk: add a component section", async ({ ShopAdmin }) => {
});

test("@sdk: add a component section with tabs", async ({ ShopAdmin }) => {
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Specifications" }).click();

await expect(
ShopAdmin.page.locator(".sw-card__title", { hasText: "Card tabs tests" }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => {
test("@sdk: update the height of the location iFrame", async ({
ShopAdmin,
}) => {
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Specifications" }).click();
await expect(
ShopAdmin.page.locator(".sw-card__title", { hasText: "Location tests" }),
).toBeVisible();
Expand All @@ -40,7 +40,7 @@ test("@sdk: update the height of the location iFrame", async ({
test("@sdk: start auto resizing of the iFrame height", async ({
ShopAdmin,
}) => {
await ShopAdmin.page.getByRole("link", { name: "Specifications" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Specifications" }).click();
await expect(
ShopAdmin.page.locator(".sw-card__title", { hasText: "Location tests" }),
).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => {
});

test("@sdk: modals", async ({ ShopAdmin }) => {
await ShopAdmin.page.getByRole("link", { name: "Example" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Example" }).click();
await expect(
ShopAdmin.page.locator(".sw-card", { hasText: "Hello in the new tab" }),
).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test.beforeEach(async ({ ShopAdmin, TestDataService, AdminProductDetail }) => {
});

test("@sdk: Check tab existence", async ({ ShopAdmin }) => {
await ShopAdmin.page.getByRole("link", { name: "Example" }).click();
await ShopAdmin.page.getByRole("tab", { name: "Example" }).click();
await expect(
ShopAdmin.page.locator(".sw-card", { hasText: "Hello in the new tab" }),
).toBeVisible();
Expand Down

0 comments on commit 96f792b

Please sign in to comment.