-
Notifications
You must be signed in to change notification settings - Fork 212
MWPW-180988 [OST] Draft Offers Toggle / MAS Defaults Toggle #5193
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
base: stage
Are you sure you want to change the base?
Conversation
Roycethan
left a comment
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.
- with https://mwpw180988--milo--bozojovicic.aem.live/tools/ost?token=<>
i'm able to see the toggle on the first screen here:
But to check the next screen the offers are are not getting listing/populated in this branch, is there anything needs to be configured to see the products/offers and move to next screen ?
- In here https://main--cc--adobecom.aem.live/products/catalog?milolibs=mwpw180988--milo--bozojovicic
The analytics events are not getting fired( i don' t see them in my network tab) for these below ones , i see its getting fired for other clicks...
Typing "acro" inside Search box
Clicking on Popularity or Alphabetical sorting options
Other than these non regressions are looking fine.
|
@Roycethan 1) works for me, it was always working, I did this so many times with token parameter and now I did it as well, never had problems For 2) you are right. Probably something is wrong with the git branch. I will check. UPDATE: As I thought, something was wrong with the branch. I updated it with the fresh stage code and now analytics works fine https://main--cc--adobecom.aem.live/products/catalog?milolibs=mwpw180988--milo--bozojovicic |
|
Reminder to set the |
mirafedas
left a comment
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.
Could you please add unit tests?
|
@mirafedas I added unit tests that enable/disable both toggle switches. I had to slightly adapt some functions in |
| const el = document.createElement('div'); | ||
| const ostEnv = { landscape: 'PUBLISHED' }; | ||
| const windowObj = { location: {} }; | ||
| const cbs = addToggleSwitches(el, ostEnv, true, windowObj); |
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.
UPD: I forgot that assigning to window.location.href is restricted in our test environment. Instead of passing the window object around, could we return the new window.location.href value? That way the test can simply assert that it changed as expected. If no, then nevermind :)
Nit: please separate every it(...) with a new line, to have it consistent with the rest of the files
|
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |

Add DRAFT/PUBLISHED landscape toggle switch and MAS defaults on/off toggle switch
to the top right corner of OST.
the toggle switch is placed in the top right corner, it simply changes the value of the
commerce.landscapeandcommerce.defaultsquery parameters and reloads the page. In this way no changes in tacocat are needed.By defaults MAS defaults will be enabled and landscape will be PUBLISHED.
Resolves: MWPW-180988
Test URLs: