Cypress dashboard-time-zone: break chain to prevent flakiness (#75001)

break chain to prevent flakiness
This commit is contained in:
Ashley Harrison 2023-09-18 12:02:32 +01:00 committed by GitHub
parent 0ceeb18269
commit 6b14183706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,18 +66,18 @@ describe('Dashboard time zone support', () => {
for (const title of panelsToCheck) {
e2e.components.Panels.Panel.title(title)
.should('be.visible')
.within(() =>
.within(() => {
e2e.components.Panels.Visualization.Graph.xAxis.labels().should('be.visible');
e2e.components.Panels.Visualization.Graph.xAxis
.labels()
.should('be.visible')
.last()
.should((element) => {
const inUtc = timesInUtc[title];
const inTz = element.text();
const isCorrect = isTimeCorrect(inUtc, inTz, offset);
expect(isCorrect).to.be.equal(true);
})
);
});
});
}
});