Skip to content

Commit

Permalink
chore(e2e): screenshot if failed in rolling-indexes test (#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
gribnoysup authored Nov 4, 2024
1 parent cf59b59 commit 3557f0e
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 3557f0e

Please sign in to comment.