Skip to content

Commit fd2186c

Browse files
authored
E2E test: flake fixes (#8909)
* Timing fix for session test * Stop installing shiny extension * wait longer for startup for notebook test that toggles between MS and Positron notebooks ### QA Notes @:apps @:sessions @:web @:notebooks
1 parent 36265f9 commit fd2186c

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

test/e2e/tests/notebook/positron-notebook-editor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ test.describe('Positron notebook opening and saving', {
5050
await hotKeys.closeAllEditors();
5151
});
5252

53-
test('Switching between VS Code and Positron notebook editors works correctly', async function ({ app, hotKeys, settings }) {
53+
test('Switching between VS Code and Positron notebook editors works correctly', async function ({ app, python, hotKeys, settings }) {
5454
const { notebooks, notebooksVscode, notebooksPositron } = app.workbench;
5555

5656
// Verify default behavior - VS Code notebook editor should be used when no association is set

test/e2e/tests/sessions/session-state.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ test.describe('Sessions: State', {
8282
// Verify Python session transitions to active when executing code
8383
await sessions.select(pySession.name);
8484
await console.executeCode('Python', 'import time');
85-
await console.executeCode('Python', 'time.sleep(10)', { waitForReady: false, maximizeConsole: false });
85+
await console.pasteCodeToConsole('time.sleep(10)', true);
8686
await sessions.expectStatusToBe(pySession.name, 'active');
8787

8888
// Verify R session transitions to active when executing code
8989
// Verify Python session continues to run and transitions to idle when finished
9090
await sessions.select(rSession.name);
91-
await console.executeCode('R', 'Sys.sleep(2)', { waitForReady: false, maximizeConsole: false });
91+
await console.pasteCodeToConsole('Sys.sleep(2)', true);
9292
await sessions.expectStatusToBe(rSession.name, 'active');
9393
await sessions.expectStatusToBe(rSession.name, 'idle');
9494
await sessions.expectStatusToBe(pySession.name, 'active');

test/e2e/tests/shiny/shiny.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,8 @@ test.use({
1111
});
1212

1313
test.describe('Shiny Application', { tag: [tags.APPS, tags.VIEWER, tags.WIN, tags.WEB] }, () => {
14-
test.beforeAll(async function ({ app }) {
15-
try {
16-
await app.workbench.extensions.installExtension('posit.shiny', true);
17-
await app.workbench.extensions.closeExtension('Shiny');
18-
} catch (e) {
19-
await app.code.driver.takeScreenshot('shinySetup');
20-
throw e;
21-
}
22-
});
14+
15+
// No longer need to install Shiny extension
2316

2417
test.afterEach(async function ({ app }) {
2518
await app.workbench.terminal.sendKeysToTerminal('Control+C');

0 commit comments

Comments
 (0)