-
Notifications
You must be signed in to change notification settings - Fork 72
MQE-1033: Validate duplicate element names in the same file (Section, Data, Metadata, Page) #87
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
aef907b
MQE-1033: Validate duplicate element names in the same file (Section,…
KevinBKozan 39d6f4d
MQE-1033: Validate duplicate element names in the same file (Section,…
KevinBKozan af91013
Merge remote-tracking branch 'mainline/develop' into MQE-1033
tjwiebell 584a96f
Merge remote-tracking branch 'mainline/develop' into MQE-1033
tjwiebell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -58,16 +58,13 @@ | |
<element name="posterOverlay" type="button" selector=".pagebuilder-poster-overlay"/> | ||
</section> | ||
<section name="SlideOnFrontend"> | ||
<element name="slide" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]" parameterized="true"/> | ||
<element name="slideWithArg" type="button" selector="(//div[@data-role='slide'])[{{arg1}}]" parameterized="true"/> | ||
<element name="slideName" type="text" selector="[data-slick-index='{{arg1}}'] div.pagebuilder-mobile-hidden.pagebuilder-slide-wrapper div div h3" parameterized="true"/> | ||
<element name="slideContent" type="text" selector="[data-slick-index='{{arg1}}'] div.pagebuilder-mobile-hidden.pagebuilder-slide-wrapper div div div p" parameterized="true"/> | ||
<element name="slideButtonText" type="text" selector="[data-slick-index='{{arg1}}'] div.pagebuilder-mobile-hidden div div button.pagebuilder-slide-button" parameterized="true"/> | ||
<element name="slideLinkURL1" type="text" selector="[data-slick-index='0'] a[href*='{{arg1}}']" parameterized="true"/> | ||
<element name="slideHasOverlay1" type="text" selector="[data-slick-index='0'] [data-role='slide'] .pagebuilder-content.has-overlay-background"/> | ||
<element name="slide1" type="text" selector="[data-slick-index='0'] [data-role='slide'] div.pagebuilder-poster-content > h3:nth-child(1)"/> | ||
<element name="slideContent1" type="text" selector="[data-slick-index='0'] [data-role='slide'] div.pagebuilder-poster-content div:nth-child(2) > p:nth-child(1)"/> | ||
<element name="slideButtonText1" type="text" selector="[data-slick-index='0'] [data-role='slide'] div.pagebuilder-poster-content > button.pagebuilder-slide-button"/> | ||
<element name="slideLinkURL1" type="text" selector="[data-slick-index='0'] a[href*='{{arg1}}']" parameterized="true"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @KevinBKozan why are both "slideLinkURL1" elements deleted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, this was done on accident. Added one of the |
||
<element name="slideHasOverlay1" type="text" selector="[data-slick-index='0'] [data-role='slide'] .pagebuilder-content.has-overlay-background"/> | ||
<element name="slide2" type="button" selector="[data-slick-index='1'] [data-role='slide']"/> | ||
<element name="slideName2" type="text" selector="[data-slick-index='1'] [data-role='slide'] div.pagebuilder-poster-content > h3:nth-child(1)" /> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@KevinBKozan why was the above deleted & this one added but no tests or action groups that use the parameterized selectors updated?
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.
I deleted all exact duplicates, and renamed this one as it had its own selector.
I can delete it as well if you think I should.
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.
@KevinBKozan no I'm saying you renamed the selector but did not update the tests that were using this selector (tests that were passing an argument to "slide". I think if you do a Find In Path for ".slide(" you should find all the elements that need to be updated to use this new element name
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.
Hm. This is weird, as this contradicts how I understood MFTF to read elements (it's supposed to read sequentially, so the second slide element should overwrite this one).
Let me go back and investigate this.
Uh oh!
There was an error while loading. Please reload this page.
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.
@dhaecker So yes, my assumption is correct. The second
slide
overwrites the firstslide
, and all of the actions that useSlideOnFrontend.slide('1')
resolve to the slide with no parameters (meaning my changes have no effect on the test's execution). It doesn't seem MFTF has a check if you're passing in params to an unparameterized argument (just the other way around).My goal in this PR is simply to make sure you guys don't have dupes, which would cause generation errors in MFTF
2.3.0
, so I wanted to keep my changes as concise as possible so as to not affect test execution (and leave that to you guys, who know how and what should be going on in these tests).In light of that wall of text, what do you want me to do here?
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.
ok no worries. i'll create a jira ticket for pagebuilder people to fix the issue so you dont have to worry about tests failing ;)
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.
Fantastic, thank you very much!