diff --git a/tests/playwright/commands/fillEntityForm.ts b/tests/playwright/commands/fillEntityForm.ts index e457055..36cebfc 100644 --- a/tests/playwright/commands/fillEntityForm.ts +++ b/tests/playwright/commands/fillEntityForm.ts @@ -66,6 +66,6 @@ export const fillEntityForm = async (params: Params) => { .click() if (handleModal) { - await page.locator('.modal-dialog .k-button.primary').click() + await page.locator('.modal-dialog .k-modal-footer .k-button.primary').click() } } diff --git a/tests/playwright/specs/consumers/03-ConsumerPlugins.spec.ts b/tests/playwright/specs/consumers/03-ConsumerPlugins.spec.ts index 59728c2..59218b1 100644 --- a/tests/playwright/specs/consumers/03-ConsumerPlugins.spec.ts +++ b/tests/playwright/specs/consumers/03-ConsumerPlugins.spec.ts @@ -48,7 +48,7 @@ test.describe('consumer plugins', () => { await expect(page.locator('.autosuggest #consumer-id')).toHaveValue(new RegExp(`${mockConsumerName}\\s*-\\s*${uuid}`)) await withNavigation( page, - async () => await page.locator('.entity-form .primary').click() + async () => await page.locator('.entity-form [data-testid="form-footer-actions"] .primary').click() ) }) @@ -60,7 +60,7 @@ test.describe('consumer plugins', () => { await withNavigation( page, async () => { - await page.locator('.entity-form .primary').click() + await page.locator('.entity-form [data-testid="form-footer-actions"] .primary').click() await expect(page.locator('.k-modal-dialog.modal-dialog')).toBeVisible() await page.locator('.k-prompt-action-buttons .primary').click() } @@ -94,7 +94,7 @@ test.describe('consumer plugins', () => { await page.locator('#config-second').fill('30') await withNavigation( page, - async () => await page.locator('.entity-form .primary').click() + async () => await page.locator('.entity-form [data-testid="form-footer-actions"] .primary').click() ) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Global') @@ -108,7 +108,7 @@ test.describe('consumer plugins', () => { await expect(page.locator('.k-select-item')).toContainText(mockConsumerName) await page.click('.k-select-item') await page.click(consumerListPage.$.submitButton) - await withNavigation(page, async () => await page.click('.k-modal .k-button.primary')) + await withNavigation(page, async () => await page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Consumer') }) @@ -123,7 +123,7 @@ test.describe('consumer plugins', () => { await page.waitForSelector('.entity-form') await page.click('.selection-group .Global-check') await page.click(consumerListPage.$.submitButton) - await withNavigation(page, async () => await page.click('.k-modal .k-button.primary')) + await withNavigation(page, async () => await page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Global') }) }) diff --git a/tests/playwright/specs/plugins/01-Plugins.spec.ts b/tests/playwright/specs/plugins/01-Plugins.spec.ts index c98e0eb..5c5f565 100644 --- a/tests/playwright/specs/plugins/01-Plugins.spec.ts +++ b/tests/playwright/specs/plugins/01-Plugins.spec.ts @@ -89,7 +89,7 @@ test.describe('plugins', () => { await withNavigation( page, - async () => await page.locator('.plugin-form .primary').click() + async () => await page.locator('.plugin-form [data-testid="form-footer-actions"] .primary').click() ) await expect(page.locator('.k-table tbody tr')).toHaveCount(1) await expect(page.locator('td[data-testid="name"]')).toContainText('Basic Authentication') @@ -199,7 +199,7 @@ test.describe('plugins', () => { await withNavigation( page, - async () => await page.locator('.plugin-form .primary').click() + async () => await page.locator('.plugin-form [data-testid="form-footer-actions"] .primary').click() ) await expect(page.locator('.k-table tbody tr')).toHaveCount(1) await expect(page.locator('td[data-testid="name"]')).toContainText('Basic Authentication') @@ -228,7 +228,7 @@ test.describe('plugins', () => { await expect(page.locator('.autosuggest #consumer-id')).toHaveValue(new RegExp(`${mockConsumerName}\\s*-\\s*${uuid}`)) await withNavigation( page, - async () => await page.locator('.plugin-form .primary').click() + async () => await page.locator('.plugin-form [data-testid="form-footer-actions"] .primary').click() ) await expect(page.locator('.k-table tbody tr')).toHaveCount(1) await expect(page.locator('td[data-testid="name"]')).toContainText('Datadog') @@ -307,7 +307,7 @@ test.describe('plugins', () => { await withNavigation( page, - async () => await page.locator('.plugin-form .primary').click() + async () => await page.locator('.plugin-form [data-testid="form-footer-actions"] .primary').click() ) await withNavigation(page, async () => await clickEntityListAction(page, 'view')) diff --git a/tests/playwright/specs/routes/02-RoutesPlugins.spec.ts b/tests/playwright/specs/routes/02-RoutesPlugins.spec.ts index 4a88bb8..3e8e04a 100644 --- a/tests/playwright/specs/routes/02-RoutesPlugins.spec.ts +++ b/tests/playwright/specs/routes/02-RoutesPlugins.spec.ts @@ -71,7 +71,7 @@ test.describe('routes plugins', () => { await withNavigation( page, - async () => await page.locator('.plugin-form .primary').click() + async () => await page.locator('.plugin-form [data-testid="form-footer-actions"] .primary').click() ) await expect(page.locator('.k-table tbody tr')).toHaveCount(1) await expect(page.locator('td[data-testid="name"]')).toContainText('Basic Authentication') @@ -144,7 +144,7 @@ test.describe('routes plugins', () => { await expect(page.locator('.k-select-item')).toContainText(mockRouteName) await page.click('.k-select-item') await page.click(routeListPage.$.submitButton) - await withNavigation(page, () => page.click('.k-modal .k-button.primary')) + await withNavigation(page, () => page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Route') }) @@ -156,7 +156,7 @@ test.describe('routes plugins', () => { await page.waitForSelector('.entity-form') await page.click('.selection-group .Global-check') await page.click(routeListPage.$.submitButton) - await withNavigation(page, () => page.click('.k-modal .k-button.primary')) + await withNavigation(page, () => page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Global') }) }) diff --git a/tests/playwright/specs/services/03-ServicePlugins.spec.ts b/tests/playwright/specs/services/03-ServicePlugins.spec.ts index 7e72f74..f0dfea4 100644 --- a/tests/playwright/specs/services/03-ServicePlugins.spec.ts +++ b/tests/playwright/specs/services/03-ServicePlugins.spec.ts @@ -132,7 +132,7 @@ test.describe('service plugins', () => { await expect(page.locator('.k-select-item')).toContainText('test_service') await page.click('.k-select-item') await page.click(serviceListPage.$.submitButton) - await withNavigation(page, () => page.click('.k-modal .k-button.primary')) + await withNavigation(page, () => page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Service') }) @@ -142,7 +142,7 @@ test.describe('service plugins', () => { await page.waitForSelector('.entity-form') await page.click('.selection-group .Global-check') await page.click(serviceListPage.$.submitButton) - await withNavigation(page, () => page.click('.k-modal .k-button.primary')) + await withNavigation(page, () => page.click('.k-modal .k-modal-footer .k-button.primary')) await expect(page.locator('.kong-ui-entities-plugins-list [data-testid="appliedTo"] .k-badge')).toContainText('Global') }) })