E2E: Remove time zone scenario flackyness (#55458)

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
This commit is contained in:
Ivan Ortega Alba 2022-10-05 15:00:33 +02:00 committed by GitHub
parent 48ebaa48cc
commit 7fd613ec0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,8 @@ e2e.scenario({
e2e.components.Select.option().should('be.visible').contains(toTimeZone).click();
// click to go back to the dashboard.
e2e.components.BackButton.backArrow().click({ force: true }).wait(5000);
e2e.components.RefreshPicker.runButtonV2().click();
e2e.components.BackButton.backArrow().click({ force: true });
e2e.components.RefreshPicker.runButtonV2().should('be.visible').click();
for (const title of panelsToCheck) {
e2e.components.Panels.Panel.containerByTitle(title)
@ -76,7 +76,9 @@ e2e.scenario({
const inUtc = timesInUtc[title];
const inTz = element.text();
const isCorrect = isTimeCorrect(inUtc, inTz, offset);
assert.isTrue(isCorrect, `Panel with title: "${title}"`);
expect(isCorrect, `Expect the panel "${title}" to have the new timezone applied but isn't`).to.be.equal(
true
);
})
);
}