E2E test: log element names
What does this MR do and why?
log_has_element_or_not
also works with when name
is set to a QA::Page::Element
, however the logging logs the actual object, rather than the name of the element. This MR logs the element name if it is a QA::Page::Element
Screenshots or screen recordings
[Jun 20 2024 03:52:52 UTC (QA Tests)] DEBUG -- end within element :flash-container with args {}
[Jun 20 2024 03:52:53 UTC (QA Tests)] DEBUG -- waiting for loading to complete...
[Jun 20 2024 03:52:53 UTC (QA Tests)] DEBUG -- has_no_element? :#<QA::Page::Element:0x0000785e93b2d9e0> (wait: 0) returned: false
[Jun 20 2024 03:52:53 UTC (QA Tests)] DEBUG -- waiting for loading to complete...
[Jun 20 2024 03:52:53 UTC (QA Tests)] DEBUG -- has_no_element? :#<QA::Page::Element:0x0000785e93b2d6c0> (wait: 0) returned: true
[Jun 20 2024 03:37:30 UTC (QA Tests)] DEBUG -- end within element :flash-container with args {}
[Jun 20 2024 03:37:31 UTC (QA Tests)] DEBUG -- waiting for loading to complete...
[Jun 20 2024 03:37:31 UTC (QA Tests)] DEBUG -- has_no_element? :user-avatar-content (wait: 0) returned: false
[Jun 20 2024 03:37:31 UTC (QA Tests)] DEBUG -- waiting for loading to complete...
[Jun 20 2024 03:37:31 UTC (QA Tests)] DEBUG -- has_no_element? :terms-content (wait: 0) returned: true
How to set up and validate locally
Run any test with debug logging, e.g:
QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://gdk.test:3443 GITLAB_QA_PASSWORD_1=x bundle exec rspec qa/specs/features/browser_ui/3_create/web_ide/upload_new_file_in_web_ide_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jay McCure