Skip to content

Commit f92f907

Browse files
committed
simpler
1 parent 418f311 commit f92f907

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/e2e/pages/notebooks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ export class Notebooks {
110110
await test.step(`Open notebook: ${path}`, async () => {
111111
await this.quickaccess.openFileQuickAccessAndWait(basename(path), 1);
112112
await this.quickinput.selectQuickInputElement(0);
113-
await expect(this.code.driver.page.getByRole('progressbar')).not.toBeVisible({ timeout: 60000 });
113+
await expect(this.code.driver.page.locator('.cell').first()).toBeVisible({ timeout: 60000 });
114+
await expect(this.code.driver.page.getByText('Detecting Kernels')).not.toBeVisible({ timeout: 30000 });
114115
await this.focusFirstCell();
115116
});
116117
}

test/e2e/pages/notebooksPositron.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import test, { expect, Locator } from '@playwright/test';
1111
import { HotKeys } from './hotKeys.js';
1212
import { ContextMenu, MenuItemState } from './dialog-contextMenu.js';
1313
import { ACTIVE_STATUS_ICON, DISCONNECTED_STATUS_ICON, IDLE_STATUS_ICON, SessionState } from './sessions.js';
14-
import path from 'path';
14+
import { basename, relative } from 'path';
1515

1616
const DEFAULT_TIMEOUT = 10000;
1717

@@ -182,7 +182,8 @@ export class PositronNotebooks extends Notebooks {
182182
* @param path - The path to the notebook to open.
183183
*/
184184
async openNotebook(path: string): Promise<void> {
185-
await super.openNotebook(path);
185+
await this.quickaccess.openFileQuickAccessAndWait(basename(path), 1);
186+
await this.quickinput.selectQuickInputElement(0);
186187
await this.expectToBeVisible();
187188
}
188189

@@ -796,8 +797,8 @@ export class PositronNotebooks extends Notebooks {
796797
// Logging the screenshot path for easier debugging
797798
const info = test.info();
798799
const resolvedPath = info.snapshotPath(screenshotName);
799-
const resolvedFile = path.basename(resolvedPath);
800-
const repoRelativePath = path.relative(process.cwd(), resolvedPath).replace(/\\/g, '/');
800+
const resolvedFile = basename(resolvedPath);
801+
const repoRelativePath = relative(process.cwd(), resolvedPath).replace(/\\/g, '/');
801802
await info.attach(`${resolvedFile}.path.txt`, {
802803
body: Buffer.from(repoRelativePath, 'utf8'),
803804
contentType: 'text/plain',

0 commit comments

Comments
 (0)