mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-09 03:50:45 +08:00
Fix rename test
This commit is contained in:
parent
6e7e1eb712
commit
38401e17d0
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -188,7 +188,9 @@ jobs:
|
||||
run: |
|
||||
jlpm
|
||||
jlpm run build:test
|
||||
jlpm run test:ci -- --browser ${{ matrix.browser }}
|
||||
jlpm run test:ci
|
||||
env:
|
||||
BROWSER: ${{ matrix.browser }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
|
@ -47,7 +47,6 @@ test.describe('Notebook', () => {
|
||||
newName
|
||||
);
|
||||
await page.click('text="Rename"');
|
||||
await page.waitForNavigation();
|
||||
|
||||
// Check the URL contains the new name
|
||||
const url = page.url();
|
||||
|
@ -394,11 +394,12 @@ const title: JupyterFrontEndPlugin<void> = {
|
||||
current.activate();
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
if (result === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const basename = PathExt.basename(result.path);
|
||||
const newPath = current.context.path ?? result.path;
|
||||
const basename = PathExt.basename(newPath);
|
||||
h.textContent = basename;
|
||||
if (!router) {
|
||||
return;
|
||||
@ -408,7 +409,7 @@ const title: JupyterFrontEndPlugin<void> = {
|
||||
if (!route || !path) {
|
||||
return;
|
||||
}
|
||||
const encoded = encodeURIComponent(result.path);
|
||||
const encoded = encodeURIComponent(newPath);
|
||||
router.navigate(`/retro/${route}/${encoded}`, {
|
||||
skipRouting: true
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user