Chore: remove wrapping of cy in the e2e object (#74650)

* remove cy. wrapping as e2e().

* make trace-view-scrolling more stable and remove waits

* improve stability more
This commit is contained in:
Ashley Harrison
2023-09-11 11:20:54 +01:00
committed by GitHub
parent 7718a67b77
commit 247d91be2b
54 changed files with 518 additions and 622 deletions
+10 -14
View File
@@ -49,28 +49,24 @@ export const benchmark = ({
return it(testName, () => {
e2e.flows.openDashboard();
e2e().wait(dashboard.delayAfterOpening);
cy.wait(dashboard.delayAfterOpening);
if (appStats) {
const startCollecting = appStats.startCollecting;
if (startCollecting) {
e2e()
.window()
.then((win) => startCollecting(win));
cy.window().then((win) => startCollecting(win));
}
e2e().startBenchmarking(testName);
e2e().wait(duration);
cy.startBenchmarking(testName);
cy.wait(duration);
e2e()
.window()
.then((win) => {
e2e().stopBenchmarking(testName, appStats.collect(win));
});
cy.window().then((win) => {
cy.stopBenchmarking(testName, appStats.collect(win));
});
} else {
e2e().startBenchmarking(testName);
e2e().wait(duration);
e2e().stopBenchmarking(testName, {});
cy.startBenchmarking(testName);
cy.wait(duration);
cy.stopBenchmarking(testName, {});
}
});
});