forked from jupyterlab/jupyterlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport PR jupyterlab#16343: Fix
Shift + Tab
contextual help inspe…
…ctor tooltip regression
- Loading branch information
1 parent
f242f98
commit 2a41b8a
Showing
2 changed files
with
31 additions
and
1 deletion.
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,30 @@ | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
|
||
import { expect, test } from '@jupyterlab/galata'; | ||
|
||
const fileName = 'notebook.ipynb'; | ||
const TOOLTIP_SELECTOR = '.jp-Tooltip'; | ||
|
||
test.describe('Inspector (contextual help) tooltip', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.notebook.createNew(fileName); | ||
}); | ||
|
||
test('Should show up on Shift + Tab', async ({ page }) => { | ||
await page.notebook.setCell(0, 'code', 'int'); | ||
await page.notebook.enterCellEditingMode(0); | ||
// Ensure the cursor is at the end of the cell, after "int" | ||
await page.keyboard.press('End'); | ||
// Ensure kernel is ready | ||
await page.locator('text=| Idle').waitFor(); | ||
const tooltip = page.locator(TOOLTIP_SELECTOR); | ||
// There should be no tooltip yet | ||
await expect(tooltip).toHaveCount(0); | ||
// Invoke the tooltip | ||
await page.keyboard.press('Shift+Tab'); | ||
// There should be a tooltip now | ||
await expect(tooltip).toHaveCount(1); | ||
await expect(tooltip).toContainText('int'); | ||
}); | ||
}); |
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