fix: tests

This commit is contained in:
Torsten Dittmann
2024-05-15 15:02:17 +02:00
parent 7dacea3e26
commit 88d9689c68
6 changed files with 50 additions and 28 deletions
+34
View File
@@ -0,0 +1,34 @@
name: E2E
on:
pull_request:
branches: ['**']
paths-ignore:
- '**/*.md'
- 'static/**/*'
env:
VITE_STRIPE_PUBLIC_KEY: ${{ vars.VITE_STRIPE_PUBLIC_KEY }}
VITE_APPWRITE_ENDPOINT: http://appwrite.test/v1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: E2E Tests
run: npm run e2e
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 7
+12 -12
View File
@@ -29,7 +29,7 @@
"devDependencies": {
"@melt-ui/pp": "^0.1.4",
"@melt-ui/svelte": "^0.61.2",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.44.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.3.4",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
@@ -1895,12 +1895,12 @@
}
},
"node_modules/@playwright/test": {
"version": "1.43.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.1.tgz",
"integrity": "sha512-HgtQzFgNEEo4TE22K/X7sYTYNqEMMTZmFS8kTq6m8hXj+m1D8TgwgIbumHddJa9h4yl4GkKb8/bgAl2+g7eDgA==",
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.0.tgz",
"integrity": "sha512-rNX5lbNidamSUorBhB4XZ9SQTjAqfe5M+p37Z8ic0jPFBMo5iCtQz1kRWkEMg+rYOKSlVycpQmpqjSFq7LXOfg==",
"dev": true,
"dependencies": {
"playwright": "1.43.1"
"playwright": "1.44.0"
},
"bin": {
"playwright": "cli.js"
@@ -7678,12 +7678,12 @@
}
},
"node_modules/playwright": {
"version": "1.43.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.1.tgz",
"integrity": "sha512-V7SoH0ai2kNt1Md9E3Gwas5B9m8KR2GVvwZnAI6Pg0m3sh7UvgiYhRrhsziCmqMJNouPckiOhk8T+9bSAK0VIA==",
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.0.tgz",
"integrity": "sha512-F9b3GUCLQ3Nffrfb6dunPOkE5Mh68tR7zN32L4jCk4FjQamgesGay7/dAAe1WaMEGV04DkdJfcJzjoCKygUaRQ==",
"dev": true,
"dependencies": {
"playwright-core": "1.43.1"
"playwright-core": "1.44.0"
},
"bin": {
"playwright": "cli.js"
@@ -7696,9 +7696,9 @@
}
},
"node_modules/playwright-core": {
"version": "1.43.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.1.tgz",
"integrity": "sha512-EI36Mto2Vrx6VF7rm708qSnesVQKbxEWvPrfA1IPY6HgczBplDx7ENtx+K2n4kJ41sLLkuGfmb0ZLSSXlDhqPg==",
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.0.tgz",
"integrity": "sha512-ZTbkNpFfYcGWohvTTl+xewITm7EOuqIqex0c7dNZ+aXsbrLj0qI8XlGKfPpipjm0Wny/4Lt4CJsWJk1stVS5qQ==",
"dev": true,
"bin": {
"playwright-core": "cli.js"
+1 -1
View File
@@ -42,7 +42,7 @@
"devDependencies": {
"@melt-ui/pp": "^0.1.4",
"@melt-ui/svelte": "^0.61.2",
"@playwright/test": "^1.37.1",
"@playwright/test": "^1.44.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.3.4",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
+1 -13
View File
@@ -1,21 +1,9 @@
import { type PlaywrightTestConfig, devices } from '@playwright/test';
import { type PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
timeout: 120000,
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
}
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] }
// }
],
reportSlowTests: null,
webServer: {
stderr: 'ignore',
stdout: 'ignore',
env: {
VITE_APPWRITE_ENDPOINT: 'http://console-tests.appwrite.org/v1',
VITE_CONSOLE_MODE: 'cloud'
+1 -1
View File
@@ -14,7 +14,7 @@ test('upgrade - free tier', async ({ page }) => {
await enterAddress(page);
// skip members
await page.getByRole('button', { name: 'next' }).click();
await page.getByRole('button', { name: 'start trial' }).click();
await page.getByRole('button', { name: 'create' }).click();
await page.waitForURL('/console/organization-**');
});
});
+1 -1
View File
@@ -36,7 +36,7 @@ export async function createProProject(page: Page): Promise<Metadata> {
// skip members
await page.getByRole('button', { name: 'next' }).click();
// start pro trial
await page.getByRole('button', { name: 'start trial' }).click();
await page.getByRole('button', { name: 'create' }).click();
await page.waitForURL('/console/organization-**');
return getOrganizationIdFromUrl(page.url());