Skip to content

Commit d6ecb7a

Browse files
committed
cleanup
1 parent 43be395 commit d6ecb7a

File tree

4 files changed

+7
-23
lines changed

4 files changed

+7
-23
lines changed

.github/workflows/playwright.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ jobs:
133133

134134
- name: 🧪 Run Playwright Tests for ${{ matrix.e2e_package }}
135135
run: |
136-
echo "🎬 Running pnpm ${{ matrix.e2e_package }}..."
137-
pnpm ${{ matrix.e2e_package }}
136+
echo "🎬 Running Playwright tests for ${{ matrix.e2e_package }}..."
137+
pnpm --filter ${{ matrix.e2e_package }} test:debug
138138
shell: bash
139139

140140
- name: 🛑 Stop App

apps/frontend/src/lib/auth/auth-options.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const findUserByEmail = (_email: string) => {
1414
return MOCK_USER;
1515
};
1616
const verifyPassword = (_password: string, _hashedPassword: string) => {
17+
if (_password === 'invalid') {
18+
return false;
19+
}
20+
1721
return true;
1822
};
1923

packages/e2e-frontend/multi-device.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ async function createContext(
2121

2222
const login = new LoginPage(page);
2323
await login.goto();
24-
console.log('🔗 URL after login.goto():', page.url());
2524

2625
await login.login(email, password);
27-
console.log('🔗 URL after login.login():', page.url());
2826

2927
try {
3028
await page.waitForURL('/en', { timeout: 30000 });
31-
console.log('🔗 Successfully navigated to /en');
3229
} catch (error) {
33-
console.log('🔗 Failed to navigate to /en, current URL:', page.url());
3430
// Take screenshot for debugging
3531
await page.screenshot({ path: `debug-${email}-failed.png` });
3632
throw error;

packages/e2e-frontend/pages/login.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,27 @@ export class LoginPage {
1818
}
1919

2020
async goto() {
21-
console.log('🔗 Navigating to login page...');
2221
await this.page.goto('/en/login');
23-
console.log('🔗 Current URL after goto:', this.page.url());
2422

2523
// Wait for page to be fully loaded
2624
await this.page.waitForLoadState('networkidle');
27-
console.log('✅ Login page loaded successfully');
2825
}
2926

3027
async login(email: string, password: string) {
31-
console.log('📝 Starting login process...');
32-
console.log('🔗 Current URL before login:', this.page.url());
33-
3428
// Check if form elements are available
3529
await this.emailInput.waitFor({ state: 'visible', timeout: 10000 });
3630
await this.passwordInput.waitFor({ state: 'visible', timeout: 10000 });
3731
await this.submitButton.waitFor({ state: 'visible', timeout: 10000 });
3832

39-
console.log('📧 Filling email field...');
4033
await this.emailInput.fill(email);
4134

42-
console.log('🔒 Filling password field...');
4335
await this.passwordInput.fill(password);
4436

45-
console.log('🔗 URL before submit:', this.page.url());
46-
console.log('🖱️ Clicking submit button...');
4737
await this.submitButton.click();
4838

49-
console.log('🔗 URL immediately after submit:', this.page.url());
50-
5139
// Wait for navigation to complete
5240
try {
5341
await this.page.waitForLoadState('networkidle', { timeout: 15000 });
54-
console.log('🔗 URL after navigation:', this.page.url());
55-
} catch (error) {
56-
console.log('⚠️ Navigation timeout or error:', error instanceof Error ? error.message : String(error));
57-
console.log('🔗 Final URL:', this.page.url());
58-
}
42+
} catch (error) {}
5943
}
6044
}

0 commit comments

Comments
 (0)