generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MWPW-155566] [MEP] Allow relevant actions in MEP to use text and HTM…
…L instead of just fragments (#2683) * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * added test coverage for action * cleanup * added comments * comments * comments * fixes erroring but still has failure * rooEl fix * fixed tests * added modifier * eslint * lint * removed reduncant try catch * Add target analytics for update action * removed test-results and added to .gitignore * reverted a deletion of a prependtosection validation code * removed comments * updated validation for appendtosdection * removed comments and eslint escapes * change modifier to an array that is not a separate column * add highight for update * add timeout to merch-card highlight * remove setTimeout and move preview.js call from loadPostLCP to loadDeferred * update unit test * remove update to git ignore * add temp console message for easy QA * MWPW-155566 [MEP] Changing from a new action to just expanding power of existing actions (#2764) * stash * use replace instead of update, allow html for create commands, update simplified selectors * streamline * remove export on MILO_BLOCKS * change prependToSection and appendToSection to just prepend and append * remove unused function param * change from includes to === * remove use of .parentElement * move spoof param test so you can reload the other tests * account for number used after dot notation * add test to insertbefore and insert after href * more coverage * more coverage * hopefully final coverage * remove console * rename checkSelectorType to getSelectorType * move parts of createContent into sub functions * small big fix * update modifySelectorTerm function per suggestion * update modifyNonFragmentSelector per suggestion * update to getSelectedElement * change equal to not equal * fix end number update * codecov * no longer require fragments be in URL for fragments because of gnav * call getModifiers in modifyNonFragmentSelector instead * require space before first flag * update unit tests to need space before flags * handle adding flags to fragment selectors * revert for demo * put back * remove utils update so it does not conflict --------- Co-authored-by: Denys Fedotov <[email protected]> Co-authored-by: vgoodric <[email protected]> Co-authored-by: markpadbe <[email protected]> Co-authored-by: Vivian A Goodrich <[email protected]>
- Loading branch information
1 parent
6012fcb
commit 6362c19
Showing
13 changed files
with
602 additions
and
168 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
65 changes: 65 additions & 0 deletions
65
test/features/personalization/mocks/actions/manifestTargetUpdate.json
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,65 @@ | ||
{ | ||
"total": 5, | ||
"offset": 0, | ||
"limit": 5, | ||
"data": [ | ||
{ | ||
"action": "replace", | ||
"selector": ".marquee h2", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "", | ||
"target-var1": "updated text", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "marquee primary-cta", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "", | ||
"target-var1": "updated text", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": ".marquee primary-cta", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "", | ||
"'modifier": "href", | ||
"target-var1": "https://test.com/updated_href", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "marquee secondary-cta", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "", | ||
"target-var1": "updated text", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "section5 marquee action-area", | ||
"'modifier": "html", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "", | ||
"target-var1": "<p>updated text</p>", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
} | ||
], | ||
":type": "sheet" | ||
} |
74 changes: 74 additions & 0 deletions
74
test/features/personalization/mocks/actions/manifestUpdate.json
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,74 @@ | ||
{ | ||
"total": 5, | ||
"offset": 0, | ||
"limit": 5, | ||
"data": [ | ||
{ | ||
"action": "replace", | ||
"selector": ".marquee h2", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "updated text", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "marquee primary-cta", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "updated text", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": ".marquee primary-cta #_href", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "https://test.com/updated_href", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "marquee secondary-cta", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "updated text", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "section5 marquee action-area", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "<p>updated text</p>", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
}, | ||
{ | ||
"action": "replace", | ||
"selector": "section5...%$@#", | ||
"page filter (optional)": "", | ||
"param-newoffer=123": "", | ||
"chrome": "<p>updated text</p>", | ||
"target-var1": "", | ||
"firefox": "", | ||
"android": "", | ||
"ios": "" | ||
} | ||
], | ||
":type": "sheet" | ||
} |
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.