-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor cypress tests with commands and data tags #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
6e894dd
9599516
108bf02
f8b0c4b
9d5889d
5cf7186
da5c962
24ff1b0
7fc4b2c
4aa1db9
66f5a74
b1ea1ab
04518ac
216786e
23561ce
008a2ff
6b77f60
887d281
40a4ea0
f46056c
025218d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||
| import { JSXElement } from 'solid-js' | ||||||||||
| import { JSXElement, JSX } from 'solid-js' | ||||||||||
| import { clsx } from 'clsx' | ||||||||||
| import { TranslationKey, useLocale } from '../context/LocaleProvider' | ||||||||||
|
|
||||||||||
|
|
@@ -8,7 +8,9 @@ interface AlertProps { | |||||||||
| class?: string | ||||||||||
| } | ||||||||||
|
|
||||||||||
| export function Alert(props: AlertProps): JSXElement { | ||||||||||
| export function Alert( | ||||||||||
| props: AlertProps & JSX.HTMLAttributes<HTMLDivElement> | ||||||||||
| ): JSXElement { | ||||||||||
| const { t } = useLocale() | ||||||||||
|
|
||||||||||
| const translated = () => t((props.message as TranslationKey) ?? '') | ||||||||||
|
|
@@ -25,6 +27,7 @@ export function Alert(props: AlertProps): JSXElement { | |||||||||
| <div | ||||||||||
| role="alert" | ||||||||||
| class={clsx('alert my-4', types[props.type].alert, props?.class)} | ||||||||||
| {...props} | ||||||||||
|
Comment on lines
27
to
+30
|
||||||||||
| class={clsx('alert my-4', types[props.type].alert, props?.class)} | |
| {...props} | |
| {...props} | |
| class={clsx('alert my-4', types[props.type].alert, props?.class)} |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -54,13 +54,15 @@ export function TopBar(): JSXElement { | |||||
| <button | ||||||
| class="btn btn-ghost" | ||||||
| onClick={() => setOpenLoginModal(true)} | ||||||
| data-cy="open-login-modal" | ||||||
| > | ||||||
| {t('login')} | ||||||
| </button> | ||||||
|
|
||||||
| <button | ||||||
| class="btn btn-ghost" | ||||||
| onClick={() => setOpenRegisterModal(true)} | ||||||
| data-cy="open-register-modal" | ||||||
| > | ||||||
| {t('register')} | ||||||
| </button> | ||||||
|
|
@@ -108,6 +110,7 @@ export function TopBar(): JSXElement { | |||||
| setOpenLoginModal(true) | ||||||
| setSidebarOpen(false) | ||||||
| }} | ||||||
| data-cy="open-login-modal-mobile" | ||||||
| > | ||||||
| <i class="fa-solid fa-sign-in-alt mr-2" /> | ||||||
| {t('login')} | ||||||
|
|
@@ -119,6 +122,7 @@ export function TopBar(): JSXElement { | |||||
| setOpenRegisterModal(true) | ||||||
| setSidebarOpen(false) | ||||||
| }} | ||||||
| data-cy="open-login-modal-mobile" | ||||||
|
||||||
| data-cy="open-login-modal-mobile" | |
| data-cy="open-register-modal-mobile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The selector is missing a closing bracket. It should be corrected to: cy.get('[data-cy="toggle-profile-menu-dropdown"]').click();