-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds side panel widgets to the tracker (#146)
* Adds side panel widgets to the tracker * Focus input when clicking in a chat, on a non focussable element * Activate the sidepanel and the expected chat before focusing input * Add tests * lint
- Loading branch information
Showing
8 changed files
with
155 additions
and
48 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) Jupyter Development Team. | ||
* Distributed under the terms of the Modified BSD License. | ||
*/ | ||
|
||
import { expect, test } from '@jupyterlab/galata'; | ||
import { openChat, openChatToSide, openSidePanel } from './test-utils'; | ||
|
||
const CHAT1 = 'test1.chat'; | ||
const CHAT2 = 'test2.chat'; | ||
|
||
test.describe('#restorer', () => { | ||
test.beforeEach(async ({ page }) => { | ||
// Create chat filed | ||
await page.filebrowser.contents.uploadContent('{}', 'text', CHAT1); | ||
await page.filebrowser.contents.uploadContent('{}', 'text', CHAT2); | ||
}); | ||
|
||
test.afterEach(async ({ page }) => { | ||
[CHAT1, CHAT2].forEach(async file => { | ||
if (await page.filebrowser.contents.fileExists(file)) { | ||
await page.filebrowser.contents.deleteFile(file); | ||
} | ||
}); | ||
}); | ||
|
||
test('should restore the previous session', async ({ page }) => { | ||
const chat1 = await openChat(page, CHAT1); | ||
const chat2 = await openChatToSide(page, CHAT2); | ||
await page.reload({ waitForIsReady: false }); | ||
|
||
await expect(chat1).toBeVisible(); | ||
// open the side panel if it is not | ||
await openSidePanel(page); | ||
await expect(chat2).toBeVisible(); | ||
}); | ||
}); |
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