Skip to content

Add Check for Invalid Login or Password Banner for Debugging E2E 403 Account Blocked Errors

Valerie Burton requested to merge add-invalid-login-check-for-debug into master

What does this MR do and why?

To help better debug #351617 (closed), this adds a check for the "Invalid login or password" banner after a test attempts to log in via the UI and prints the result to our debug logs. This could hopefully give us more information around whether unsuccessful login attempts within our tests are triggering these errors.

A message similar to the following would be printed out to the console:

[date=2022-03-04 16:51:06 from=QA Tests] DEBUG -- has_text?('Invalid login or password', wait: 0) returned false

How to set up and validate locally

  1. Within your local GDK, run QA_DEBUG='true' bundle exec bin/qa Test::Instance::All <IP Address & Port> qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb (or whichever test you would like to run)
  2. You can also simulate an invalid login attempt, for example, given the above test:
    • Add let(:user) { Struct.new(:username, :password).new('foo', 'bar') } in describe block
    • Replace Flow::Login.sign_in with Flow::Login.sign_in(as: user)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading