Avoid importing os
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
import test from '@playwright/test';
|
import test from '@playwright/test';
|
||||||
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests';
|
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests';
|
||||||
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils';
|
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils';
|
||||||
import { platform } from 'os';
|
|
||||||
|
|
||||||
let ctx: ITestContext;
|
let ctx: ITestContext;
|
||||||
const ctxWrapper: ISharedRendererTestContext = { value: undefined } as any;
|
const ctxWrapper: ISharedRendererTestContext = { value: undefined } as any;
|
||||||
@@ -24,9 +23,7 @@ test.afterAll(async () => await ctx.page.close());
|
|||||||
test.describe('WebGL Renderer Integration Tests', async () => {
|
test.describe('WebGL Renderer Integration Tests', async () => {
|
||||||
// HACK: webgl2 is often not supported in headless firefox on Linux
|
// HACK: webgl2 is often not supported in headless firefox on Linux
|
||||||
// https://github.com/microsoft/playwright/issues/11566
|
// https://github.com/microsoft/playwright/issues/11566
|
||||||
if (platform() === 'linux') {
|
test.skip(({ browserName, userAgent}) => (userAgent?.includes('Linux') ?? false) && browserName === 'firefox');
|
||||||
test.skip(({ browserName }) => browserName === 'firefox');
|
|
||||||
}
|
|
||||||
|
|
||||||
injectSharedRendererTests(ctxWrapper);
|
injectSharedRendererTests(ctxWrapper);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user