-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
- Loading branch information
1 parent
b0fc364
commit 0019648
Showing
3 changed files
with
52 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
|
||
import { expect, galata, test } from '@jupyterlab/galata'; | ||
|
||
const DEFAULT_NAME = 'untitled.txt'; | ||
|
||
const RULERS_CONTENT = `0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789 | ||
0123456789`; | ||
|
||
test.describe('CodeMirror extensions', () => { | ||
test.use({ | ||
mockSettings: { | ||
...galata.DEFAULT_SETTINGS, | ||
'@jupyterlab/codemirror-extension:plugin': { | ||
defaultConfig: { | ||
rulers: [10, 20, 30, 40, 50, 60] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
test('Should display rulers', async ({ page }) => { | ||
await page.menu.clickMenuItem('File>New>Text File'); | ||
|
||
await page.getByRole('tab', { name: DEFAULT_NAME }).waitFor(); | ||
|
||
const editor = page.getByRole('region', { name: 'notebook content' }); | ||
await editor.getByRole('textbox').fill(RULERS_CONTENT); | ||
|
||
expect(await editor.screenshot()).toMatchSnapshot('codemirror-rulers.png'); | ||
}); | ||
}); |
Binary file added
BIN
+32.1 KB
.../jupyterlab/codemirror.test.ts-snapshots/codemirror-rulers-jupyterlab-linux.png
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