Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3590df28db |
@@ -1,18 +0,0 @@
|
|||||||
import { test as base } from '@playwright/test';
|
|
||||||
|
|
||||||
// All e2e specs run hermetically against the mock transport. Neutralise the real
|
|
||||||
// telegram-web-app.js (loaded from the CDN in index.html) so the suite never blocks
|
|
||||||
// on telegram.org — it is unreachable from the CI runner, and a render-blocking
|
|
||||||
// <script> to it would hang every page load. Specs that exercise the Telegram launch
|
|
||||||
// inject their own window.Telegram via addInitScript before navigating.
|
|
||||||
export const test = base.extend({
|
|
||||||
page: async ({ page }, use) => {
|
|
||||||
await page.route('**/telegram-web-app.js', (route) =>
|
|
||||||
route.fulfill({ status: 200, contentType: 'application/javascript', body: '' }),
|
|
||||||
);
|
|
||||||
await use(page);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export { expect } from '@playwright/test';
|
|
||||||
export type { Page } from '@playwright/test';
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from './fixtures';
|
import { expect, test, type Page } from '@playwright/test';
|
||||||
|
|
||||||
// Behaviour/display coverage for the polished game screen, driven entirely by the mock
|
// Behaviour/display coverage for the polished game screen, driven entirely by the mock
|
||||||
// transport (no backend). These lock the round-1..4 interactions so future UI edits
|
// transport (no backend). These lock the round-1..4 interactions so future UI edits
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { expect, test } from './fixtures';
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
// The playable-slice smoke against the mock transport: guest login -> lobby shows the
|
// The playable-slice smoke against the mock transport: guest login -> lobby shows the
|
||||||
// seeded active game -> open it -> the board renders committed tiles -> place a rack
|
// seeded active game -> open it -> the board renders committed tiles -> place a rack
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { expect, test, type Page } from './fixtures';
|
import { expect, test, type Page } from '@playwright/test';
|
||||||
|
|
||||||
// Stage 8 social / account / history surfaces against the mock transport (no backend).
|
// Stage 8 social / account / history surfaces against the mock transport (no backend).
|
||||||
// The mock profile is a durable account, so friends, invitations, stats and the GCG
|
// The mock profile is a durable account, so friends, invitations, stats and the GCG
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
import { expect, test } from './fixtures';
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
// The shared fixture already neutralises the real telegram-web-app.js, so these
|
// Neutralise the real telegram-web-app.js (loaded from the CDN in index.html) so the
|
||||||
// specs control window.Telegram deterministically (injected below) with no network.
|
// test controls window.Telegram deterministically and needs no network.
|
||||||
|
test.beforeEach(async ({ page }) => {
|
||||||
|
await page.route('**/telegram-web-app.js', (r) =>
|
||||||
|
r.fulfill({ status: 200, contentType: 'application/javascript', body: '' }),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
// A minimal valid-looking Telegram WebApp stub: non-empty initData triggers the Mini
|
// A minimal valid-looking Telegram WebApp stub: non-empty initData triggers the Mini
|
||||||
// App launch path (the mock gateway accepts any initData and returns a durable
|
// App launch path (the mock gateway accepts any initData and returns a durable
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { expect, test } from './fixtures';
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
// Item 5: zooming the board must enlarge the labels too (a magnifying-glass zoom).
|
// Item 5: zooming the board must enlarge the labels too (a magnifying-glass zoom).
|
||||||
// cqw is sized against the zoom-scaled board, so the font grows with the cells.
|
// cqw is sized against the zoom-scaled board, so the font grows with the cells.
|
||||||
|
|||||||
Reference in New Issue
Block a user