Working on the attribute weight issue uncovered a number of issues in the add to cart form test.
It creates attribute fields without using the attribute field manager, which results in the caches not being cleared.
This creates a false pass in testMultipleVariationsMultipleAttributes().

There's also a problem in testAttributeDependencies, where we setup attributes as Size -> Color, but then test Color -> Size.
Using the attribute field manager fixes the ordering, which causes the test to fail.

Plan for fixing this:
1) Start using the attribute field manager
2) Fix the assertion in testMultipleVariationsMultipleAttributes()
3) Change the expected ordering in testAttributeDependencies() to be Color -> Size, matching the assertions.

Comments

bojanz created an issue. See original summary.

  • bojanz committed b40d0af on 8.x-2.x
    Issue #2705377: The AddToCartFormTest is broken
    
bojanz’s picture

Status: Active » Fixed

Refactored, fixed all issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.