submit username and password

This commit is contained in:
Elio Bischof
2024-10-16 16:50:48 +02:00
parent 653b499668
commit f1b756b721
3 changed files with 13 additions and 9 deletions

View File

@@ -1,7 +1,12 @@
import { test, expect } from '@playwright/test';
test('get started link', async ({ page }) => {
await page.goto('http://localhost:8080/');
await page.getByRole('heading', { name: 'Welcome back!' }).isVisible();
test('username and password', async ({ page }) => {
await page.goto('/');
const loginname = page.getByLabel('Loginname')
await loginname.pressSequentially("zitadel-admin@zitadel.localhost");
await loginname.press( 'Enter');
const password = page.getByLabel('Password')
await password.pressSequentially("Password1!");
await password.press( 'Enter');
await page.getByText('Skip').click();
});

View File

@@ -1,7 +1,6 @@
import { test, expect } from '@playwright/test';
test('get started link', async ({ page }) => {
await page.goto('http://localhost:8080/');
import { test } from '@playwright/test';
test('login is accessible', async ({ page }) => {
await page.goto('http://localhost:3000/');
await page.getByRole('heading', { name: 'Welcome back!' }).isVisible();
});

View File

@@ -26,7 +26,7 @@ export default defineConfig({
/* 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://127.0.0.1:3000',
baseURL: 'http://127.0.0.1:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',