From c076ce5b4413ff2135d07a3298dcc0a083d988fd Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Wed, 28 Aug 2024 16:12:30 +0800 Subject: [PATCH] Remove PWA test Created a new branch for this specific test, instead --- test-playwright/05-install-pwa.spec.ts | 27 -------------------------- 1 file changed, 27 deletions(-) delete mode 100644 test-playwright/05-install-pwa.spec.ts diff --git a/test-playwright/05-install-pwa.spec.ts b/test-playwright/05-install-pwa.spec.ts deleted file mode 100644 index aba9d0987..000000000 --- a/test-playwright/05-install-pwa.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -const { test, expect } = require('@playwright/test'); - -test('Install PWA', async ({ page, context }) => { - await page.goto('./'); - - // Wait for the service worker to register - await page.waitForSelector('service-worker-registered-indicator', { - timeout: 10000, // Adjust timeout according to your needs - }); - - // Trigger the install prompt manually - const [installPrompt] = await Promise.all([ - page.waitForEvent('beforeinstallprompt'), - page.evaluate(() => { - window.dispatchEvent(new Event('beforeinstallprompt')); - }), - ]); - - // Accept the install prompt - await installPrompt.prompt(); - - // Check if the PWA was installed successfully - const result = await installPrompt.userChoice; - expect(result.outcome).toBe('accepted'); - - // Additional checks go here -});