Revert "Fix Insights e2e test" (#4188)

Reverts grafana/oncall#4181
This commit is contained in:
Joey Orlando 2024-04-08 13:54:53 -04:00 committed by GitHub
parent 59852de278
commit d0ebe37197
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,8 +25,8 @@ test.skip(
* see this Slack conversation for more details:
* https://raintank-corp.slack.com/archives/C04JCU51NF8/p1712069772861909
*/
test.describe('Insights', () => {
test.beforeAll(async ({ adminRolePage: { page, userName } }) => {
test.describe.skip('Insights', () => {
test.beforeAll(async ({ adminRolePage: { page } }) => {
const DATASOURCE_NAME = 'OnCall Prometheus';
const DATASOURCE_URL = 'http://oncall-dev-prometheus-server.default.svc.cluster.local';
@ -42,23 +42,6 @@ test.describe('Insights', () => {
await page.getByPlaceholder('http://localhost:9090').fill(DATASOURCE_URL);
await clickButton({ page, buttonText: 'Save & test' });
}
// send alert and resolve to get some values in insights
const escalationChainName = generateRandomValue();
const integrationName = generateRandomValue();
const onCallScheduleName = generateRandomValue();
await createOnCallScheduleWithRotation(page, onCallScheduleName, userName);
await createEscalationChain(
page,
escalationChainName,
EscalationStep.NotifyUsersFromOnCallSchedule,
onCallScheduleName
);
await createIntegrationAndSendDemoAlert(page, integrationName, escalationChainName);
await resolveFiringAlert(page);
// wait for Prometheus to scrape the data
await page.waitForTimeout(5000);
});
test('Viewer can see all the panels in OnCall insights', async ({ viewerRolePage: { page } }) => {
@ -76,9 +59,25 @@ test.describe('Insights', () => {
});
});
test('There is no panel that misses data', async ({ adminRolePage: { page } }) => {
test('There is no panel that misses data', async ({ adminRolePage: { page, userName } }) => {
test.setTimeout(90_000);
// send alert and resolve to get some values in insights
const escalationChainName = generateRandomValue();
const integrationName = generateRandomValue();
const onCallScheduleName = generateRandomValue();
await createOnCallScheduleWithRotation(page, onCallScheduleName, userName);
await createEscalationChain(
page,
escalationChainName,
EscalationStep.NotifyUsersFromOnCallSchedule,
onCallScheduleName
);
await createIntegrationAndSendDemoAlert(page, integrationName, escalationChainName);
await resolveFiringAlert(page);
// wait for Prometheus to scrape the data
await page.waitForTimeout(5000);
// check that we have data in insights panels
await goToOnCallPage(page, 'insights');
await page.getByText('Last 24 hours').click();