mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
install cypress and add initial test
This commit is contained in:
parent
23a45a3109
commit
5b9f0707b8
10 changed files with 768 additions and 20 deletions
|
|
@ -42,17 +42,30 @@ export function LoginForm() {
|
|||
<div className={styles.title}>umami</div>
|
||||
<Form className={styles.form} onSubmit={handleSubmit} error={getMessage(error)}>
|
||||
<FormRow label={formatMessage(labels.username)}>
|
||||
<FormInput name="username" rules={{ required: formatMessage(labels.required) }}>
|
||||
<FormInput
|
||||
data-cy="input-username"
|
||||
name="username"
|
||||
rules={{ required: formatMessage(labels.required) }}
|
||||
>
|
||||
<TextField autoComplete="off" />
|
||||
</FormInput>
|
||||
</FormRow>
|
||||
<FormRow label={formatMessage(labels.password)}>
|
||||
<FormInput name="password" rules={{ required: formatMessage(labels.required) }}>
|
||||
<FormInput
|
||||
data-cy="input-password"
|
||||
name="password"
|
||||
rules={{ required: formatMessage(labels.required) }}
|
||||
>
|
||||
<PasswordField />
|
||||
</FormInput>
|
||||
</FormRow>
|
||||
<FormButtons>
|
||||
<SubmitButton className={styles.button} variant="primary" disabled={isPending}>
|
||||
<SubmitButton
|
||||
data-cy="button-submit"
|
||||
className={styles.button}
|
||||
variant="primary"
|
||||
disabled={isPending}
|
||||
>
|
||||
{formatMessage(labels.login)}
|
||||
</SubmitButton>
|
||||
</FormButtons>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export function ProfileButton() {
|
|||
|
||||
return (
|
||||
<PopupTrigger>
|
||||
<Button variant="quiet">
|
||||
<Button data-cy="button-profile" variant="quiet">
|
||||
<Icon>
|
||||
<Icons.Profile />
|
||||
</Icon>
|
||||
|
|
@ -41,7 +41,7 @@ export function ProfileButton() {
|
|||
<Text>{formatMessage(labels.profile)}</Text>
|
||||
</Item>
|
||||
{!cloudMode && (
|
||||
<Item key="logout" className={styles.item}>
|
||||
<Item data-cy="item-logout" key="logout" className={styles.item}>
|
||||
<Icon>
|
||||
<Icons.Logout />
|
||||
</Icon>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue