mitodl / mitxpro

BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Applying Coupon Changes Course to Last Viewed Course (subtle) #1662

Open odlbot opened 4 years ago

odlbot commented 4 years ago

Steps to Reproduce

If you apply a coupon code to a course, it will switch to the last viewed course. The steps to reproduce will help you understand:

Steps to reproduce:

  1. View course: https://xpro.mit.edu/checkout/?product=18 (Quantitative Methods in Systems Engineering)
  2. Open another course in a different tab: https://xpro.mit.edu/checkout/?product=16 (Model-Based Systems Engineering: Documentation and Analysis)
  3. Return to the first tab (don't refresh or reload the tab)
  4. Enter coupon code: SPRING2020
  5. Click Apply

Note that the course (Quantitative Methods in Systems Engineering) changes to the last loaded course in the other tab (Model-Based Systems Engineering: Documentation and Analysis)

This doesn't not seem like the right behavior.

Note: Peter suspects this could be cookie-related.

Expected Behavior

In the case above, it shouldn't switch courses. When you apply the coupon, it should not change courses.

Actual Behavior

As noted in the steps to reproduce, when you apply a coupon code, it changes to the last viewed/loaded course.

Related Issues

ZenDesk: https://odl.zendesk.com/agent/tickets/49642

pdpinch commented 4 years ago

Possibly related issue: #484