# What this PR does Stabilize e2e tests by: - improve usage of locators - fix unreliable selectors - prevent parallelism within the same test file Additionally: - configure eslint for e2e tests and fix existing errors/warnings - bump Playwright version to latest stable ## Which issue(s) this PR fixes https://github.com/grafana/oncall/issues/3217 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
14 lines
646 B
TypeScript
14 lines
646 B
TypeScript
import { test, expect } from '../fixtures';
|
|
import { openCreateIntegrationModal } from '../utils/integrations';
|
|
import { goToOnCallPage } from '../utils/navigation';
|
|
|
|
test('integrations have unique names', async ({ adminRolePage }) => {
|
|
const { page } = adminRolePage;
|
|
await goToOnCallPage(page, 'integrations');
|
|
await openCreateIntegrationModal(page);
|
|
|
|
const integrationNames = await page.getByTestId('integration-display-name').allInnerTexts();
|
|
const uniqueLowercasedIntegrationNames = new Set(integrationNames.map((elem) => elem.toLowerCase()));
|
|
|
|
expect(uniqueLowercasedIntegrationNames.size).toEqual(integrationNames.length);
|
|
});
|