mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 20:11:31 +03:00
0fc09f8723
- Fix https://github.com/enso-org/cloud-v2/issues/1422 - Show errors on "login" page by switching to custom Form component - Also convert "registration", "reset password" and "forgot password" pages to use the new component - Preserve email when navigating between auth pages # Important Notes None
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
/** @file Test the login flow. */
|
|
import * as test from '@playwright/test'
|
|
|
|
import { INVALID_PASSWORD, mockAll, TEXT, VALID_EMAIL, VALID_PASSWORD } from './actions'
|
|
|
|
// =============
|
|
// === Tests ===
|
|
// =============
|
|
|
|
test.test('sign up without organization id', ({ page }) =>
|
|
mockAll({ page })
|
|
.goToPage.register()
|
|
.registerThatShouldFail('invalid email', VALID_PASSWORD, VALID_PASSWORD, {
|
|
assert: {
|
|
emailError: TEXT.invalidEmailValidationError,
|
|
passwordError: null,
|
|
confirmPasswordError: null,
|
|
formError: null,
|
|
},
|
|
})
|
|
.registerThatShouldFail(VALID_EMAIL, INVALID_PASSWORD, INVALID_PASSWORD, {
|
|
assert: {
|
|
emailError: null,
|
|
passwordError: TEXT.passwordValidationError,
|
|
confirmPasswordError: null,
|
|
formError: null,
|
|
},
|
|
})
|
|
.registerThatShouldFail(VALID_EMAIL, VALID_PASSWORD, INVALID_PASSWORD, {
|
|
assert: {
|
|
emailError: null,
|
|
passwordError: null,
|
|
confirmPasswordError: TEXT.passwordMismatchError,
|
|
formError: null,
|
|
},
|
|
})
|
|
.register(),
|
|
)
|