Skip to content

Commit d648ca0

Browse files
committed
[DO NOT MERGE]
1 parent 5d1023b commit d648ca0

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.github/workflows/cf_test_full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
type: choice
1111
options:
1212
- BISO
13+
- BRAPI Test
1314
- BRAPI Staging
1415
- BRAPI Production
1516
grep:

packages/playwright-cloudflare/tests/playwright.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export default defineConfig<{}, WorkerOptions>({
1616
binding: 'BROWSER',
1717
}
1818
},
19+
{
20+
name: 'BRAPI Test',
21+
use: {
22+
binding: 'BROWSER_BRAPI_TEST',
23+
}
24+
},
1925
{
2026
name: 'BRAPI Staging',
2127
use: {

packages/playwright-cloudflare/tests/src/server/testsServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class TestsServer extends DurableObject<Env> {
4646

4747
const timeout = parseInt(url.searchParams.get('timeout') ?? '10', 10) * 1000;
4848
const { testId, fullTitle, retry } = await request.json() as TestRequestPayload;
49-
const assetsUrl = url.origin.replace(/^http:/, 'https:');
49+
const assetsUrl = url.protocol === 'http:' ? url.origin : 'http://localhost:8001';
5050
const { env } = this;
5151
const context = { env, sessionId, assetsUrl, retry, binding };
5252
const testRunner = new TestRunner(context, { timeout });

packages/playwright-cloudflare/tests/src/skipTests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const skipTests: string[][] = [
2-
['library/har.spec.ts', 'should include content @smoke'],
32
['page/wheel.spec.ts', 'should dispatch wheel events @smoke'],
43
['page/wheel.spec.ts', 'should dispatch wheel events after popup was opened @smoke'],
54
['page/workers.spec.ts', 'Page.workers @smoke'],
@@ -13,5 +12,4 @@ export const skipErrorMessages: Array<string | RegExp> = [
1312
'createHttp2Server is not defined',
1413
/\[unenv\] .* is not implemented yet!/,
1514
/Received string:\s+"Cloudflare-Workers"/,
16-
'.rendering.cfdata.org',
1715
];

packages/playwright-cloudflare/tests/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { env } from 'cloudflare:workers';
22

33
import type { BrowserWorker } from '@cloudflare/playwright';
44

5-
export type BrowserBindingName = 'BROWSER' | 'BROWSER_BRAPI_STAGING' | 'BROWSER_BRAPI_PRODUCTION';
5+
export type BrowserBindingName = 'BROWSER' | 'BROWSER_BRAPI_TEST' | 'BROWSER_BRAPI_STAGING' | 'BROWSER_BRAPI_PRODUCTION';
66

77
export function getBinding(url: URL): BrowserWorker {
88
const bindingName = url.searchParams.get('binding');

0 commit comments

Comments
 (0)