Skip to content

Commit

Permalink
Add test for inspector tooltip showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed May 18, 2024
1 parent 44b82c8 commit 7af4505
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions galata/test/jupyterlab/inspector-tooltip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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');
const tooltip = page.locator(TOOLTIP_SELECTOR);
await expect(tooltip).toHaveCount(0);
await page.keyboard.press('Shift+Tab');
await expect(tooltip).toHaveCount(1);
await expect(tooltip).toContainText('int');
});
});

0 comments on commit 7af4505

Please sign in to comment.