-
Notifications
You must be signed in to change notification settings - Fork 70
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
Conversation
… Data, Metadata, Page) - Removed duplicate elements (will cause generation error in future MFTF 2.3.0 release)
<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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, this was done on accident. Added one of the slideLinkURL1
back.
@@ -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"/> |
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.
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 first slide
, and all of the actions that use SlideOnFrontend.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!
… Data, Metadata, Page) - un-delete slideLinkURL1
…2-page-builder-739 [Imported] [#733 API Changes Mark Blocks as API
Description
Related Issue
Jenkins Build
https://m2build-ur.devops.magento.com/job/All-User-Requested-Tests/833/
Contribution checklist