Skip to content

Switch Account Selenium Test - #1725

Open
ryan-morosa wants to merge 6 commits into
masterfrom
ryan-morosa/bb2-4994-selenium-switch-account-test
Open

Switch Account Selenium Test#1725
ryan-morosa wants to merge 6 commits into
masterfrom
ryan-morosa/bb2-4994-selenium-switch-account-test

Conversation

@ryan-morosa

@ryan-morosa ryan-morosa commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

JIRA Ticket:
BB2-4994

What Does This PR Do?

This PR adds a selenium test that goes to the v3 permissions screen with BBUser09003, clicks Switch account, and then logs in as a different user BBUser_00000. The test should confirm that the second user, who clicks Share on the v3 permissions screen, successfully accesses the testclient page.

Summary of Changes:

  • Added a selenium test testing the switch account functionality above to selenium_tests.py
  • Unrelated to the actual story I added doc strings to each of the selenium_generic.py tests to make it easier to understand what's going on
  • Did some rework on the login functionality to make it easier to login with new users. Before it was hardcoding the login flows for only one specific user so I made it more dynamic by being able to pass in params for the login info of any user, regardless if it's the MSLSX or SLSX flow.
  • Renamed CALL_LOGIN to be CALL_LOGIN_BBUSER_09003 to be explicit about who's logging in in all the test cases. Added CALL_LOGIN_BBUSER_00000 to be the second user login

What Should Reviewers Watch For?

If you're reviewing this PR, please check for these things in particular:

Validation

  • See that all selenium tests pass in the PR checks, including the newest added one as a part of this PR. There should be 12 total now.
  • I don't think you will be able to because of ZScaler but you can check out this branch and try to debug the selenium test with slsx (not mslsx) by following the instructions in the Debugging section of ops/containers/selenium/README.md. However, instead of bringing up the bb-api stack with auth=mock, you can bring it up with auth=live (just run make run-local). For selenium you can then run make run-selenium-local debug=true. You can comment out other selenium tests to make it easier to debug and set breakpoints accordingly. But you should at least be able to get past the first log in with BBUser09003 and then you'll likely get the ZScaler issue. I can huddle if it's too hard to do this on your own but running against prod/sbx below seems like the most promising way of testing it with slsx.
  • You can run ./docker-compose/run_selenium_tests_remote.sh PROD or SBX and all 12 should pass

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies
  • Modifies any security controls
  • Adds new transmission or storage of data
  • Any other changes that could possibly affect security?
  • Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team
    security engineer's approval.

Any Migrations?

  • Yes, there are migrations
    • The migrations should be run PRIOR to the code being deployed
    • The migrations should be run AFTER the code is deployed
    • There is a more complicated migration plan (downtime,
      etc)
  • No migrations

@ryan-morosa ryan-morosa changed the title Get initial switch account working but for the same user Switch Account Selenium Test Sep 3, 2026
@ryan-morosa
ryan-morosa marked this pull request as ready for review September 4, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant