From 39a7d3205f724ffc978cebf73043800d86066a69 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Thu, 18 Jul 2024 21:00:56 +0800
Subject: [PATCH 01/33] chore: adjust progress dialog
---
apps/www/src/app/components/progress-dialog.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/www/src/app/components/progress-dialog.tsx b/apps/www/src/app/components/progress-dialog.tsx
index 63ec10f0..51510933 100644
--- a/apps/www/src/app/components/progress-dialog.tsx
+++ b/apps/www/src/app/components/progress-dialog.tsx
@@ -36,7 +36,7 @@ export function ProgressDialog({
if (open) {
setProgress(0);
- const duration = 5000;
+ const duration = 7000;
const intervalTime = 100;
const totalIntervals = duration / intervalTime;
let currentInterval = 0;
From 0cb8463ffdb9e7e71a8baa138c86d4ff0a6c2710 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Fri, 19 Jul 2024 22:38:20 +0800
Subject: [PATCH 02/33] feat: implement e2e testing with playwright
---
.github/workflows/e2e.yml | 38 +++
packages/e2e/.gitignore | 5 +
packages/e2e/package.json | 17 ++
packages/e2e/playwright.config.ts | 78 ++++++
packages/e2e/tests/example.spec.ts | 18 ++
packages/e2e/tsconfig.json | 5 +
pnpm-lock.yaml | 400 ++++++++++++++++++++++++++---
turbo.json | 6 +
8 files changed, 538 insertions(+), 29 deletions(-)
create mode 100644 .github/workflows/e2e.yml
create mode 100644 packages/e2e/.gitignore
create mode 100644 packages/e2e/package.json
create mode 100644 packages/e2e/playwright.config.ts
create mode 100644 packages/e2e/tests/example.spec.ts
create mode 100644 packages/e2e/tsconfig.json
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
new file mode 100644
index 00000000..2aa4c11b
--- /dev/null
+++ b/.github/workflows/e2e.yml
@@ -0,0 +1,38 @@
+name: E2E Tests
+
+on:
+ push:
+ branches:
+ - "**"
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ test:
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: pnpm/action-setup@v4
+ with:
+ version: 9.5.0
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: "pnpm"
+
+ - name: Install Playwright Browsers
+ run: pnpm exec playwright install --with-deps
+
+ - name: Run Playwright tests
+ run: pnpm exec playwright test
+
+ - uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: playwright-report
+ path: playwright-report/
+ retention-days: 30
diff --git a/packages/e2e/.gitignore b/packages/e2e/.gitignore
new file mode 100644
index 00000000..68c5d18f
--- /dev/null
+++ b/packages/e2e/.gitignore
@@ -0,0 +1,5 @@
+node_modules/
+/test-results/
+/playwright-report/
+/blob-report/
+/playwright/.cache/
diff --git a/packages/e2e/package.json b/packages/e2e/package.json
new file mode 100644
index 00000000..6257059e
--- /dev/null
+++ b/packages/e2e/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "@umamin/e2e",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "dev:test": "playwright test",
+ "e2e:test": "start-server-and-test \"(cd ../../apps/www && pnpm start)\" http://localhost:3000 \"playwright test\"",
+ "clean": "rm -rf ./node_modules .turbo dist"
+ },
+ "devDependencies": {
+ "@playwright/test": "^1.45.2",
+ "@types/node": "^20.14.11",
+ "@umamin/tsconfig": "workspace:*",
+ "start-server-and-test": "^2.0.4",
+ "typescript": "^5.4.5"
+ }
+}
diff --git a/packages/e2e/playwright.config.ts b/packages/e2e/playwright.config.ts
new file mode 100644
index 00000000..2fae2ea6
--- /dev/null
+++ b/packages/e2e/playwright.config.ts
@@ -0,0 +1,78 @@
+import { defineConfig, devices } from '@playwright/test';
+
+/**
+ * Read environment variables from file.
+ * https://github.com/motdotla/dotenv
+ */
+// import dotenv from 'dotenv';
+// dotenv.config({ path: path.resolve(__dirname, '.env') });
+
+/**
+ * See https://playwright.dev/docs/test-configuration.
+ */
+export default defineConfig({
+ testDir: './tests',
+ /* Run tests in files in parallel */
+ fullyParallel: true,
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
+ forbidOnly: !!process.env.CI,
+ /* Retry on CI only */
+ retries: process.env.CI ? 2 : 0,
+ /* Opt out of parallel tests on CI. */
+ workers: process.env.CI ? 1 : undefined,
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
+ reporter: 'html',
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
+ use: {
+ /* Base URL to use in actions like `await page.goto('/')`. */
+ baseURL: 'http://localhost:3000',
+
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
+ trace: 'on-first-retry',
+ },
+
+ /* Configure projects for major browsers */
+ projects: [
+ {
+ name: 'chromium',
+ use: { ...devices['Desktop Chrome'] },
+ },
+
+ {
+ name: 'firefox',
+ use: { ...devices['Desktop Firefox'] },
+ },
+
+ {
+ name: 'webkit',
+ use: { ...devices['Desktop Safari'] },
+ },
+
+ /* Test against mobile viewports. */
+ // {
+ // name: 'Mobile Chrome',
+ // use: { ...devices['Pixel 5'] },
+ // },
+ // {
+ // name: 'Mobile Safari',
+ // use: { ...devices['iPhone 12'] },
+ // },
+
+ /* Test against branded browsers. */
+ // {
+ // name: 'Microsoft Edge',
+ // use: { ...devices['Desktop Edge'], channel: 'msedge' },
+ // },
+ // {
+ // name: 'Google Chrome',
+ // use: { ...devices['Desktop Chrome'], channel: 'chrome' },
+ // },
+ ],
+
+ /* Run your local dev server before starting the tests */
+ // webServer: {
+ // command: 'npm run start',
+ // url: 'http://127.0.0.1:3000',
+ // reuseExistingServer: !process.env.CI,
+ // },
+});
diff --git a/packages/e2e/tests/example.spec.ts b/packages/e2e/tests/example.spec.ts
new file mode 100644
index 00000000..462a2d84
--- /dev/null
+++ b/packages/e2e/tests/example.spec.ts
@@ -0,0 +1,18 @@
+import { test, expect } from '@playwright/test';
+
+test('has title', async ({ page }) => {
+ await page.goto('/');
+
+ // Expect a title "to contain" a substring.
+ await expect(page).toHaveTitle(/Playwright/);
+});
+
+test('get started link', async ({ page }) => {
+ await page.goto('/');
+
+ // Click the get started link.
+ await page.getByRole('link', { name: 'Get started' }).click();
+
+ // Expects page to have a heading with the name of Installation.
+ await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
+});
diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json
new file mode 100644
index 00000000..95409e73
--- /dev/null
+++ b/packages/e2e/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "extends": "@umamin/tsconfig/base.json",
+ "include": ["."],
+ "exclude": ["node_modules", "dist"]
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3cd24d41..dc2c551f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -52,13 +52,13 @@ importers:
version: 7.1.1(@urql/core@5.0.4(graphql@16.8.1))(graphql@16.8.1)
'@urql/next':
specifier: ^1.1.1
- version: 1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))
+ version: 1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))
arctic:
specifier: ^1.8.1
version: 1.9.1
geist:
specifier: ^1.3.0
- version: 1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ version: 1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
gql.tada:
specifier: ^1.7.5
version: 1.7.5(graphql@16.8.1)(svelte@4.2.18)(typescript@5.4.5)
@@ -76,10 +76,10 @@ importers:
version: 5.0.7
next:
specifier: 14.2.3
- version: 14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nextjs-toploader:
specifier: ^1.6.12
- version: 1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
oslo:
specifier: ^1.2.0
version: 1.2.0
@@ -161,7 +161,7 @@ importers:
version: 1.8.3
'@sentry/nextjs':
specifier: ^8
- version: 8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)
+ version: 8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)
'@types/mdx':
specifier: ^2.0.13
version: 2.0.13
@@ -188,7 +188,7 @@ importers:
version: 4.3.0(@urql/core@5.0.4(graphql@16.9.0))
'@urql/next':
specifier: ^1.1.1
- version: 1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))
+ version: 1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))
arctic:
specifier: ^1.9.1
version: 1.9.1
@@ -206,7 +206,7 @@ importers:
version: 10.12.2
geist:
specifier: ^1.3.0
- version: 1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ version: 1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
gql.tada:
specifier: ^1.8.2
version: 1.8.2(graphql@16.9.0)(svelte@4.2.18)(typescript@5.4.5)
@@ -230,13 +230,13 @@ importers:
version: 5.0.7
next:
specifier: 14.2.5
- version: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next-themes:
specifier: ^0.3.0
version: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nextjs-toploader:
specifier: ^1.6.12
- version: 1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
oslo:
specifier: ^1.2.1
version: 1.2.1
@@ -348,6 +348,24 @@ importers:
specifier: ^5.4.5
version: 5.4.5
+ packages/e2e:
+ devDependencies:
+ '@playwright/test':
+ specifier: ^1.45.2
+ version: 1.45.2
+ '@types/node':
+ specifier: ^20.14.11
+ version: 20.14.11
+ '@umamin/tsconfig':
+ specifier: workspace:*
+ version: link:../tsconfig
+ start-server-and-test:
+ specifier: ^2.0.4
+ version: 2.0.4
+ typescript:
+ specifier: ^5.4.5
+ version: 5.4.5
+
packages/eslint:
devDependencies:
'@typescript-eslint/eslint-plugin':
@@ -1322,6 +1340,12 @@ packages:
engines: {node: '>=6'}
hasBin: true
+ '@hapi/hoek@9.3.0':
+ resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==}
+
+ '@hapi/topo@5.1.0':
+ resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==}
+
'@hookform/resolvers@3.6.0':
resolution: {integrity: sha512-UBcpyOX3+RR+dNnqBd0lchXpoL8p4xC21XP8H6Meb8uve5Br1GCnmg0PcBoKKqPKgGu9GHQ/oygcmPrQhetwqw==}
peerDependencies:
@@ -2021,6 +2045,11 @@ packages:
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+ '@playwright/test@1.45.2':
+ resolution: {integrity: sha512-JxG9eq92ET75EbVi3s+4sYbcG7q72ECeZNbdBlaMkGcNbiDQ4cAi8U2QP5oKkOx+1gpaiL1LDStmzCaEM1Z6fQ==}
+ engines: {node: '>=18'}
+ hasBin: true
+
'@pothos/core@4.0.2':
resolution: {integrity: sha512-8jjHGoHmEt8Y28kvXD4PS6Rb51Ds4cXiQ4rY4dPM80fDEv+6ONm2qgdlPHOKcB6DeFMiZhfc3gzaIeXvk+4RbA==}
peerDependencies:
@@ -2689,6 +2718,15 @@ packages:
peerDependencies:
webpack: '>=4.40.0'
+ '@sideway/address@4.1.5':
+ resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==}
+
+ '@sideway/formula@3.0.1':
+ resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==}
+
+ '@sideway/pinpoint@2.0.0':
+ resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==}
+
'@swc/counter@0.1.3':
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
@@ -2751,6 +2789,9 @@ packages:
'@types/node@20.14.10':
resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==}
+ '@types/node@20.14.11':
+ resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==}
+
'@types/node@20.14.2':
resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==}
@@ -3256,6 +3297,9 @@ packages:
resolution: {integrity: sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==}
hasBin: true
+ asynckit@0.4.0:
+ resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
+
autoprefixer@10.4.19:
resolution: {integrity: sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==}
engines: {node: ^10 || ^12 || >=14}
@@ -3275,6 +3319,9 @@ packages:
resolution: {integrity: sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==}
engines: {node: '>=4'}
+ axios@1.7.2:
+ resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==}
+
axobject-query@3.1.1:
resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==}
@@ -3294,6 +3341,9 @@ packages:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'}
+ bluebird@3.7.2:
+ resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==}
+
brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
@@ -3373,6 +3423,10 @@ packages:
character-reference-invalid@2.0.1:
resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==}
+ check-more-types@2.24.0:
+ resolution: {integrity: sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==}
+ engines: {node: '>= 0.8.0'}
+
chokidar@3.6.0:
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
engines: {node: '>= 8.10.0'}
@@ -3429,6 +3483,10 @@ packages:
color-name@1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
+ combined-stream@1.0.8:
+ resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
+ engines: {node: '>= 0.8'}
+
comma-separated-tokens@2.0.3:
resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
@@ -3534,6 +3592,10 @@ packages:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
+ delayed-stream@1.0.0:
+ resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
+ engines: {node: '>=0.4.0'}
+
dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'}
@@ -3679,6 +3741,9 @@ packages:
resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==}
engines: {node: '>=4'}
+ duplexer@0.1.2:
+ resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
+
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
@@ -3997,10 +4062,17 @@ packages:
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
engines: {node: '>=0.10.0'}
+ event-stream@3.3.4:
+ resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==}
+
events@3.3.0:
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
engines: {node: '>=0.8.x'}
+ execa@5.1.1:
+ resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
+ engines: {node: '>=10'}
+
extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
@@ -4060,6 +4132,15 @@ packages:
flatted@3.3.1:
resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==}
+ follow-redirects@1.15.6:
+ resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==}
+ engines: {node: '>=4.0'}
+ peerDependencies:
+ debug: '*'
+ peerDependenciesMeta:
+ debug:
+ optional: true
+
for-each@0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
@@ -4067,6 +4148,10 @@ packages:
resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
engines: {node: '>=14'}
+ form-data@4.0.0:
+ resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
+ engines: {node: '>= 6'}
+
formdata-polyfill@4.0.10:
resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==}
engines: {node: '>=12.20.0'}
@@ -4074,12 +4159,20 @@ packages:
fraction.js@4.3.7:
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
+ from@0.1.7:
+ resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==}
+
fs-monkey@1.0.6:
resolution: {integrity: sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==}
fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
+ fsevents@2.3.2:
+ resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -4120,6 +4213,10 @@ packages:
resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==}
engines: {node: '>=12'}
+ get-stream@6.0.1:
+ resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
+ engines: {node: '>=10'}
+
get-symbol-description@1.0.2:
resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==}
engines: {node: '>= 0.4'}
@@ -4289,6 +4386,10 @@ packages:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
+ human-signals@2.1.0:
+ resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
+ engines: {node: '>=10.17.0'}
+
idb@7.1.1:
resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==}
@@ -4452,6 +4553,10 @@ packages:
resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==}
engines: {node: '>= 0.4'}
+ is-stream@2.0.1:
+ resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
+ engines: {node: '>=8'}
+
is-string@1.0.7:
resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}
engines: {node: '>= 0.4'}
@@ -4503,6 +4608,9 @@ packages:
jju@1.4.0:
resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==}
+ joi@17.13.3:
+ resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==}
+
js-base64@3.7.7:
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
@@ -4562,6 +4670,10 @@ packages:
resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==}
engines: {node: '>=0.10'}
+ lazy-ass@1.6.0:
+ resolution: {integrity: sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==}
+ engines: {node: '> 0.8'}
+
levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -4655,6 +4767,9 @@ packages:
resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}
engines: {node: '>=12'}
+ map-stream@0.1.0:
+ resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==}
+
markdown-extensions@2.0.0:
resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==}
engines: {node: '>=16'}
@@ -4844,6 +4959,10 @@ packages:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
+ mimic-fn@2.1.0:
+ resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
+ engines: {node: '>=6'}
+
min-indent@1.0.1:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'}
@@ -4995,6 +5114,10 @@ packages:
resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==}
engines: {node: '>=0.10.0'}
+ npm-run-path@4.0.1:
+ resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
+ engines: {node: '>=8'}
+
nprogress@0.2.0:
resolution: {integrity: sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA==}
@@ -5044,6 +5167,10 @@ packages:
once@1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
+ onetime@5.1.2:
+ resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
+ engines: {node: '>=6'}
+
opentelemetry-instrumentation-fetch-node@1.2.3:
resolution: {integrity: sha512-Qb11T7KvoCevMaSeuamcLsAD+pZnavkhDnlVL0kRozfhl42dKG5Q3anUklAFKJZjY3twLR+BnRa6DlwwkIE/+A==}
engines: {node: '>18.0.0'}
@@ -5120,6 +5247,9 @@ packages:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
+ pause-stream@0.0.11:
+ resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==}
+
periscopic@3.1.0:
resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==}
@@ -5149,6 +5279,16 @@ packages:
resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}
engines: {node: '>= 6'}
+ playwright-core@1.45.2:
+ resolution: {integrity: sha512-ha175tAWb0dTK0X4orvBIqi3jGEt701SMxMhyujxNrgd8K0Uy5wMSwwcQHtyB4om7INUkfndx02XnQ2p6dvLDw==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ playwright@1.45.2:
+ resolution: {integrity: sha512-ReywF2t/0teRvNBpfIgh5e4wnrI/8Su8ssdo5XsQKpjxJj+jspm00jSoz9BTg91TT0c9HRjXO7LBNVrgYj9X0g==}
+ engines: {node: '>=18'}
+ hasBin: true
+
pluralize@8.0.0:
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'}
@@ -5259,6 +5399,11 @@ packages:
proxy-from-env@1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
+ ps-tree@1.2.0:
+ resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==}
+ engines: {node: '>= 0.10'}
+ hasBin: true
+
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -5421,6 +5566,9 @@ packages:
run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
+ rxjs@7.8.1:
+ resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
+
safe-array-concat@1.1.2:
resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==}
engines: {node: '>=0.4'}
@@ -5478,6 +5626,9 @@ packages:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
engines: {node: '>= 0.4'}
+ signal-exit@3.0.7:
+ resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
+
signal-exit@4.1.0:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
@@ -5533,14 +5684,25 @@ packages:
spdx-license-ids@3.0.18:
resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==}
+ split@0.3.3:
+ resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==}
+
stacktrace-parser@0.1.10:
resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==}
engines: {node: '>=6'}
+ start-server-and-test@2.0.4:
+ resolution: {integrity: sha512-CKNeBTcP0hVqIlNismHMudb9q3lLdAjcVPO13/7gfI66fcJpeIb/o4NzQd1JK/CD+lfWVqr10ZH9Y14+OwlJuw==}
+ engines: {node: '>=16'}
+ hasBin: true
+
stop-iteration-iterator@1.0.0:
resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==}
engines: {node: '>= 0.4'}
+ stream-combiner@0.0.4:
+ resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==}
+
streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
@@ -5586,6 +5748,10 @@ packages:
resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
engines: {node: '>=4'}
+ strip-final-newline@2.0.0:
+ resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
+ engines: {node: '>=6'}
+
strip-indent@3.0.0:
resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
engines: {node: '>=8'}
@@ -5702,6 +5868,9 @@ packages:
thenify@3.3.1:
resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
+ through@2.3.8:
+ resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
+
to-fast-properties@2.0.0:
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
engines: {node: '>=4'}
@@ -5933,6 +6102,11 @@ packages:
vue-template-compiler@2.7.16:
resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==}
+ wait-on@7.2.0:
+ resolution: {integrity: sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==}
+ engines: {node: '>=12.0.0'}
+ hasBin: true
+
watchpack@2.4.1:
resolution: {integrity: sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==}
engines: {node: '>=10.13.0'}
@@ -6969,7 +7143,7 @@ snapshots:
'@grpc/grpc-js@1.9.15':
dependencies:
'@grpc/proto-loader': 0.7.13
- '@types/node': 20.14.5
+ '@types/node': 20.14.10
'@grpc/proto-loader@0.7.13':
dependencies:
@@ -6978,6 +7152,12 @@ snapshots:
protobufjs: 7.3.0
yargs: 17.7.2
+ '@hapi/hoek@9.3.0': {}
+
+ '@hapi/topo@5.1.0':
+ dependencies:
+ '@hapi/hoek': 9.3.0
+
'@hookform/resolvers@3.6.0(react-hook-form@7.51.5(react@18.3.1))':
dependencies:
react-hook-form: 7.51.5(react@18.3.1)
@@ -7636,6 +7816,10 @@ snapshots:
'@pkgr/core@0.1.1': {}
+ '@playwright/test@1.45.2':
+ dependencies:
+ playwright: 1.45.2
+
'@pothos/core@4.0.2(graphql@16.9.0)':
dependencies:
graphql: 16.9.0
@@ -8287,7 +8471,7 @@ snapshots:
'@sentry/types': 8.17.0
'@sentry/utils': 8.17.0
- '@sentry/nextjs@8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)':
+ '@sentry/nextjs@8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)':
dependencies:
'@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/api@1.9.0)
'@opentelemetry/semantic-conventions': 1.25.1
@@ -8301,7 +8485,7 @@ snapshots:
'@sentry/vercel-edge': 8.17.0
'@sentry/webpack-plugin': 2.20.1(webpack@5.92.1)
chalk: 3.0.0
- next: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
resolve: 1.22.8
rollup: 3.29.4
stacktrace-parser: 0.1.10
@@ -8392,6 +8576,14 @@ snapshots:
- encoding
- supports-color
+ '@sideway/address@4.1.5':
+ dependencies:
+ '@hapi/hoek': 9.3.0
+
+ '@sideway/formula@3.0.1': {}
+
+ '@sideway/pinpoint@2.0.0': {}
+
'@swc/counter@0.1.3': {}
'@swc/helpers@0.5.5':
@@ -8469,6 +8661,10 @@ snapshots:
dependencies:
undici-types: 5.26.5
+ '@types/node@20.14.11':
+ dependencies:
+ undici-types: 5.26.5
+
'@types/node@20.14.2':
dependencies:
undici-types: 5.26.5
@@ -8510,7 +8706,7 @@ snapshots:
'@types/ws@8.5.10':
dependencies:
- '@types/node': 20.14.2
+ '@types/node': 20.14.10
'@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)':
dependencies:
@@ -8797,15 +8993,15 @@ snapshots:
'@urql/core': 5.0.4(graphql@16.9.0)
wonka: 6.3.4
- '@urql/next@1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))':
+ '@urql/next@1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))':
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
urql: 4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1)
- '@urql/next@1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))':
+ '@urql/next@1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))':
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
urql: 4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1)
@@ -9174,6 +9370,8 @@ snapshots:
astring@1.8.6: {}
+ asynckit@0.4.0: {}
+
autoprefixer@10.4.19(postcss@8.4.38):
dependencies:
browserslist: 4.23.1
@@ -9192,6 +9390,14 @@ snapshots:
axe-core@4.9.1: {}
+ axios@1.7.2(debug@4.3.5):
+ dependencies:
+ follow-redirects: 1.15.6(debug@4.3.5)
+ form-data: 4.0.0
+ proxy-from-env: 1.1.0
+ transitivePeerDependencies:
+ - debug
+
axobject-query@3.1.1:
dependencies:
deep-equal: 2.2.3
@@ -9210,6 +9416,8 @@ snapshots:
binary-extensions@2.3.0: {}
+ bluebird@3.7.2: {}
+
brace-expansion@1.1.11:
dependencies:
balanced-match: 1.0.2
@@ -9289,6 +9497,8 @@ snapshots:
character-reference-invalid@2.0.1: {}
+ check-more-types@2.24.0: {}
+
chokidar@3.6.0:
dependencies:
anymatch: 3.1.3
@@ -9349,6 +9559,10 @@ snapshots:
color-name@1.1.4: {}
+ combined-stream@1.0.8:
+ dependencies:
+ delayed-stream: 1.0.0
+
comma-separated-tokens@2.0.3: {}
commander@2.20.3: {}
@@ -9457,6 +9671,8 @@ snapshots:
has-property-descriptors: 1.0.2
object-keys: 1.1.1
+ delayed-stream@1.0.0: {}
+
dequal@2.0.3: {}
detect-indent@7.0.1: {}
@@ -9509,6 +9725,8 @@ snapshots:
dset@3.1.3: {}
+ duplexer@0.1.2: {}
+
eastasianwidth@0.2.0: {}
electron-to-chromium@1.4.798: {}
@@ -10134,8 +10352,30 @@ snapshots:
esutils@2.0.3: {}
+ event-stream@3.3.4:
+ dependencies:
+ duplexer: 0.1.2
+ from: 0.1.7
+ map-stream: 0.1.0
+ pause-stream: 0.0.11
+ split: 0.3.3
+ stream-combiner: 0.0.4
+ through: 2.3.8
+
events@3.3.0: {}
+ execa@5.1.1:
+ dependencies:
+ cross-spawn: 7.0.3
+ get-stream: 6.0.1
+ human-signals: 2.1.0
+ is-stream: 2.0.1
+ merge-stream: 2.0.0
+ npm-run-path: 4.0.1
+ onetime: 5.1.2
+ signal-exit: 3.0.7
+ strip-final-newline: 2.0.0
+
extend@3.0.2: {}
fast-decode-uri-component@1.0.1: {}
@@ -10229,6 +10469,10 @@ snapshots:
flatted@3.3.1: {}
+ follow-redirects@1.15.6(debug@4.3.5):
+ optionalDependencies:
+ debug: 4.3.5
+
for-each@0.3.3:
dependencies:
is-callable: 1.2.7
@@ -10238,17 +10482,28 @@ snapshots:
cross-spawn: 7.0.3
signal-exit: 4.1.0
+ form-data@4.0.0:
+ dependencies:
+ asynckit: 0.4.0
+ combined-stream: 1.0.8
+ mime-types: 2.1.35
+
formdata-polyfill@4.0.10:
dependencies:
fetch-blob: 3.2.0
fraction.js@4.3.7: {}
+ from@0.1.7: {}
+
fs-monkey@1.0.6:
optional: true
fs.realpath@1.0.0: {}
+ fsevents@2.3.2:
+ optional: true
+
fsevents@2.3.3:
optional: true
@@ -10263,13 +10518,13 @@ snapshots:
functions-have-names@1.2.3: {}
- geist@1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
+ geist@1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- geist@1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
+ geist@1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
gensync@1.0.0-beta.2: {}
@@ -10287,6 +10542,8 @@ snapshots:
get-stdin@9.0.0: {}
+ get-stream@6.0.1: {}
+
get-symbol-description@1.0.2:
dependencies:
call-bind: 1.0.7
@@ -10527,6 +10784,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ human-signals@2.1.0: {}
+
idb@7.1.1: {}
ignore@5.3.1: {}
@@ -10683,6 +10942,8 @@ snapshots:
dependencies:
call-bind: 1.0.7
+ is-stream@2.0.1: {}
+
is-string@1.0.7:
dependencies:
has-tostringtag: 1.0.2
@@ -10732,7 +10993,7 @@ snapshots:
jest-worker@27.5.1:
dependencies:
- '@types/node': 20.14.10
+ '@types/node': 20.14.11
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -10740,6 +11001,14 @@ snapshots:
jju@1.4.0: {}
+ joi@17.13.3:
+ dependencies:
+ '@hapi/hoek': 9.3.0
+ '@hapi/topo': 5.1.0
+ '@sideway/address': 4.1.5
+ '@sideway/formula': 3.0.1
+ '@sideway/pinpoint': 2.0.0
+
js-base64@3.7.7: {}
js-tokens@4.0.0: {}
@@ -10785,6 +11054,8 @@ snapshots:
dependencies:
language-subtag-registry: 0.3.23
+ lazy-ass@1.6.0: {}
+
levn@0.4.1:
dependencies:
prelude-ls: 1.2.1
@@ -10871,6 +11142,8 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
+ map-stream@0.1.0: {}
+
markdown-extensions@2.0.0: {}
markdown-table@3.0.3: {}
@@ -11329,6 +11602,8 @@ snapshots:
dependencies:
mime-db: 1.52.0
+ mimic-fn@2.1.0: {}
+
min-indent@1.0.1: {}
minimatch@3.1.2:
@@ -11386,7 +11661,7 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 14.2.3
'@swc/helpers': 0.5.5
@@ -11408,11 +11683,12 @@ snapshots:
'@next/swc-win32-ia32-msvc': 14.2.3
'@next/swc-win32-x64-msvc': 14.2.3
'@opentelemetry/api': 1.9.0
+ '@playwright/test': 1.45.2
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
- next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 14.2.5
'@swc/helpers': 0.5.5
@@ -11434,21 +11710,22 @@ snapshots:
'@next/swc-win32-ia32-msvc': 14.2.5
'@next/swc-win32-x64-msvc': 14.2.5
'@opentelemetry/api': 1.9.0
+ '@playwright/test': 1.45.2
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
- nextjs-toploader@1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nextjs-toploader@1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nprogress: 0.2.0
prop-types: 15.8.1
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- nextjs-toploader@1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nextjs-toploader@1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nprogress: 0.2.0
prop-types: 15.8.1
react: 18.3.1
@@ -11484,6 +11761,10 @@ snapshots:
normalize-range@0.1.2: {}
+ npm-run-path@4.0.1:
+ dependencies:
+ path-key: 3.1.1
+
nprogress@0.2.0: {}
object-assign@4.1.1: {}
@@ -11541,6 +11822,10 @@ snapshots:
dependencies:
wrappy: 1.0.2
+ onetime@5.1.2:
+ dependencies:
+ mimic-fn: 2.1.0
+
opentelemetry-instrumentation-fetch-node@1.2.3(@opentelemetry/api@1.9.0):
dependencies:
'@opentelemetry/api': 1.9.0
@@ -11631,6 +11916,10 @@ snapshots:
path-type@4.0.0: {}
+ pause-stream@0.0.11:
+ dependencies:
+ through: 2.3.8
+
periscopic@3.1.0:
dependencies:
'@types/estree': 1.0.5
@@ -11657,6 +11946,14 @@ snapshots:
pirates@4.0.6: {}
+ playwright-core@1.45.2: {}
+
+ playwright@1.45.2:
+ dependencies:
+ playwright-core: 1.45.2
+ optionalDependencies:
+ fsevents: 2.3.2
+
pluralize@8.0.0: {}
possible-typed-array-names@1.0.0: {}
@@ -11754,11 +12051,15 @@ snapshots:
'@protobufjs/path': 1.1.2
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
- '@types/node': 20.14.5
+ '@types/node': 20.14.10
long: 5.2.3
proxy-from-env@1.1.0: {}
+ ps-tree@1.2.0:
+ dependencies:
+ event-stream: 3.3.4
+
punycode@2.3.1: {}
queue-microtask@1.2.3: {}
@@ -11951,6 +12252,10 @@ snapshots:
dependencies:
queue-microtask: 1.2.3
+ rxjs@7.8.1:
+ dependencies:
+ tslib: 2.6.3
+
safe-array-concat@1.1.2:
dependencies:
call-bind: 1.0.7
@@ -12017,6 +12322,8 @@ snapshots:
get-intrinsic: 1.2.4
object-inspect: 1.13.1
+ signal-exit@3.0.7: {}
+
signal-exit@4.1.0: {}
slash@3.0.0: {}
@@ -12068,14 +12375,35 @@ snapshots:
spdx-license-ids@3.0.18: {}
+ split@0.3.3:
+ dependencies:
+ through: 2.3.8
+
stacktrace-parser@0.1.10:
dependencies:
type-fest: 0.7.1
+ start-server-and-test@2.0.4:
+ dependencies:
+ arg: 5.0.2
+ bluebird: 3.7.2
+ check-more-types: 2.24.0
+ debug: 4.3.5
+ execa: 5.1.1
+ lazy-ass: 1.6.0
+ ps-tree: 1.2.0
+ wait-on: 7.2.0(debug@4.3.5)
+ transitivePeerDependencies:
+ - supports-color
+
stop-iteration-iterator@1.0.0:
dependencies:
internal-slot: 1.0.7
+ stream-combiner@0.0.4:
+ dependencies:
+ duplexer: 0.1.2
+
streamsearch@1.1.0: {}
string-width@4.2.3:
@@ -12144,6 +12472,8 @@ snapshots:
strip-bom@3.0.0: {}
+ strip-final-newline@2.0.0: {}
+
strip-indent@3.0.0:
dependencies:
min-indent: 1.0.1
@@ -12286,6 +12616,8 @@ snapshots:
dependencies:
any-promise: 1.3.0
+ through@2.3.8: {}
+
to-fast-properties@2.0.0: {}
to-regex-range@5.0.1:
@@ -12540,6 +12872,16 @@ snapshots:
de-indent: 1.0.2
he: 1.2.0
+ wait-on@7.2.0(debug@4.3.5):
+ dependencies:
+ axios: 1.7.2(debug@4.3.5)
+ joi: 17.13.3
+ lodash: 4.17.21
+ minimist: 1.2.8
+ rxjs: 7.8.1
+ transitivePeerDependencies:
+ - debug
+
watchpack@2.4.1:
dependencies:
glob-to-regexp: 0.4.1
diff --git a/turbo.json b/turbo.json
index d416c92e..ea386348 100644
--- a/turbo.json
+++ b/turbo.json
@@ -20,6 +20,12 @@
"NEXT_RUNTIME"
]
},
+ "dev:test": {
+ "cache": false
+ },
+ "e2e:test": {
+ "dependsOn": ["^build"]
+ },
"lint": {
"dependsOn": ["^lint"]
},
From 37d745e2e184acee2bbc0ac744d694b332bc5255 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sat, 20 Jul 2024 16:00:35 +0800
Subject: [PATCH 03/33] chore(ci): remove matrix strategy
---
.github/workflows/ci.yml | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf586111..cf5e651f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,21 +11,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [20]
steps:
- uses: actions/checkout@v4
- - name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.5.0
- - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
- node-version: ${{ matrix.node-version }}
+ node-version: 20
cache: "pnpm"
- name: Install dependencies
From 8483e06f7e6991ef37bd1caa308e48701057ef19 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sat, 20 Jul 2024 16:18:01 +0800
Subject: [PATCH 04/33] chore: update: test placeholder
---
packages/e2e/tests/example.spec.ts | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/packages/e2e/tests/example.spec.ts b/packages/e2e/tests/example.spec.ts
index 462a2d84..5d99afbb 100644
--- a/packages/e2e/tests/example.spec.ts
+++ b/packages/e2e/tests/example.spec.ts
@@ -1,18 +1,20 @@
-import { test, expect } from '@playwright/test';
+import { test, expect } from "@playwright/test";
-test('has title', async ({ page }) => {
- await page.goto('/');
+test("has title", async ({ page }) => {
+ await page.goto("/");
// Expect a title "to contain" a substring.
- await expect(page).toHaveTitle(/Playwright/);
+ await expect(page).toHaveTitle(/Umamin — The Platform for Anonymity/);
});
-test('get started link', async ({ page }) => {
- await page.goto('/');
+test("umamin social link", async ({ page }) => {
+ await page.goto("/");
// Click the get started link.
- await page.getByRole('link', { name: 'Get started' }).click();
+ await page.getByRole("link", { name: "Umamin Social" }).click();
// Expects page to have a heading with the name of Installation.
- await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
+ await expect(
+ page.getByRole("heading", { name: "Umamin Social" })
+ ).toBeVisible();
});
From ddbc4d26faf13435be5786abcf4b2f705aef5305 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sat, 20 Jul 2024 16:22:46 +0800
Subject: [PATCH 05/33] fix(ci): install deps in e2e workflow
---
.github/workflows/e2e.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 2aa4c11b..4e26eb90 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -24,6 +24,9 @@ jobs:
node-version: 20
cache: "pnpm"
+ - name: Install dependencies
+ run: pnpm install
+
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
From 1157b0ab0593520939ed5ca3ca435142fdb73e4b Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sat, 20 Jul 2024 16:25:26 +0800
Subject: [PATCH 06/33] fix(ci): revert matrix strategy
---
.github/workflows/ci.yml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cf5e651f..bf586111 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,16 +11,21 @@ on:
jobs:
build:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ node-version: [20]
steps:
- uses: actions/checkout@v4
+ - name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.5.0
+ - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
- node-version: 20
+ node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
From ec3ae1da86f224ebde7b0495d59a7fdc5410759e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Josh=20Daniel=20Ba=C3=B1ares?=
Date: Sun, 21 Jul 2024 16:53:00 +0800
Subject: [PATCH 07/33] chore: add ci command for e2e (#226)
* chore: add ci command for e2e
* fix: use dlx instead of exec
* chore: enable remote caching
* fix: add turso env for test
---
.github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++-------
.github/workflows/e2e.yml | 41 -------------------------
package.json | 2 ++
packages/db/package.json | 1 +
packages/e2e/package.json | 2 +-
turbo.json | 10 +++++--
6 files changed, 65 insertions(+), 54 deletions(-)
delete mode 100644 .github/workflows/e2e.yml
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf586111..636d98ce 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,26 +10,25 @@ on:
jobs:
build:
+ timeout-minutes: 15
runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [20]
+ env:
+ TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
+ TURBO_TEAM: ${{ vars.TURBO_TEAM }}
+ TURBO_REMOTE_ONLY: true
steps:
- uses: actions/checkout@v4
- - name: Install pnpm
- uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@v4
with:
version: 9.5.0
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v4
+ - uses: actions/setup-node@v4
with:
- node-version: ${{ matrix.node-version }}
+ node-version: 20
cache: "pnpm"
- name: Install dependencies
- run: pnpm install
+ run: pnpm install --prefer-offline
- name: Run GraphQL diagnostics
run: pnpm gql:check
@@ -39,3 +38,47 @@ jobs:
TURSO_CONNECTION_URL: ${{ secrets.TURSO_CONNECTION_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm build
+
+ e2e:
+ needs: build
+ timeout-minutes: 15
+ runs-on: ubuntu-latest
+ env:
+ TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
+ TURBO_TEAM: ${{ vars.TURBO_TEAM }}
+ TURBO_REMOTE_ONLY: true
+
+ steps:
+ - uses: actions/checkout@v4
+ - uses: pnpm/action-setup@v4
+ with:
+ version: 9.5.0
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: "pnpm"
+
+ - name: Install dependencies
+ run: pnpm install --prefer-offline
+
+ - name: Install Playwright Browsers
+ run: pnpm dlx playwright install --with-deps
+
+ - name: Build project
+ env:
+ TURSO_CONNECTION_URL: ${{ secrets.TURSO_CONNECTION_URL }}
+ run: pnpm build
+
+ - name: Run Playwright tests
+ env:
+ TURSO_CONNECTION_URL: ${{ secrets.TURSO_CONNECTION_URL }}
+ TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }}
+ AES_KEY: ${{ secrets.AES_KEY }}
+ run: pnpm test
+
+ - uses: actions/upload-artifact@v4
+ if: always()
+ with:
+ name: playwright-report
+ path: playwright-report/
+ retention-days: 30
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
deleted file mode 100644
index 4e26eb90..00000000
--- a/.github/workflows/e2e.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: E2E Tests
-
-on:
- push:
- branches:
- - "**"
- pull_request:
- branches:
- - main
-
-jobs:
- test:
- timeout-minutes: 60
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v4
- with:
- version: 9.5.0
-
- - uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: "pnpm"
-
- - name: Install dependencies
- run: pnpm install
-
- - name: Install Playwright Browsers
- run: pnpm exec playwright install --with-deps
-
- - name: Run Playwright tests
- run: pnpm exec playwright test
-
- - uses: actions/upload-artifact@v4
- if: always()
- with:
- name: playwright-report
- path: playwright-report/
- retention-days: 30
diff --git a/package.json b/package.json
index e4a40946..dcfc7a4e 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,8 @@
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
+ "start": "turbo run start --filter=!./apps/social",
+ "test": "turbo run test --filter=./packages/e2e",
"dev:www": "turbo run dev --filter=!./apps/social",
"dev:social": "turbo run dev --filter=!./apps/www",
"build:www": "turbo run build --filter=!./apps/social",
diff --git a/packages/db/package.json b/packages/db/package.json
index cd56055a..a5d82643 100644
--- a/packages/db/package.json
+++ b/packages/db/package.json
@@ -8,6 +8,7 @@
},
"scripts": {
"dev": "turso dev --db-file ./src/dev.db",
+ "start": "turso dev --db-file ./src/dev.db",
"clean": "rm -rf ./node_modules .turbo dist",
"check-types": "tsc --noEmit",
"generate": "pnpm drizzle-kit generate",
diff --git a/packages/e2e/package.json b/packages/e2e/package.json
index 6257059e..2c2064dc 100644
--- a/packages/e2e/package.json
+++ b/packages/e2e/package.json
@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev:test": "playwright test",
- "e2e:test": "start-server-and-test \"(cd ../../apps/www && pnpm start)\" http://localhost:3000 \"playwright test\"",
+ "test": "start-server-and-test \"(cd ../../apps/www && pnpm start)\" http://localhost:3000 \"playwright test\"",
"clean": "rm -rf ./node_modules .turbo dist"
},
"devDependencies": {
diff --git a/turbo.json b/turbo.json
index ea386348..4f5e6f0d 100644
--- a/turbo.json
+++ b/turbo.json
@@ -23,8 +23,14 @@
"dev:test": {
"cache": false
},
- "e2e:test": {
- "dependsOn": ["^build"]
+ "test": {
+ "dependsOn": ["^build"],
+ "inputs": ["$TURBO_DEFAULT$", ".env"],
+ "env": [
+ "TURSO_CONNECTION_URL",
+ "TURSO_AUTH_TOKEN",
+ "AES_KEY"
+ ]
},
"lint": {
"dependsOn": ["^lint"]
From f514035194471c49059db5637ed797054a5be479 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sun, 21 Jul 2024 17:00:56 +0800
Subject: [PATCH 08/33] chore: upgrade turbo
---
package.json | 2 +-
pnpm-lock.yaml | 58 +++++++++++++++++++++++++-------------------------
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/package.json b/package.json
index dcfc7a4e..78cb7903 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
"@umamin/eslint-config": "workspace:*",
"@umamin/tsconfig": "workspace:*",
"prettier": "^3.2.5",
- "turbo": "^2.0.6"
+ "turbo": "^2.0.9"
},
"packageManager": "pnpm@9.5.0",
"engines": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dc2c551f..0c106dd2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -18,8 +18,8 @@ importers:
specifier: ^3.2.5
version: 3.3.1
turbo:
- specifier: ^2.0.6
- version: 2.0.6
+ specifier: ^2.0.9
+ version: 2.0.9
apps/social:
dependencies:
@@ -5912,38 +5912,38 @@ packages:
peerDependencies:
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
- turbo-darwin-64@2.0.6:
- resolution: {integrity: sha512-XpgBwWj3Ggmz/gQVqXdMKXHC1iFPMDiuwugLwSzE7Ih0O13JuNtYZKhQnopvbDQnFQCeRq2Vsm5OTWabg/oB/g==}
+ turbo-darwin-64@2.0.9:
+ resolution: {integrity: sha512-owlGsOaExuVGBUfrnJwjkL1BWlvefjSKczEAcpLx4BI7Oh6ttakOi+JyomkPkFlYElRpjbvlR2gP8WIn6M/+xQ==}
cpu: [x64]
os: [darwin]
- turbo-darwin-arm64@2.0.6:
- resolution: {integrity: sha512-RfeZYXIAkiA21E8lsvfptGTqz/256YD+eI1x37fedfvnHFWuIMFZGAOwJxtZc6QasQunDZ9TRRREbJNI68tkIw==}
+ turbo-darwin-arm64@2.0.9:
+ resolution: {integrity: sha512-XAXkKkePth5ZPPE/9G9tTnPQx0C8UTkGWmNGYkpmGgRr8NedW+HrPsi9N0HcjzzIH9A4TpNYvtiV+WcwdaEjKA==}
cpu: [arm64]
os: [darwin]
- turbo-linux-64@2.0.6:
- resolution: {integrity: sha512-92UDa0xNQQbx0HdSp9ag3YSS3xPdavhc7q9q9mxIAcqyjjD6VElA4Y85m4F/DDGE5SolCrvBz2sQhVmkOd6Caw==}
+ turbo-linux-64@2.0.9:
+ resolution: {integrity: sha512-l9wSgEjrCFM1aG16zItBsZ206ZlhSSx1owB8Cgskfv0XyIXRGHRkluihiaxkp+UeU5WoEfz4EN5toc+ICA0q0w==}
cpu: [x64]
os: [linux]
- turbo-linux-arm64@2.0.6:
- resolution: {integrity: sha512-eQKu6utCVUkIH2kqOzD8OS6E0ba6COjWm6PRDTNCHQRljZW503ycaTUIdMOiJrVg1MkEjDyOReUg8s8D18aJ4Q==}
+ turbo-linux-arm64@2.0.9:
+ resolution: {integrity: sha512-gRnjxXRne18B27SwxXMqL3fJu7jw/8kBrOBTBNRSmZZiG1Uu3nbnP7b4lgrA/bCku6C0Wligwqurvtpq6+nFHA==}
cpu: [arm64]
os: [linux]
- turbo-windows-64@2.0.6:
- resolution: {integrity: sha512-+9u4EPrpoeHYCQ46dRcou9kbkSoelhOelHNcbs2d86D6ruYD/oIAHK9qgYK8LeARRz0jxhZIA/dWYdYsxJJWkw==}
+ turbo-windows-64@2.0.9:
+ resolution: {integrity: sha512-ZVo0apxUvaRq4Vm1qhsfqKKhtRgReYlBVf9MQvVU1O9AoyydEQvLDO1ryqpXDZWpcHoFxHAQc9msjAMtE5K2lA==}
cpu: [x64]
os: [win32]
- turbo-windows-arm64@2.0.6:
- resolution: {integrity: sha512-rdrKL+p+EjtdDVg0wQ/7yTbzkIYrnb0Pw4IKcjsy3M0RqUM9UcEi67b94XOAyTa5a0GqJL1+tUj2ebsFGPgZbg==}
+ turbo-windows-arm64@2.0.9:
+ resolution: {integrity: sha512-sGRz7c5Pey6y7y9OKi8ypbWNuIRPF9y8xcMqL56OZifSUSo+X2EOsOleR9MKxQXVaqHPGOUKWsE6y8hxBi9pag==}
cpu: [arm64]
os: [win32]
- turbo@2.0.6:
- resolution: {integrity: sha512-/Ftmxd5Mq//a9yMonvmwENNUN65jOVTwhhBPQjEtNZutYT9YKyzydFGLyVM1nzhpLWahQSMamRc/RDBv5EapzA==}
+ turbo@2.0.9:
+ resolution: {integrity: sha512-QaLaUL1CqblSKKPgLrFW3lZWkWG4pGBQNW+q1ScJB5v1D/nFWtsrD/yZljW/bdawg90ihi4/ftQJ3h6fz1FamA==}
hasBin: true
type-check@0.4.0:
@@ -12652,32 +12652,32 @@ snapshots:
tslib: 1.14.1
typescript: 5.4.5
- turbo-darwin-64@2.0.6:
+ turbo-darwin-64@2.0.9:
optional: true
- turbo-darwin-arm64@2.0.6:
+ turbo-darwin-arm64@2.0.9:
optional: true
- turbo-linux-64@2.0.6:
+ turbo-linux-64@2.0.9:
optional: true
- turbo-linux-arm64@2.0.6:
+ turbo-linux-arm64@2.0.9:
optional: true
- turbo-windows-64@2.0.6:
+ turbo-windows-64@2.0.9:
optional: true
- turbo-windows-arm64@2.0.6:
+ turbo-windows-arm64@2.0.9:
optional: true
- turbo@2.0.6:
+ turbo@2.0.9:
optionalDependencies:
- turbo-darwin-64: 2.0.6
- turbo-darwin-arm64: 2.0.6
- turbo-linux-64: 2.0.6
- turbo-linux-arm64: 2.0.6
- turbo-windows-64: 2.0.6
- turbo-windows-arm64: 2.0.6
+ turbo-darwin-64: 2.0.9
+ turbo-darwin-arm64: 2.0.9
+ turbo-linux-64: 2.0.9
+ turbo-linux-arm64: 2.0.9
+ turbo-windows-64: 2.0.9
+ turbo-windows-arm64: 2.0.9
type-check@0.4.0:
dependencies:
From 9a47406920f9febbd775e83d4bdd66e0c8d72d9b Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Wed, 24 Jul 2024 22:55:18 +0800
Subject: [PATCH 09/33] feat(test): add e2e for auth
---
packages/e2e/package.json | 2 ++
packages/e2e/tests/auth.spec.ts | 35 ++++++++++++++++++++++++++++++
packages/e2e/tests/example.spec.ts | 20 -----------------
pnpm-lock.yaml | 12 +++++-----
4 files changed, 44 insertions(+), 25 deletions(-)
create mode 100644 packages/e2e/tests/auth.spec.ts
delete mode 100644 packages/e2e/tests/example.spec.ts
diff --git a/packages/e2e/package.json b/packages/e2e/package.json
index 2c2064dc..fcc45314 100644
--- a/packages/e2e/package.json
+++ b/packages/e2e/package.json
@@ -1,5 +1,6 @@
{
"name": "@umamin/e2e",
+ "type": "module",
"version": "0.0.0",
"private": true,
"scripts": {
@@ -12,6 +13,7 @@
"@types/node": "^20.14.11",
"@umamin/tsconfig": "workspace:*",
"start-server-and-test": "^2.0.4",
+ "nanoid": "^5.0.7",
"typescript": "^5.4.5"
}
}
diff --git a/packages/e2e/tests/auth.spec.ts b/packages/e2e/tests/auth.spec.ts
new file mode 100644
index 00000000..120a5537
--- /dev/null
+++ b/packages/e2e/tests/auth.spec.ts
@@ -0,0 +1,35 @@
+import { nanoid } from "nanoid";
+import { test, expect } from "@playwright/test";
+
+const username = `test_${nanoid(5)}`;
+const password = "password";
+
+test.describe("Authentication", () => {
+ test("can create an account", async ({ page }) => {
+ await page.goto("/register");
+ await expect(page).toHaveTitle(/Umamin — Register/);
+
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password", { exact: true }).fill(password);
+ await page.getByLabel("Confirm Password").fill(password);
+ await page.getByRole("button", { name: "Create an account" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+ });
+
+ test("can login and logout", async ({ page }) => {
+ await page.goto("/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password").fill(password);
+ await page.getByRole("button", { name: "Login" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+
+ await page.goto("/settings");
+ await page.getByRole("button", { name: "Sign Out" }).click();
+ });
+});
diff --git a/packages/e2e/tests/example.spec.ts b/packages/e2e/tests/example.spec.ts
deleted file mode 100644
index 5d99afbb..00000000
--- a/packages/e2e/tests/example.spec.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { test, expect } from "@playwright/test";
-
-test("has title", async ({ page }) => {
- await page.goto("/");
-
- // Expect a title "to contain" a substring.
- await expect(page).toHaveTitle(/Umamin — The Platform for Anonymity/);
-});
-
-test("umamin social link", async ({ page }) => {
- await page.goto("/");
-
- // Click the get started link.
- await page.getByRole("link", { name: "Umamin Social" }).click();
-
- // Expects page to have a heading with the name of Installation.
- await expect(
- page.getByRole("heading", { name: "Umamin Social" })
- ).toBeVisible();
-});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0c106dd2..28bcb89b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -359,6 +359,9 @@ importers:
'@umamin/tsconfig':
specifier: workspace:*
version: link:../tsconfig
+ nanoid:
+ specifier: ^5.0.7
+ version: 5.0.7
start-server-and-test:
specifier: ^2.0.4
version: 2.0.4
@@ -4680,7 +4683,6 @@ packages:
libsql@0.3.19:
resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==}
- cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
lilconfig@2.1.0:
@@ -9928,7 +9930,7 @@ snapshots:
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
eslint-plugin-react: 7.34.2(eslint@8.57.0)
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
@@ -9946,7 +9948,7 @@ snapshots:
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0)
eslint-plugin-react: 7.34.3(eslint@8.57.0)
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
@@ -10000,7 +10002,7 @@ snapshots:
enhanced-resolve: 5.17.0
eslint: 8.57.0
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.5
is-core-module: 2.13.1
@@ -10075,7 +10077,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
- eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
+ eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
dependencies:
array-includes: 3.1.8
array.prototype.findlastindex: 1.2.5
From 128ac9e109da52a637b49db6b74fe9ba31f95f9b Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Thu, 25 Jul 2024 15:19:40 +0800
Subject: [PATCH 10/33] chore(e2e): enable webServer option
---
.../settings/components/sign-out-button.tsx | 7 +-
packages/e2e/package.json | 4 +-
packages/e2e/playwright.config.ts | 32 +-
packages/e2e/tests/auth.spec.ts | 16 +-
pnpm-lock.yaml | 283 ------------------
5 files changed, 31 insertions(+), 311 deletions(-)
diff --git a/apps/www/src/app/(profile)/settings/components/sign-out-button.tsx b/apps/www/src/app/(profile)/settings/components/sign-out-button.tsx
index 491d2f83..1f315594 100644
--- a/apps/www/src/app/(profile)/settings/components/sign-out-button.tsx
+++ b/apps/www/src/app/(profile)/settings/components/sign-out-button.tsx
@@ -8,7 +8,12 @@ export function SignOutButton() {
const { pending } = useFormStatus();
return (
-
{process.env.NEXT_PUBLIC_VERIFIED_USERS?.split(",").includes(
- user.username,
+ user.username
) && }
{user.quietMode && (
@@ -48,7 +48,9 @@ export function UserCard({
- @{user.username}
+
+ @{user.username}
+
diff --git a/packages/e2e/tests/auth.spec.ts b/packages/e2e/tests/auth.spec.ts
index bac45c68..7d7234d9 100644
--- a/packages/e2e/tests/auth.spec.ts
+++ b/packages/e2e/tests/auth.spec.ts
@@ -4,32 +4,45 @@ import { test, expect } from "@playwright/test";
const username = `test_${nanoid(5)}`;
const password = "password";
-test.describe("Authentication", () => {
- test.afterEach(async ({ page }) => {
- await page.goto("/settings");
- await expect(page).toHaveTitle(/Umamin — Settings/);
- await page.getByTestId("logout").click();
- });
-
- test("can register", async ({ page }) => {
- await page.goto("/register");
- await expect(page).toHaveTitle(/Umamin — Register/);
-
- await page.getByLabel("Username").fill(username);
- await page.getByLabel("Password", { exact: true }).fill(password);
- await page.getByLabel("Confirm Password").fill(password);
- await page.getByRole("button", { name: "Create an account" }).click();
-
- await page.waitForURL("**/inbox");
- await expect(page).toHaveTitle(/Umamin — Inbox/);
- });
-
- test("can login", async ({ page }) => {
- await page.goto("/login");
- await expect(page).toHaveTitle(/Umamin — Login/);
-
- await page.getByLabel("Username").fill(username);
- await page.getByLabel("Password").fill(password);
- await page.getByRole("button", { name: "Login" }).click();
- });
+test("should redirect unauthenticated users", async ({ page }) => {
+ await page.goto("/inbox");
+ await page.waitForURL("**/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+
+ await page.goto("/settings");
+ await page.waitForURL("**/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+});
+
+test("ensure successful authentication flow", async ({ page }) => {
+ // create an account
+ await page.goto("/register");
+ await expect(page).toHaveTitle(/Umamin — Register/);
+
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password", { exact: true }).fill(password);
+ await page.getByLabel("Confirm Password").fill(password);
+ await page.getByRole("button", { name: "Create an account" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+ await expect(page.getByTestId("username")).toBeVisible();
+
+ // go to settings and log out
+ await page.getByTestId("nav-settings-btn").click();
+ await expect(page).toHaveTitle(/Umamin — Settings/);
+ await expect(page.getByRole("heading", { name: "Settings" })).toBeVisible();
+
+ await page.getByTestId("logout-btn").click();
+ await page.waitForURL("**/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+
+ // login with the new account
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password").fill(password);
+ await page.getByRole("button", { name: "Login" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+ await expect(page.getByTestId("username")).toBeVisible();
});
From 8218253a6057944987d443e946d0a6edc31f3602 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Fri, 26 Jul 2024 21:55:25 +0800
Subject: [PATCH 13/33] chore(e2e): add script for playwright in ui mode
---
package.json | 1 +
packages/e2e/package.json | 3 +-
packages/e2e/tests/auth.spec.ts | 75 +++++++++------
pnpm-lock.yaml | 161 +++++++++++++++++++-------------
turbo.json | 3 -
5 files changed, 142 insertions(+), 101 deletions(-)
diff --git a/package.json b/package.json
index 78cb7903..20dfb86d 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"dev": "turbo run dev",
"start": "turbo run start --filter=!./apps/social",
"test": "turbo run test --filter=./packages/e2e",
+ "dev:test": "pnpm --filter @umamin/e2e dev:test",
"dev:www": "turbo run dev --filter=!./apps/social",
"dev:social": "turbo run dev --filter=!./apps/www",
"build:www": "turbo run build --filter=!./apps/social",
diff --git a/packages/e2e/package.json b/packages/e2e/package.json
index 8905d210..fc3a6b02 100644
--- a/packages/e2e/package.json
+++ b/packages/e2e/package.json
@@ -4,11 +4,12 @@
"version": "0.0.0",
"private": true,
"scripts": {
+ "dev:test": "npx playwright test --ui",
"test": "playwright test",
"clean": "rm -rf ./node_modules .turbo dist"
},
"devDependencies": {
- "@playwright/test": "^1.45.2",
+ "@playwright/test": "^1.45.3",
"@types/node": "^20.14.11",
"@umamin/tsconfig": "workspace:*",
"nanoid": "^5.0.7",
diff --git a/packages/e2e/tests/auth.spec.ts b/packages/e2e/tests/auth.spec.ts
index 7d7234d9..4c87e779 100644
--- a/packages/e2e/tests/auth.spec.ts
+++ b/packages/e2e/tests/auth.spec.ts
@@ -14,35 +14,48 @@ test("should redirect unauthenticated users", async ({ page }) => {
await expect(page).toHaveTitle(/Umamin — Login/);
});
-test("ensure successful authentication flow", async ({ page }) => {
- // create an account
- await page.goto("/register");
- await expect(page).toHaveTitle(/Umamin — Register/);
-
- await page.getByLabel("Username").fill(username);
- await page.getByLabel("Password", { exact: true }).fill(password);
- await page.getByLabel("Confirm Password").fill(password);
- await page.getByRole("button", { name: "Create an account" }).click();
-
- await page.waitForURL("**/inbox");
- await expect(page).toHaveTitle(/Umamin — Inbox/);
- await expect(page.getByTestId("username")).toBeVisible();
-
- // go to settings and log out
- await page.getByTestId("nav-settings-btn").click();
- await expect(page).toHaveTitle(/Umamin — Settings/);
- await expect(page.getByRole("heading", { name: "Settings" })).toBeVisible();
-
- await page.getByTestId("logout-btn").click();
- await page.waitForURL("**/login");
- await expect(page).toHaveTitle(/Umamin — Login/);
-
- // login with the new account
- await page.getByLabel("Username").fill(username);
- await page.getByLabel("Password").fill(password);
- await page.getByRole("button", { name: "Login" }).click();
-
- await page.waitForURL("**/inbox");
- await expect(page).toHaveTitle(/Umamin — Inbox/);
- await expect(page.getByTestId("username")).toBeVisible();
+test.describe.serial("Authentication", () => {
+ test.beforeEach(async ({ page }) => {
+ await page.goto("/");
+ });
+ test("can register", async ({ page }) => {
+ await page.getByRole("link", { name: "Continue" }).click();
+ await expect(page).toHaveTitle(/Umamin — Register/);
+
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password", { exact: true }).fill(password);
+ await page.getByLabel("Confirm Password").fill(password);
+ await page.getByRole("button", { name: "Create an account" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+ await expect(page.getByTestId("username")).toBeVisible();
+ });
+
+ test("can login", async ({ page }) => {
+ await page.getByTestId("nav-login-btn").click();
+ await page.waitForURL("**/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+
+ await page.getByLabel("Username").fill(username);
+ await page.getByLabel("Password").fill(password);
+ await page.getByRole("button", { name: "Login" }).click();
+
+ await page.waitForURL("**/inbox");
+ await expect(page).toHaveTitle(/Umamin — Inbox/);
+ await expect(page.getByTestId("username")).toBeVisible();
+
+ // go to settings and logout
+ await page.getByTestId("nav-settings-btn").click();
+ await page.waitForURL("**/settings");
+ await expect(page).toHaveTitle(/Umamin — Settings/);
+ await expect(page.getByRole("heading", { name: "Settings" })).toBeVisible();
+
+ await page.getByTestId("logout-btn").click();
+ await page.waitForURL("**/login");
+ await expect(page).toHaveTitle(/Umamin — Login/);
+ await expect(
+ page.getByRole("heading", { name: "Umamin Account" })
+ ).toBeVisible();
+ });
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 13402a1c..85aa4dc8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -52,13 +52,13 @@ importers:
version: 7.1.1(@urql/core@5.0.4(graphql@16.8.1))(graphql@16.8.1)
'@urql/next':
specifier: ^1.1.1
- version: 1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))
+ version: 1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))
arctic:
specifier: ^1.8.1
version: 1.9.1
geist:
specifier: ^1.3.0
- version: 1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ version: 1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
gql.tada:
specifier: ^1.7.5
version: 1.7.5(graphql@16.8.1)(svelte@4.2.18)(typescript@5.4.5)
@@ -76,10 +76,10 @@ importers:
version: 5.0.7
next:
specifier: 14.2.3
- version: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nextjs-toploader:
specifier: ^1.6.12
- version: 1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
oslo:
specifier: ^1.2.0
version: 1.2.0
@@ -161,7 +161,7 @@ importers:
version: 1.8.3
'@sentry/nextjs':
specifier: ^8
- version: 8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)
+ version: 8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)
'@types/mdx':
specifier: ^2.0.13
version: 2.0.13
@@ -188,7 +188,7 @@ importers:
version: 4.3.0(@urql/core@5.0.4(graphql@16.9.0))
'@urql/next':
specifier: ^1.1.1
- version: 1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))
+ version: 1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))
arctic:
specifier: ^1.9.1
version: 1.9.1
@@ -206,7 +206,7 @@ importers:
version: 10.12.2
geist:
specifier: ^1.3.0
- version: 1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ version: 1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
gql.tada:
specifier: ^1.8.2
version: 1.8.2(graphql@16.9.0)(svelte@4.2.18)(typescript@5.4.5)
@@ -230,13 +230,13 @@ importers:
version: 5.0.7
next:
specifier: 14.2.5
- version: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next-themes:
specifier: ^0.3.0
version: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nextjs-toploader:
specifier: ^1.6.12
- version: 1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
oslo:
specifier: ^1.2.1
version: 1.2.1
@@ -351,8 +351,8 @@ importers:
packages/e2e:
devDependencies:
'@playwright/test':
- specifier: ^1.45.2
- version: 1.45.2
+ specifier: ^1.45.3
+ version: 1.45.3
'@types/node':
specifier: ^20.14.11
version: 20.14.11
@@ -2039,8 +2039,8 @@ packages:
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
- '@playwright/test@1.45.2':
- resolution: {integrity: sha512-JxG9eq92ET75EbVi3s+4sYbcG7q72ECeZNbdBlaMkGcNbiDQ4cAi8U2QP5oKkOx+1gpaiL1LDStmzCaEM1Z6fQ==}
+ '@playwright/test@1.45.3':
+ resolution: {integrity: sha512-UKF4XsBfy+u3MFWEH44hva1Q8Da28G6RFtR2+5saw+jgAFQV5yYnB1fu68Mz7fO+5GJF3wgwAIs0UelU8TxFrA==}
engines: {node: '>=18'}
hasBin: true
@@ -2744,6 +2744,9 @@ packages:
'@types/eslint@8.56.10':
resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==}
+ '@types/eslint@9.6.0':
+ resolution: {integrity: sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==}
+
'@types/estree-jsx@1.0.5':
resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
@@ -2777,6 +2780,9 @@ packages:
'@types/node@20.14.11':
resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==}
+ '@types/node@20.14.12':
+ resolution: {integrity: sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==}
+
'@types/node@20.14.2':
resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==}
@@ -3307,8 +3313,9 @@ packages:
axobject-query@3.2.1:
resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==}
- axobject-query@4.0.0:
- resolution: {integrity: sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==}
+ axobject-query@4.1.0:
+ resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==}
+ engines: {node: '>= 0.4'}
bail@2.0.2:
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
@@ -3369,8 +3376,8 @@ packages:
caniuse-lite@1.0.30001641:
resolution: {integrity: sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==}
- caniuse-lite@1.0.30001642:
- resolution: {integrity: sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==}
+ caniuse-lite@1.0.30001643:
+ resolution: {integrity: sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==}
ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -3711,8 +3718,8 @@ packages:
electron-to-chromium@1.4.798:
resolution: {integrity: sha512-by9J2CiM9KPGj9qfp5U4FcPSbXJG7FNzqnYaY4WLzX+v2PHieVGmnsA4dxfpGE3QEC7JofpPZmn7Vn1B9NR2+Q==}
- electron-to-chromium@1.4.827:
- resolution: {integrity: sha512-VY+J0e4SFcNfQy19MEoMdaIcZLmDCprqvBtkii1WTCTQHpRvf5N8+3kTYCgL/PcntvwQvmMJWTuDPsq+IlhWKQ==}
+ electron-to-chromium@1.5.2:
+ resolution: {integrity: sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==}
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -3724,6 +3731,10 @@ packages:
resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==}
engines: {node: '>=10.13.0'}
+ enhanced-resolve@5.17.1:
+ resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==}
+ engines: {node: '>=10.13.0'}
+
entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
@@ -4599,6 +4610,7 @@ packages:
libsql@0.3.19:
resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==}
+ cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
lilconfig@2.1.0:
@@ -5014,6 +5026,9 @@ packages:
node-releases@2.0.14:
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
+ node-releases@2.0.18:
+ resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
+
normalize-package-data@2.5.0:
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
@@ -5179,13 +5194,13 @@ packages:
resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}
engines: {node: '>= 6'}
- playwright-core@1.45.2:
- resolution: {integrity: sha512-ha175tAWb0dTK0X4orvBIqi3jGEt701SMxMhyujxNrgd8K0Uy5wMSwwcQHtyB4om7INUkfndx02XnQ2p6dvLDw==}
+ playwright-core@1.45.3:
+ resolution: {integrity: sha512-+ym0jNbcjikaOwwSZycFbwkWgfruWvYlJfThKYAlImbxUgdWFO2oW70ojPm4OpE4t6TAo2FY/smM+hpVTtkhDA==}
engines: {node: '>=18'}
hasBin: true
- playwright@1.45.2:
- resolution: {integrity: sha512-ReywF2t/0teRvNBpfIgh5e4wnrI/8Su8ssdo5XsQKpjxJj+jspm00jSoz9BTg91TT0c9HRjXO7LBNVrgYj9X0g==}
+ playwright@1.45.3:
+ resolution: {integrity: sha512-QhVaS+lpluxCaioejDZ95l4Y4jSFCsBvl2UZkpeXlzxmqS+aABr5c82YmfMHrL6x27nvrvykJAFpkzT2eWdJww==}
engines: {node: '>=18'}
hasBin: true
@@ -5727,8 +5742,8 @@ packages:
uglify-js:
optional: true
- terser@5.31.2:
- resolution: {integrity: sha512-LGyRZVFm/QElZHy/CPr/O4eNZOZIzsrQ92y4v9UJe/pFJjypje2yI3C2FmPtvUEnhadlSbmG2nXtdcjHOjCfxw==}
+ terser@5.31.3:
+ resolution: {integrity: sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==}
engines: {node: '>=10'}
hasBin: true
@@ -7676,9 +7691,9 @@ snapshots:
'@pkgr/core@0.1.1': {}
- '@playwright/test@1.45.2':
+ '@playwright/test@1.45.3':
dependencies:
- playwright: 1.45.2
+ playwright: 1.45.3
'@pothos/core@4.0.2(graphql@16.9.0)':
dependencies:
@@ -8331,7 +8346,7 @@ snapshots:
'@sentry/types': 8.17.0
'@sentry/utils': 8.17.0
- '@sentry/nextjs@8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)':
+ '@sentry/nextjs@8.17.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.92.1)':
dependencies:
'@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/api@1.9.0)
'@opentelemetry/semantic-conventions': 1.25.1
@@ -8345,7 +8360,7 @@ snapshots:
'@sentry/vercel-edge': 8.17.0
'@sentry/webpack-plugin': 2.20.1(webpack@5.92.1)
chalk: 3.0.0
- next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
resolve: 1.22.8
rollup: 3.29.4
stacktrace-parser: 0.1.10
@@ -8475,7 +8490,7 @@ snapshots:
'@types/eslint-scope@3.7.7':
dependencies:
- '@types/eslint': 8.56.10
+ '@types/eslint': 9.6.0
'@types/estree': 1.0.5
'@types/eslint@8.56.10':
@@ -8483,6 +8498,11 @@ snapshots:
'@types/estree': 1.0.5
'@types/json-schema': 7.0.15
+ '@types/eslint@9.6.0':
+ dependencies:
+ '@types/estree': 1.0.5
+ '@types/json-schema': 7.0.15
+
'@types/estree-jsx@1.0.5':
dependencies:
'@types/estree': 1.0.5
@@ -8517,6 +8537,10 @@ snapshots:
dependencies:
undici-types: 5.26.5
+ '@types/node@20.14.12':
+ dependencies:
+ undici-types: 5.26.5
+
'@types/node@20.14.2':
dependencies:
undici-types: 5.26.5
@@ -8845,15 +8869,15 @@ snapshots:
'@urql/core': 5.0.4(graphql@16.9.0)
wonka: 6.3.4
- '@urql/next@1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))':
+ '@urql/next@1.1.1(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1))':
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
urql: 4.1.0(@urql/core@5.0.4(graphql@16.8.1))(react@18.3.1)
- '@urql/next@1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))':
+ '@urql/next@1.1.1(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(urql@4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1))':
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
urql: 4.1.0(@urql/core@5.0.4(graphql@16.9.0))(react@18.3.1)
@@ -9248,9 +9272,7 @@ snapshots:
dependencies:
dequal: 2.0.3
- axobject-query@4.0.0:
- dependencies:
- dequal: 2.0.3
+ axobject-query@4.1.0: {}
bail@2.0.2: {}
@@ -9280,9 +9302,9 @@ snapshots:
browserslist@4.23.2:
dependencies:
- caniuse-lite: 1.0.30001642
- electron-to-chromium: 1.4.827
- node-releases: 2.0.14
+ caniuse-lite: 1.0.30001643
+ electron-to-chromium: 1.5.2
+ node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.2)
buffer-from@1.1.2: {}
@@ -9309,7 +9331,7 @@ snapshots:
caniuse-lite@1.0.30001641: {}
- caniuse-lite@1.0.30001642: {}
+ caniuse-lite@1.0.30001643: {}
ccount@2.0.1: {}
@@ -9561,7 +9583,7 @@ snapshots:
electron-to-chromium@1.4.798: {}
- electron-to-chromium@1.4.827: {}
+ electron-to-chromium@1.5.2: {}
emoji-regex@8.0.0: {}
@@ -9572,6 +9594,11 @@ snapshots:
graceful-fs: 4.2.11
tapable: 2.2.1
+ enhanced-resolve@5.17.1:
+ dependencies:
+ graceful-fs: 4.2.11
+ tapable: 2.2.1
+
entities@4.5.0: {}
error-ex@1.3.2:
@@ -9758,7 +9785,7 @@ snapshots:
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
eslint-plugin-react: 7.34.2(eslint@8.57.0)
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
@@ -9776,7 +9803,7 @@ snapshots:
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0)
eslint-plugin-react: 7.34.3(eslint@8.57.0)
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
@@ -9830,7 +9857,7 @@ snapshots:
enhanced-resolve: 5.17.0
eslint: 8.57.0
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
- eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
+ eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.5
is-core-module: 2.13.1
@@ -9905,7 +9932,7 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
- eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
+ eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
dependencies:
array-includes: 3.1.8
array.prototype.findlastindex: 1.2.5
@@ -10314,13 +10341,13 @@ snapshots:
functions-have-names@1.2.3: {}
- geist@1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
+ geist@1.3.0(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
- geist@1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
+ geist@1.3.0(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)):
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
gensync@1.0.0-beta.2: {}
@@ -10783,7 +10810,7 @@ snapshots:
jest-worker@27.5.1:
dependencies:
- '@types/node': 20.14.11
+ '@types/node': 20.14.12
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -11437,7 +11464,7 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 14.2.3
'@swc/helpers': 0.5.5
@@ -11459,12 +11486,12 @@ snapshots:
'@next/swc-win32-ia32-msvc': 14.2.3
'@next/swc-win32-x64-msvc': 14.2.3
'@opentelemetry/api': 1.9.0
- '@playwright/test': 1.45.2
+ '@playwright/test': 1.45.3
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
- next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
'@next/env': 14.2.5
'@swc/helpers': 0.5.5
@@ -11486,22 +11513,22 @@ snapshots:
'@next/swc-win32-ia32-msvc': 14.2.5
'@next/swc-win32-x64-msvc': 14.2.5
'@opentelemetry/api': 1.9.0
- '@playwright/test': 1.45.2
+ '@playwright/test': 1.45.3
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
- nextjs-toploader@1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nextjs-toploader@1.6.12(next@14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
- next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nprogress: 0.2.0
prop-types: 15.8.1
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- nextjs-toploader@1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ nextjs-toploader@1.6.12(next@14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
dependencies:
- next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ next: 14.2.5(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
nprogress: 0.2.0
prop-types: 15.8.1
react: 18.3.1
@@ -11526,6 +11553,8 @@ snapshots:
node-releases@2.0.14: {}
+ node-releases@2.0.18: {}
+
normalize-package-data@2.5.0:
dependencies:
hosted-git-info: 2.8.9
@@ -11710,11 +11739,11 @@ snapshots:
pirates@4.0.6: {}
- playwright-core@1.45.2: {}
+ playwright-core@1.45.3: {}
- playwright@1.45.2:
+ playwright@1.45.3:
dependencies:
- playwright-core: 1.45.2
+ playwright-core: 1.45.3
optionalDependencies:
fsevents: 2.3.2
@@ -12270,7 +12299,7 @@ snapshots:
'@types/estree': 1.0.5
acorn: 8.12.1
aria-query: 5.3.0
- axobject-query: 4.0.0
+ axobject-query: 4.1.0
code-red: 1.0.4
css-tree: 2.3.1
estree-walker: 3.0.3
@@ -12327,10 +12356,10 @@ snapshots:
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
- terser: 5.31.2
+ terser: 5.31.3
webpack: 5.92.1
- terser@5.31.2:
+ terser@5.31.3:
dependencies:
'@jridgewell/source-map': 0.3.6
acorn: 8.12.1
@@ -12625,7 +12654,7 @@ snapshots:
acorn-import-attributes: 1.9.5(acorn@8.12.1)
browserslist: 4.23.2
chrome-trace-event: 1.0.4
- enhanced-resolve: 5.17.0
+ enhanced-resolve: 5.17.1
es-module-lexer: 1.5.4
eslint-scope: 5.1.1
events: 3.3.0
diff --git a/turbo.json b/turbo.json
index 4f5e6f0d..e87e6907 100644
--- a/turbo.json
+++ b/turbo.json
@@ -20,9 +20,6 @@
"NEXT_RUNTIME"
]
},
- "dev:test": {
- "cache": false
- },
"test": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env"],
From dca13f1a5e78f5354b130a427b569201c1aa882a Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Fri, 26 Jul 2024 22:56:14 +0800
Subject: [PATCH 14/33] fix(e2e): remove waits on other parts
---
packages/e2e/tests/auth.spec.ts | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/packages/e2e/tests/auth.spec.ts b/packages/e2e/tests/auth.spec.ts
index 4c87e779..95eecd8c 100644
--- a/packages/e2e/tests/auth.spec.ts
+++ b/packages/e2e/tests/auth.spec.ts
@@ -6,11 +6,9 @@ const password = "password";
test("should redirect unauthenticated users", async ({ page }) => {
await page.goto("/inbox");
- await page.waitForURL("**/login");
await expect(page).toHaveTitle(/Umamin — Login/);
await page.goto("/settings");
- await page.waitForURL("**/login");
await expect(page).toHaveTitle(/Umamin — Login/);
});
@@ -21,6 +19,9 @@ test.describe.serial("Authentication", () => {
test("can register", async ({ page }) => {
await page.getByRole("link", { name: "Continue" }).click();
await expect(page).toHaveTitle(/Umamin — Register/);
+ await expect(
+ page.getByRole("heading", { name: "Umamin Account" })
+ ).toBeVisible();
await page.getByLabel("Username").fill(username);
await page.getByLabel("Password", { exact: true }).fill(password);
@@ -34,8 +35,10 @@ test.describe.serial("Authentication", () => {
test("can login", async ({ page }) => {
await page.getByTestId("nav-login-btn").click();
- await page.waitForURL("**/login");
await expect(page).toHaveTitle(/Umamin — Login/);
+ await expect(
+ page.getByRole("heading", { name: "Umamin Account" })
+ ).toBeVisible();
await page.getByLabel("Username").fill(username);
await page.getByLabel("Password").fill(password);
@@ -47,12 +50,10 @@ test.describe.serial("Authentication", () => {
// go to settings and logout
await page.getByTestId("nav-settings-btn").click();
- await page.waitForURL("**/settings");
await expect(page).toHaveTitle(/Umamin — Settings/);
await expect(page.getByRole("heading", { name: "Settings" })).toBeVisible();
await page.getByTestId("logout-btn").click();
- await page.waitForURL("**/login");
await expect(page).toHaveTitle(/Umamin — Login/);
await expect(
page.getByRole("heading", { name: "Umamin Account" })
From 922824c8d9e1c9d46ffd83ba2eea610a1097e738 Mon Sep 17 00:00:00 2001
From: Josh Daniel
Date: Sat, 27 Jul 2024 17:11:16 +0800
Subject: [PATCH 15/33] chore: remove progress dialog
---
.../(user)/to/[username]/components/form.tsx | 110 ++++++++---------
.../src/app/components/progress-dialog.tsx | 86 -------------
apps/www/src/app/notes/components/form.tsx | 12 +-
.../src/app/notes/components/reply-drawer.tsx | 101 +++++++---------
packages/ui/package.json | 1 -
packages/ui/src/components/ad-container.tsx | 3 +-
packages/ui/src/components/ui/progress.tsx | 28 -----
pnpm-lock.yaml | 113 +-----------------
8 files changed, 100 insertions(+), 354 deletions(-)
delete mode 100644 apps/www/src/app/components/progress-dialog.tsx
delete mode 100644 packages/ui/src/components/ui/progress.tsx
diff --git a/apps/www/src/app/(user)/to/[username]/components/form.tsx b/apps/www/src/app/(user)/to/[username]/components/form.tsx
index 2bb339ea..a134409b 100644
--- a/apps/www/src/app/(user)/to/[username]/components/form.tsx
+++ b/apps/www/src/app/(user)/to/[username]/components/form.tsx
@@ -16,7 +16,6 @@ import useBotDetection from "@/hooks/use-bot-detection";
import { Textarea } from "@umamin/ui/components/textarea";
import { useDynamicTextarea } from "@/hooks/use-dynamic-textarea";
import type { UserByUsernameQueryResult } from "../../../queries";
-import { ProgressDialog } from "@/app/components/progress-dialog";
const CREATE_MESSAGE_MUTATION = graphql(`
mutation CreateMessage($input: CreateMessageInput!) {
@@ -41,7 +40,6 @@ export default function ChatForm({ currentUserId, user }: Props) {
const [content, setContent] = useState("");
const [message, setMessage] = useState("");
const [isFetching, setIsFetching] = useState(false);
- const [dialogOpen, setDialogOpen] = useState(false);
const inputRef = useDynamicTextarea(content);
@@ -76,7 +74,7 @@ export default function ChatForm({ currentUserId, user }: Props) {
return;
}
- setDialogOpen(true);
+ setMessage(content.replace(/(\r\n|\n|\r){2,}/g, "\n\n"));
setIsFetching(false);
logEvent(analytics, "send_message");
@@ -87,65 +85,53 @@ export default function ChatForm({ currentUserId, user }: Props) {
}
return (
- <>
- {
- setMessage(content.replace(/(\r\n|\n|\r){2,}/g, "\n\n"));
- setContent("");
- }}
- />
-
-
-
-
-
- {user?.quietMode ? (
-
- User has enabled quiet mode
-
- ) : (
-
- )}
+
+
+
- >
+
+ {user?.quietMode ? (
+
+ User has enabled quiet mode
+
+ ) : (
+
+ )}
+
);
}
diff --git a/apps/www/src/app/components/progress-dialog.tsx b/apps/www/src/app/components/progress-dialog.tsx
deleted file mode 100644
index 51510933..00000000
--- a/apps/www/src/app/components/progress-dialog.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import { toast } from "sonner";
-import dynamic from "next/dynamic";
-import { useEffect, useState } from "react";
-import {
- AlertDialog,
- AlertDialogAction,
- AlertDialogContent,
- AlertDialogDescription,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogTitle,
-} from "@umamin/ui/components/alert-dialog";
-import { Progress } from "@umamin/ui/components/progress";
-
-const AdContainer = dynamic(() => import("@umamin/ui/ad"));
-
-type Props = {
- type: string;
- description: string;
- open: boolean;
- onProgressComplete?: () => void;
- // eslint-disable-next-line no-unused-vars
- onOpenChange: (open: boolean) => void;
-};
-
-export function ProgressDialog({
- type,
- description,
- open,
- onOpenChange,
- onProgressComplete,
-}: Props) {
- const [progress, setProgress] = useState(0);
-
- useEffect(() => {
- if (open) {
- setProgress(0);
-
- const duration = 7000;
- const intervalTime = 100;
- const totalIntervals = duration / intervalTime;
- let currentInterval = 0;
-
- const interval = setInterval(() => {
- currentInterval += 1;
- setProgress(Math.min(100, (currentInterval / totalIntervals) * 100));
-
- if (currentInterval >= totalIntervals) {
- clearInterval(interval);
- toast.success(`${type} sent successfully`);
-
- if (onProgressComplete) {
- onProgressComplete();
- }
- }
- }, intervalTime);
-
- return () => clearInterval(interval);
- }
- }, [open, type]);
-
- return (
-
-
-
-
- {progress === 100 ? `${type} Sent` : `Sending ${type}`}
-
- {description}
-
-
-
-
-
- {progress !== 100 ? (
-
- ) : (
-
- Continue
-
- )}
-
-
-
- );
-}
diff --git a/apps/www/src/app/notes/components/form.tsx b/apps/www/src/app/notes/components/form.tsx
index 797d205f..8ef4f2d9 100644
--- a/apps/www/src/app/notes/components/form.tsx
+++ b/apps/www/src/app/notes/components/form.tsx
@@ -22,7 +22,6 @@ import { Switch } from "@umamin/ui/components/switch";
import useBotDetection from "@/hooks/use-bot-detection";
import { Textarea } from "@umamin/ui/components/textarea";
import { useDynamicTextarea } from "@/hooks/use-dynamic-textarea";
-import { ProgressDialog } from "@/app/components/progress-dialog";
const UPDATE_NOTE_MUTATION = graphql(`
mutation UpdateNote($content: String!, $isAnonymous: Boolean!) {
@@ -60,7 +59,6 @@ type Props = {
export default function NoteForm({ user, currentNote }: Props) {
useBotDetection();
const [content, setContent] = useState("");
- const [dialogOpen, setDialogOpen] = useState(false);
const [isFetching, setIsFetching] = useState(false);
const [isAnonymous, setIsAnonymous] = useState(false);
const [textAreaCount, setTextAreaCount] = useState(0);
@@ -112,8 +110,8 @@ export default function NoteForm({ user, currentNote }: Props) {
}
if (res.data) {
- setDialogOpen(true);
setContent("");
+ toast.success("Note updated")
updateNote(res.data.updateNote);
}
@@ -127,13 +125,6 @@ export default function NoteForm({ user, currentNote }: Props) {
return (
-
-