fix(qa): inspect the refreshed HTML preview document
This commit is contained in:
@@ -91,8 +91,13 @@ try {
|
||||
await (await application.browserWindow(desktopPage)).evaluate(window => { window.showInactive(); window.setContentSize(1440, 960); });
|
||||
await desktopPage.locator('.connection.connected').waitFor(); await desktopPage.getByRole('combobox', { name: '当前项目', exact: true }).selectOption(project.id);
|
||||
await fileFlow(desktopPage, 'electron'); await overflow(desktopPage);
|
||||
const rejected = await desktopPage.frameLocator('iframe').locator('body').evaluate(() => ({ bridge: typeof window.desktopWorkbench, require: typeof window.require }));
|
||||
assert.deepEqual(rejected, { bridge: 'undefined', require: 'undefined' }); record('electron: preview subframe has no native bridge or Node');
|
||||
// A saved-file refresh replaces the iframe. Reacquire its actual document
|
||||
// for this read-only check if the old document detaches during inspection.
|
||||
await expect(async () => {
|
||||
const rejected = await desktopPage.frameLocator('iframe').locator('body').evaluate(() => ({ bridge: typeof window.desktopWorkbench, require: typeof window.require }));
|
||||
assert.deepEqual(rejected, { bridge: 'undefined', require: 'undefined' });
|
||||
}).toPass({ timeout: 10000 });
|
||||
record('electron: preview subframe has no native bridge or Node');
|
||||
await desktopPage.getByRole('button', { name: '源码', exact: true }).click();
|
||||
// Exercise the actual Windows openDirectory dialog contract with an explicit
|
||||
// cancelled fixture, without asking the user to select a test-only project.
|
||||
|
||||
Reference in New Issue
Block a user