snapshot of https://github.com/frappe/crm.git (develop, 2026-09-18; blobs > 131072B omitted)
Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 1s
Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 1s
This commit is contained in:
26
e2e/pages/login.page.ts
Normal file
26
e2e/pages/login.page.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Page, expect } from '@playwright/test'
|
||||
|
||||
/**
|
||||
* Frappe's standard login page. After a successful login with
|
||||
* redirect-to=/crm the browser lands on the CRM SPA.
|
||||
*/
|
||||
export class LoginPage {
|
||||
constructor(private page: Page) {}
|
||||
|
||||
async goto() {
|
||||
await this.page.goto('/login?redirect-to=/crm')
|
||||
await this.page.waitForLoadState('networkidle')
|
||||
}
|
||||
|
||||
async login(email = 'Administrator', password = 'admin') {
|
||||
await this.goto()
|
||||
await this.page.fill('#login_email', email)
|
||||
await this.page.fill('#login_password', password)
|
||||
await this.page.click('button.btn-login')
|
||||
await this.page.waitForURL(/\/crm/, { timeout: 30000 })
|
||||
}
|
||||
|
||||
async expectOnLoginPage() {
|
||||
await expect(this.page).toHaveURL(/.*login.*/)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user