Skip to content

e2e-test: session accessability test #7718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/e2e/infra/test-runner/test-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

export enum TestTags {
// feature tags
ACCESSIBILITY = '@:accessibility',
APPS = '@:apps',
ASSISTANT = '@:assistant',
CONNECTIONS = '@:connections',
Expand Down
28 changes: 27 additions & 1 deletion test/e2e/tests/sessions/session-mgmt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ test.describe('Sessions: Management', {
annotation: [
{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/6036' },
{ type: 'issue', description: 'https://github.com/posit-dev/positron/issues/6843' } // <-- main issue for the test, session do not consistently restore
,]
]
}, async function ({ app, sessions, runCommand }) {
const { console, plots, variables } = app.workbench;

Expand Down Expand Up @@ -171,6 +171,32 @@ test.describe('Sessions: Management', {
await plots.waitForCurrentPlot();
// await plots.expectPlotThumbnailsCountToBe(3); // issue 6036
});

test('Validate sessions are keyboard accessible', {
tag: [tags.ACCESSIBILITY],
}, async function ({ sessions, page }) {
const [pySession, rSession, pySession2] = await sessions.start(['python', 'r', 'python']);
const newSessionName = 'This is a test';

// Rename first session via keyboard actions
await sessions.sessionTabs.first().click();
await page.keyboard.press('ArrowDown');
await page.keyboard.press('Enter');
await page.keyboard.type(newSessionName);
await page.keyboard.press('Enter');

// Verify session name has been updated
await sessions.expectSessionNameToBe(pySession.id, pySession.name);
await sessions.expectSessionNameToBe(rSession.id, newSessionName);
await sessions.expectSessionNameToBe(pySession2.id, pySession2.name);

// Verify able to delete sessions via keyboard actions
await sessions.expectSessionCountToBe(3);
await page.keyboard.press('ArrowUp');
await page.keyboard.press('Tab');
await page.keyboard.press('Enter');
await sessions.expectSessionCountToBe(2);
});
});


Expand Down
Loading