diff --git a/e2e/tests/integrations/admin/activate-integration.test.ts b/e2e/tests/integrations/admin/activate-integration.test.ts index 4c0d911d0..ef2b1a7df 100644 --- a/e2e/tests/integrations/admin/activate-integration.test.ts +++ b/e2e/tests/integrations/admin/activate-integration.test.ts @@ -28,10 +28,10 @@ test("As an admin I can activate an integration", async ({ page }) => { // activate integration await page.goto(`/admin/resources/integrations/${integrationId}`); - await page.getByRole("button", { name: "Actions" }).click(); + await page.locator("#nova-ui-dropdown-button-5").click(); await page.getByRole("button", { name: "Activate Integration" }).click(); await page.locator("#organization").selectOption(organizationId!); - await page.getByRole("button", { name: "Activate" }).click(); + await page.locator("[dusk='confirm-action-button']").click(); await expect( page.locator(`a[href="/admin/resources/organizations/${organizationId}"]`) diff --git a/e2e/tests/integrations/admin/approve-integration.test.ts b/e2e/tests/integrations/admin/approve-integration.test.ts index 49355bb1a..05e5f0df1 100644 --- a/e2e/tests/integrations/admin/approve-integration.test.ts +++ b/e2e/tests/integrations/admin/approve-integration.test.ts @@ -23,9 +23,9 @@ test("As an admin I can approve an integration", async ({ page }) => { // approve integration await page.goto(`/admin/resources/integrations/${integrationId}`); - await page.getByRole("button", { name: "Actions" }).click(); + await page.locator("#nova-ui-dropdown-button-5").click(); await page.getByRole("button", { name: "Approve Integration" }).click(); - await page.getByRole("button", { name: "Approve" }).click(); + await page.locator("[dusk='confirm-action-button']").click(); await expect(page.getByText("active", { exact: true })).toBeVisible(); }); diff --git a/e2e/tests/integrations/admin/block-integration.test.ts b/e2e/tests/integrations/admin/block-integration.test.ts index f97afa2c9..259807cb2 100644 --- a/e2e/tests/integrations/admin/block-integration.test.ts +++ b/e2e/tests/integrations/admin/block-integration.test.ts @@ -18,9 +18,9 @@ test("As an admin I can block an integration", async ({ page }) => { // block integration await page.goto(`/admin/resources/integrations/${integrationId}`); - await page.getByRole("button", { name: "Actions" }).click(); + await page.locator("#nova-ui-dropdown-button-5").click(); await page.getByRole("button", { name: "Block Integration" }).click(); - await page.getByRole("button", { name: "Block" }).click(); + await page.locator("[dusk='confirm-action-button']").click(); await expect(page.getByText("blocked", { exact: true })).toBeVisible(); }); diff --git a/e2e/tests/integrations/admin/create-coupon.test.ts b/e2e/tests/integrations/admin/create-coupon.test.ts index b7a7883d5..0c02370e7 100644 --- a/e2e/tests/integrations/admin/create-coupon.test.ts +++ b/e2e/tests/integrations/admin/create-coupon.test.ts @@ -8,7 +8,7 @@ test("As an admin I can create a coupon)", async ({ page }) => { const { couponCode } = await createCoupon(page); await expect( - page.locator("h1").getByText(`Coupon Details: ${couponCode}`) + page.getByText(couponCode, { exact: true }) ).toBeVisible(); }); diff --git a/e2e/tests/integrations/admin/edit-integration.test.ts b/e2e/tests/integrations/admin/edit-integration.test.ts index 6c2fb4d0f..00ad00369 100644 --- a/e2e/tests/integrations/admin/edit-integration.test.ts +++ b/e2e/tests/integrations/admin/edit-integration.test.ts @@ -23,7 +23,7 @@ test("As an admin I can edit an existing integration", async ({ page }) => { const newIntegrationName = faker.word.adjective(); - await page.getByTestId('edit-resource').click(); + await page.locator("[dusk='edit-resource-button']").click(); await page.getByPlaceholder('Name').fill(newIntegrationName); await page.getByPlaceholder('Description').fill(faker.lorem.lines(3)); await page.getByRole('button', { name: 'Update Integration' }).click(); diff --git a/e2e/tests/integrations/integrator/create-integration-with-coupon.test.ts b/e2e/tests/integrations/integrator/create-integration-with-coupon.test.ts index dc34aa298..a4cb19d54 100644 --- a/e2e/tests/integrations/integrator/create-integration-with-coupon.test.ts +++ b/e2e/tests/integrations/integrator/create-integration-with-coupon.test.ts @@ -14,9 +14,7 @@ test("As an integrator I can create an integration with coupon (so it doesn't ne const { couponCode } = await createCoupon(adminPage); - await expect( - adminPage.locator("h1").getByText(`Coupon Details: ${couponCode}`) - ).toBeVisible(); + await expect(adminPage.getByText(couponCode, { exact: true })).toBeVisible(); const userContext = await browser.newContext({ storageState: "playwright/.auth/user.json", @@ -34,5 +32,5 @@ test("As an integrator I can create an integration with coupon (so it doesn't ne await expect(userPage.getByText(integrationName)).toBeVisible(); await userPage.waitForLoadState("networkidle"); - await expect(userPage.getByText("Actief", { exact: true})).toBeVisible(); + await expect(userPage.getByText("Actief", { exact: true })).toBeVisible(); });