Skip to content

Commit 3e740e0

Browse files
committed
Consolidated lifecycle hooks (DH-18428-2)
1 parent 8397b6f commit 3e740e0

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

e2e-testing/src/specs/panels.spec.ts

-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
setup,
88
SIMPLE_TICKING3_PY,
99
step,
10-
teardown,
1110
} from '../util';
1211

1312
const expectedTabs = {
@@ -55,10 +54,6 @@ describe('Panels Tests', () => {
5554
await new Workbench().executeCommand('View: Split Editor Down');
5655
});
5756

58-
after(async () => {
59-
await teardown();
60-
});
61-
6257
it('should open panels', async () => {
6358
const editorView = new EditorViewExtended();
6459
const editor = await editorView.openTextEditor(SIMPLE_TICKING3_PY.name);

e2e-testing/src/specs/statusBar.spec.ts

-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
SIMPLE_TICKING3_PY,
1111
SIMPLE_TICKING_MD,
1212
step,
13-
teardown,
1413
TEST_GROOVY,
1514
TEST_TXT,
1615
} from '../util';
@@ -34,10 +33,6 @@ describe('Status Bar Tests', () => {
3433
statusBar = new StatusBar();
3534
});
3635

37-
after(async () => {
38-
await teardown();
39-
});
40-
4136
it('should only show Deephaven status bar item for supported file types', async () => {
4237
for (const [s, fileName, isVisible] of [
4338
[1, TEST_TXT.name, false],

e2e-testing/src/util/lifeCycle.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@ import { SERVER_TITLE } from './constants';
66
* Setup before running test suite.
77
*/
88
export async function setup(): Promise<void> {
9-
const explorer = await new ActivityBar().getViewControl('Explorer');
10-
await explorer?.openView();
11-
}
12-
13-
/**
14-
* Teardown after running test suite.
15-
*/
16-
export async function teardown(): Promise<void> {
9+
// Ensure we have a clean slate from any previous test suites
1710
await new EditorView().closeAllEditors();
1811
await disconnectFromServer(SERVER_TITLE);
12+
1913
const explorer = await new ActivityBar().getViewControl('Explorer');
2014
await explorer?.openView();
2115
}

0 commit comments

Comments
 (0)