oncall-engine/grafana-plugin/e2e-tests/escalationChains/escalationPolicy.test.ts
Dominik Broj 92fa509d22
Brojd/improve e2e tests dx (#3516)
# What this PR does
- introduce e2e tests in Tilt
- support e2e tests commands in Makefile
- stabilize local setup

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/3492

## 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)
2023-12-15 08:58:25 +00:00

17 lines
801 B
TypeScript

import { expect, test } from '../fixtures';
import { createEscalationChain, EscalationStep, selectEscalationStepValue } from '../utils/escalationChain';
import { generateRandomValue } from '../utils/forms';
test('escalation policy does not go back to "Default" after adding users to notify', async ({ adminRolePage }) => {
const { page, userName } = adminRolePage;
const escalationChainName = generateRandomValue();
// create important escalation step
await createEscalationChain(page, escalationChainName, EscalationStep.NotifyUsers, null, true);
// add user to notify
await selectEscalationStepValue(page, EscalationStep.NotifyUsers, userName);
// reload and check if important is still selected
await page.reload();
await expect(page.getByText('Important')).toBeVisible();
});