Skip to content
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

e2e-test: editor action test - use mouse down #5839

Merged
merged 2 commits into from
Dec 20, 2024
Merged
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
7 changes: 5 additions & 2 deletions test/e2e/areas/action-bar/editor-action-bar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ test.describe('Editor Action Bar', {
annotation: [{ type: 'info', description: 'electron test unable to interact with dropdown native menu' }],
}, async function ({ app, page }) {
await openNotebook(app, 'workspaces/large_r_notebook/spotify.ipynb');
await verifySplitEditor(page, 'spotify.ipynb');

if (app.web) {
await verifyToggleLineNumbers(page);
await verifyToggleBreadcrumb(page);
}

await verifySplitEditor(page, 'spotify.ipynb');
});
});

Expand Down Expand Up @@ -113,7 +114,9 @@ async function verifyOpenInNewWindow(page, expectedText: string) {
async function clickCustomizeNotebookMenuItem(page, menuItem: string) {
const role = menuItem.includes('Line Numbers') ? 'menuitemcheckbox' : 'menuitem';
const dropdownButton = page.getByLabel('Customize Notebook...').nth(1);
await dropdownButton.evaluate((button) => (button as HTMLElement).click());
await dropdownButton.evaluate((button) => {
(button as HTMLElement).dispatchEvent(new MouseEvent('mousedown', { bubbles: true, cancelable: true }));
});

const toggleMenuItem = page.getByRole(role, { name: menuItem });
await toggleMenuItem.hover();
Expand Down
Loading