-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* QA-15348 Fixes for the condition property of json overrides * Add extendMixin test for overrides * Make changes to failing tests * Fix init for hidePreview test * Fix choicetree test * Refactor login setup for search and areaActions * Fix test lint --------- Co-authored-by: Geofrey Flores <[email protected]>
- Loading branch information
1 parent
d7e3a86
commit 943d560
Showing
12 changed files
with
172 additions
and
48 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
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
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
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
43 changes: 43 additions & 0 deletions
43
tests/cypress/e2e/contentEditor/jsonOverrides/extendMixins.cy.ts
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,43 @@ | ||
import {JContent} from '../../../page-object'; | ||
import {SmallTextField} from '../../../page-object/fields'; | ||
import {createSite, deleteSite, enableModule} from '@jahia/cypress'; | ||
|
||
// This test makes use of jmix_freezeSystemName.json form override from jcontent-test-module | ||
describe('Extend Mixins tests with CE', () => { | ||
const siteKey = 'extendMixinsSite'; | ||
|
||
before(() => { | ||
createSite(siteKey); | ||
enableModule('jcontent-test-module', siteKey); | ||
}); | ||
|
||
after(() => { | ||
cy.logout(); | ||
deleteSite(siteKey); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.loginAndStoreSession(); | ||
}); | ||
|
||
it('Applies extend mixin only if it is enabled on the node', () => { | ||
const jcontent = JContent.visit(siteKey, 'en', 'pages'); | ||
let contentEditor = jcontent.editPage(); | ||
const systemNameFieldSel = 'nt:base_ce:systemName'; | ||
|
||
cy.log('Verify conditional override is not applied'); | ||
let systemNameField = contentEditor.getField(SmallTextField, systemNameFieldSel); | ||
systemNameField.isNotReadOnly(); | ||
|
||
cy.log('Enable the mixin'); | ||
contentEditor.toggleOption('jmix:freezeSystemName'); | ||
contentEditor.save(); | ||
|
||
cy.log('Verify conditional override is applied after applying mixin'); | ||
contentEditor = jcontent.editPage(); | ||
systemNameField = contentEditor.getField(SmallTextField, systemNameFieldSel); | ||
systemNameField.isReadOnly(); | ||
|
||
contentEditor.cancel(); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.