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
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1m13s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 6s
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

This commit is contained in:
upstream-mirror
2026-09-18 01:36:01 +05:00
commit db69de1c11
905 changed files with 102713 additions and 0 deletions

35
e2e/tests/login.spec.ts Normal file
View File

@@ -0,0 +1,35 @@
import { test, expect } from '@playwright/test'
import { LoginPage } from '../pages'
/**
* Exercises the real login flow through Frappe's login page into the CRM SPA.
* Runs without the shared auth state so it can assert the guest -> logged-in
* transition itself.
*/
test.describe('Login', () => {
test.use({ storageState: { cookies: [], origins: [] } })
test('logs in and lands on the CRM app', async ({ page }) => {
const login = new LoginPage(page)
await login.login(
process.env.FRAPPE_USER || 'Administrator',
process.env.FRAPPE_PASSWORD || 'admin',
)
await expect(page).toHaveURL(/\/crm/)
// The CRM shell renders its primary navigation once booted.
await expect(
page.getByRole('link', { name: 'Leads' }).first(),
).toBeVisible()
})
test('rejects invalid credentials', async ({ page }) => {
const login = new LoginPage(page)
await login.goto()
await page.fill('#login_email', 'Administrator')
await page.fill('#login_password', 'wrong-password')
await page.click('button.btn-login')
await login.expectOnLoginPage()
})
})