-
Notifications
You must be signed in to change notification settings - Fork 2
SUP-19166: Unit tests #678
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: hotfix-6.3.x
Are you sure you want to change the base?
Conversation
|
|
||
| const dropZone = editable.locator('.form-element-drop-zone'); | ||
| const textInput = page.locator('gtx-form-editor-menu .form-element-type--used-as-title') | ||
| .getByText('Eingabefeld', { exact: true }); |
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.
Don't use translated text as identifier - This would break if the tests execute with english (or any other language for that matter) as language.
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.
A despair move -- I would be happy using a dedicated fixed ID. There is none though.
deckdom
left a comment
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.
Nitpicks, not required changes.
But would be good to have.
|
|
||
| // Wait for editor to be ready | ||
| const editable = page.locator('.form-editor-form'); | ||
| await editable.waitFor({ timeout: 60_000 }); |
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.
Please avoid such long timeouts for simple rendering.
The only place we should use these long timeouts is for aloha rendering, since these may actually take longer.
This here is direct app rendering, where the default timeout is more then enought.
| import { AUTH } from './common'; | ||
| import { editorAction, expectItemOffline, expectItemPublished, findItem, findList, itemAction, selectNode } from './helpers'; | ||
| import { editorAction, expectItemOffline, expectItemPublished, findItem, findList, itemAction, selectNode, getAlohaIFrame } from './helpers'; | ||
| import { has } from 'lodash-es'; |
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.
If it isn't used, then please don't import it
Vorsicht: tests pass only when https://github.com/gentics/cms-oss/pull/671/files is merged!