Skip to content

Commit

Permalink
Merge branch 'main' into PPF-470-e2e-uitpas
Browse files Browse the repository at this point in the history
  • Loading branch information
vhande committed Jul 5, 2024
2 parents 280a5c6 + 2008a15 commit eafe082
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions e2e/tests/integrations/admin/activate-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]`)
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/integrations/admin/approve-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
4 changes: 2 additions & 2 deletions e2e/tests/integrations/admin/block-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
2 changes: 1 addition & 1 deletion e2e/tests/integrations/admin/create-coupon.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

});
2 changes: 1 addition & 1 deletion e2e/tests/integrations/admin/edit-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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();
});

0 comments on commit eafe082

Please sign in to comment.