Skip to content

Commit

Permalink
TASK Fix test by using another page for title modification
Browse files Browse the repository at this point in the history
The home page will not show the uripathsegment any longer
  • Loading branch information
mhsdesign committed Feb 15, 2024
1 parent cb4d6b9 commit 546ba58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions Configuration/NodeTypes.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'Neos.Neos:Document':
ui:
group: 'general'
creationDialog:
elements:
title:
Expand All @@ -9,7 +8,7 @@
label: i18n
editor: 'Neos.Neos/Inspector/Editors/TextFieldEditor'
validation:
'Neos.Neos/Validation/NotEmptyValidator': []
'Neos.Neos/Validation/NotEmptyValidator': {}
properties:
uriPathSegment:
ui:
Expand Down
25 changes: 13 additions & 12 deletions Tests/IntegrationTests/Fixtures/1Dimension/inspector.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,32 @@ test('Can edit the page title via inspector', async t => {
const InspectorUriPathSegmentProperty = Selector(
'#__neos__editor__property---uriPathSegment'
);
await Page.waitForIframeLoading(t);

subSection('Rename home page via inspector');
await Page.goToPage('Discarding')

subSection('Rename Discarding page via inspector');
await t
.expect(InspectorTitleProperty.value)
.eql('Home')
.eql('Discarding')
.expect(InspectorUriPathSegmentProperty.value)
.eql('home')
.eql('discarding')
.click(InspectorTitleProperty)
.typeText(InspectorTitleProperty, '-привет!')
.expect(InspectorTitleProperty.value)
.eql('Home-привет!')
.eql('Discarding-привет!')
.wait(200)
.click(Selector('#neos-UriPathSegmentEditor-sync'))
.expect(InspectorUriPathSegmentProperty.value)
.eql('home-privet')
.eql('discarding-privet')
.click(Selector('#neos-Inspector-Discard'))
.expect(InspectorTitleProperty.value)
.eql('Home')
.eql('Discarding')
.typeText(InspectorTitleProperty, '-1')
.click(Selector('#neos-Inspector-Apply'))
.expect(InspectorTitleProperty.value)
.eql('Home-1');
.eql('Discarding-1');
await Page.waitForIframeLoading(t);
await t.expect(InspectorTitleProperty.value).eql('Home-1');
await t.expect(InspectorTitleProperty.value).eql('Discarding-1');

subSection('Test unapplied changes dialog - resume');
await t
Expand All @@ -51,22 +52,22 @@ test('Can edit the page title via inspector', async t => {
.expect(Selector('#neos-UnappliedChangesDialog').exists)
.notOk()
.expect(InspectorTitleProperty.value)
.eql('Home-1-2');
.eql('Discarding-1-2');

subSection('Test unapplied changes dialog - discard');
await t
.click(Selector('#neos-Inspector'), {offsetX: -400}) // hack to click into the iframe even with overlaying changes div in dom
.click(Selector('#neos-UnappliedChangesDialog-discard'))
.expect(InspectorTitleProperty.value)
.eql('Home-1');
.eql('Discarding-1');

subSection('Test unapplied changes dialog - apply');
await t
.typeText(InspectorTitleProperty, '-3')
.click(Selector('#neos-Inspector'), {offsetX: -400}) // hack to click into the iframe even with overlaying changes div in dom
.click(Selector('#neos-UnappliedChangesDialog-apply'))
.expect(InspectorTitleProperty.value)
.eql('Home-1-3')
.eql('Discarding-1-3')
.click(Selector('#neos-Inspector'), {offsetX: -400}) // hack to click into the iframe even with overlaying changes div in dom
.expect(Selector('#neos-UnappliedChangesDialog').exists)
.notOk();
Expand Down

0 comments on commit 546ba58

Please sign in to comment.