Fix rename test

This commit is contained in:
Jeremy Tuloup 2021-07-05 19:17:51 +02:00
parent 6e7e1eb712
commit 38401e17d0
3 changed files with 7 additions and 5 deletions

View File

@ -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:

View File

@ -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();

View File

@ -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
});