-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test if nbgitpuller extension is installed (#20)
* Test nbgitpuller API to make sure it is not installed * Test that litegitpuller is not activated if nbgitpuller is installed * lint * Test the endpoint without settings Co-authored-by: Jeremy Tuloup <[email protected]> * Use matrix in the tests * Fix ui test --------- Co-authored-by: Jeremy Tuloup <[email protected]>
- Loading branch information
Showing
5 changed files
with
90 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { expect, test } from '@jupyterlab/galata'; | ||
|
||
/** | ||
* ### NOTE: | ||
* This test is supposed to run with nbgitpuller extension installed, to make | ||
* sure that the litegitpuller extension is not activated in that case. | ||
*/ | ||
|
||
//Don't load JupyterLab webpage before running the tests. | ||
//This is required to ensure we capture all log messages. | ||
test.use({ autoGoto: false }); | ||
|
||
test('should emit a non activation console message', async ({ page }) => { | ||
const logs: string[] = []; | ||
|
||
page.on('console', message => { | ||
logs.push(message.text()); | ||
}); | ||
|
||
await page.goto(); | ||
|
||
expect( | ||
logs.filter( | ||
s => | ||
s === | ||
'@jupyterlite/litegitpuller is not activated, to avoid conflict with nbgitpuller' | ||
) | ||
).toHaveLength(1); | ||
}); |
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