From 7c430a0811dfef5f0104085f63bf77062584d595 Mon Sep 17 00:00:00 2001 From: Sebastian Pobocha Date: Sat, 18 Nov 2023 02:42:40 +0100 Subject: [PATCH] delete unnecessary --- package.json | 4 +--- playwright.config.ts | 20 -------------------- sandbox.config.json | 3 --- test/playwright.test.ts | 26 -------------------------- 4 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 playwright.config.ts delete mode 100644 sandbox.config.json delete mode 100644 test/playwright.test.ts diff --git a/package.json b/package.json index d9bfe23..5828098 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@examples/next-websockets-starter", + "name": "next-trpc-boostrap", "version": "10.43.6", "private": true, "engines": { @@ -28,7 +28,6 @@ "lint-fix": "pnpm lint --fix", "test-dev": "cross-env APP_ENV=test start-server-and-test dev 3000 test", "test-start": "cross-env APP_ENV=test WS_URL=ws://localhost:3000 start-server-and-test start 3000 test", - "test": "playwright test", "postinstall": "prisma generate" }, "prisma": { @@ -57,7 +56,6 @@ "zod": "^3.0.0" }, "devDependencies": { - "@playwright/test": "^1.26.1", "@tanstack/react-query-devtools": "^4.18.0", "@types/node": "^18.16.16", "@types/react": "^18.2.33", diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index 2c8c824..0000000 --- a/playwright.config.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { PlaywrightTestConfig, devices } from '@playwright/test'; - -const baseUrl = process.env.PLAYWRIGHT_TEST_BASE_URL || 'http://localhost:3000'; -console.log(`ℹ️ Using base URL "${baseUrl}"`); - -const opts = { - // launch headless on CI, in browser locally - headless: !!process.env.CI || !!process.env.PLAYWRIGHT_HEADLESS, - // collectCoverage: !!process.env.PLAYWRIGHT_HEADLESS -}; -const config: PlaywrightTestConfig = { - testDir: './test', - use: { - ...devices['Desktop Chrome'], - baseURL: baseUrl, - headless: opts.headless, - }, -}; - -export default config; diff --git a/sandbox.config.json b/sandbox.config.json deleted file mode 100644 index bcbf520..0000000 --- a/sandbox.config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "template": "next" -} diff --git a/test/playwright.test.ts b/test/playwright.test.ts deleted file mode 100644 index 95252ce..0000000 --- a/test/playwright.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { test } from '@playwright/test'; - -test.setTimeout(35e3); - -test('send message', async ({ browser, page }) => { - const viewer = await browser.newPage(); - await viewer.goto('/'); - - await page.goto('/api/auth/signin'); - await page.type('[name="name"]', 'test'); - await page.click('[type="submit"]'); - - const nonce = - Math.random() - .toString(36) - .replace(/[^a-z]+/g, '') - .slice(0, 6) || 'nonce'; - // await page.click('[type=submit]'); - await page.type('[name=text]', nonce); - await page.click('[type=submit]'); - - await viewer.waitForSelector(`text=${nonce}`); - viewer.close(); -}); - -export {};