-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BACKLOG-23137 Add static choicelist test (#1757)
* BACKLOG-23137 Add static test * BACKLOG-23137 Enable module on site
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import {JContent} from '../page-object'; | ||
import {createSite, deleteSite, Dropdown, enableModule, getComponentBySelector} from '@jahia/cypress'; | ||
|
||
// Override defined in jcontent-test-module, forms/cent_choiceListSelectorTypeOverride.json | ||
describe('Choicelist tests', {defaultCommandTimeout: 10000}, () => { | ||
let jcontent: JContent; | ||
|
||
const siteKey = 'contentEditorSite'; | ||
|
||
before(() => { | ||
createSite(siteKey); | ||
enableModule('content-editor-test-module', siteKey); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginEditor(); | ||
}); | ||
|
||
after(() => { | ||
deleteSite(siteKey); | ||
cy.logout(); | ||
}); | ||
|
||
it('should select from basic static choicelist with no default value', () => { | ||
jcontent = JContent.visit(siteKey, 'en', 'content-folders/contents'); | ||
jcontent.createContent('choiceListSelectorTypeOverride'); | ||
const field: Dropdown = getComponentBySelector(Dropdown, '[data-sel-content-editor-field="cent:choiceListSelectorTypeOverride_noDefaultList"]'); | ||
field.select('choice1'); | ||
field.get().click(); | ||
field.get().find('.moonstone-menuItem').should('have.length', 2); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters