-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Close the browser tab when clicking on "Close and Shut Down Notebook" #6937
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fef47d7
Close the browser tab when clicking on "Close and Shut Down Notebook"
jtpio 9366957
Move menu entry to match classic
jtpio 26bc7b8
Fix menu entries
jtpio 9cab98f
Add comment about the rank
jtpio e7a8bfc
Use default `isEnabled`
jtpio 7bb1ae8
Update Playwright Snapshots
github-actions[bot] a651302
Update Playwright Snapshots
github-actions[bot] 851aaa3
Add UI test
jtpio dab98bf
Merge branch 'main' into close-and-shutdown
jtpio edea993
Rename to "Close and Shut Down Notebook"
jtpio b3ffa66
Update Playwright Snapshots
github-actions[bot] c9f3fc6
Update Playwright Snapshots
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-21.2 KB
(26%)
ui-tests/test/menus.spec.ts-snapshots/opened-menu-file-chromium-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-20.2 KB
(27%)
ui-tests/test/menus.spec.ts-snapshots/opened-menu-file-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -155,4 +155,24 @@ test.describe('Notebook', () => { | |||||
const imageName = 'notebooktools-right-panel.png'; | ||||||
expect(await panel.screenshot()).toMatchSnapshot(imageName); | ||||||
}); | ||||||
|
||||||
test('Clicking on "Close and Halt" should close the browser tab', async ({ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
page, | ||||||
tmpPath, | ||||||
}) => { | ||||||
const notebook = 'simple.ipynb'; | ||||||
await page.contents.uploadFile( | ||||||
path.resolve(__dirname, `./notebooks/${notebook}`), | ||||||
`${tmpPath}/${notebook}` | ||||||
); | ||||||
await page.goto(`notebooks/${tmpPath}/${notebook}`); | ||||||
|
||||||
const menuPath = 'File>Close and Halt'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
await page.menu.clickMenuItem(menuPath); | ||||||
|
||||||
// Press Enter to confirm the dialog | ||||||
await page.keyboard.press('Enter'); | ||||||
|
||||||
expect(page.isClosed()); | ||||||
}); | ||||||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If going with this suggestion then we'll likely need to use
Shut Down
instead ofShutdown
for consistency with the other menu entries.