Добавлена Яндекс.Капча
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("PWA-манифест и Service Worker доступны", async ({ request }) => {
|
||||
const manifestResponse = await request.get("/manifest.json");
|
||||
expect(manifestResponse.ok()).toBe(true);
|
||||
const manifest = await manifestResponse.json();
|
||||
expect(manifest).toMatchObject({
|
||||
name: "HAN Chat",
|
||||
display: "standalone",
|
||||
icons: expect.arrayContaining([
|
||||
expect.objectContaining({ src: "/icon-192.png", sizes: "192x192" }),
|
||||
expect.objectContaining({ src: "/icon-512.png", sizes: "512x512" }),
|
||||
]),
|
||||
});
|
||||
|
||||
const serviceWorkerResponse = await request.get("/service-worker.js");
|
||||
expect(serviceWorkerResponse.ok()).toBe(true);
|
||||
expect(await serviceWorkerResponse.text()).toContain("precacheAndRoute");
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.route("**/api/v1/public/app-config", (route) => route.fulfill({
|
||||
json: {
|
||||
|
||||
Reference in New Issue
Block a user