CumulusCI icon indicating copy to clipboard operation
CumulusCI copied to clipboard

Feature/playwright open browser enhancements

Open boakley opened this issue 3 years ago • 0 comments

Ok, I'm going to say this is ready for review. Some playwright tests are flakey on github actions -- especially on firefox -- but they seem to work well for me locally. I think I need to add a separate story for the flakiness so we can move on. Maybe you, intrepid reviewer, can spot a tree I can't see for the forest.

This adds support for handling the case when Open Test Browser lands on a class page, which seems to happen randomly. Instead of relying on the browser library's Wait until the network is idle, this does a small set of checks before returning control to the test. In addition to checking for classic mode, I'll soon be adding an additional check for landing on a login page which also seems to happen randomly.

I largely copied the logic from the Salesforce.py keyword of the same name, though I tried to streamline it a tad and also had to change all selenium function calls to browser function calls.

There is a robot test that forces the org into classic mode and then calls the Open Test Browser keyword to make sure it switches to lightning automatically. I've run the test hundreds of times, and if it fails it usually fails in the setup before this code ever gets executed. I have some ideas about how to fix those setup steps, but I want that to be a separate checkin.

boakley avatar Jul 25 '22 21:07 boakley