# What this PR does There are the following tests added: - admin is allowed to edit other profiles - editor is not allowed to edit other profiles ## Which issue(s) this PR fixes https://github.com/grafana/oncall/issues/1586 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
import { test, expect } from '../fixtures';
|
|
import { createEscalationChain, EscalationStep } from '../utils/escalationChain';
|
|
import { generateRandomValue } from '../utils/forms';
|
|
import { createIntegrationAndSendDemoAlert } from '../utils/integrations';
|
|
import { waitForSms } from '../utils/phone';
|
|
import { configureUserNotificationSettings, verifyUserPhoneNumber } from '../utils/userSettings';
|
|
|
|
// TODO: enable once we've signed up for a MailSlurp account to receieve SMSes
|
|
test.skip('we can verify our phone number + receive an SMS alert', async ({ adminRolePage }) => {
|
|
const { page, userName } = adminRolePage;
|
|
const escalationChainName = generateRandomValue();
|
|
const integrationName = generateRandomValue();
|
|
|
|
await verifyUserPhoneNumber(page);
|
|
await configureUserNotificationSettings(page, 'SMS');
|
|
|
|
await createEscalationChain(page, escalationChainName, EscalationStep.NotifyUsers, userName);
|
|
await createIntegrationAndSendDemoAlert(page, integrationName, escalationChainName);
|
|
|
|
// wait for the SMS alert notification to arrive
|
|
const smsAlertNotification = await waitForSms();
|
|
|
|
expect(smsAlertNotification).toContain('OnCall');
|
|
expect(smsAlertNotification).toContain('alert');
|
|
});
|