Skip to content

Commit

Permalink
chore(e2e): screenshot if failed in rolling-indexes test
Browse files Browse the repository at this point in the history
  • Loading branch information
gribnoysup committed Nov 1, 2024
1 parent d01d076 commit 7174e0b
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import type { Compass } from '../../helpers/compass';
import { cleanup, init, Selectors } from '../../helpers/compass';
import {
cleanup,
init,
screenshotIfFailed,
Selectors,
} from '../../helpers/compass';
import type { CompassBrowser } from '../../helpers/compass-browser';
import { createNumbersCollection } from '../../helpers/insert-data';
import {
Expand All @@ -11,16 +16,20 @@ describe('Rolling indexes', function () {
let compass: Compass;
let browser: CompassBrowser;

before(async function () {
before(function () {
if (!isTestingAtlasCloudSandbox()) {
this.skip();
}
});

beforeEach(async function () {
compass = await init(this.test?.fullTitle());
browser = compass.browser;
await browser.setupDefaultConnections();
});

before(function () {
if (!isTestingAtlasCloudSandbox()) {
this.skip();
}
afterEach(async function () {
await screenshotIfFailed(compass, this.currentTest);
});

after(async function () {
Expand Down

0 comments on commit 7174e0b

Please sign in to comment.