Skip to content

Explicitly click to close actions menu in integration test for violations#2812

Merged
pedrottimark merged 1 commit intomasterfrom
cypress-violations-lifecycle-actions
Aug 25, 2022
Merged

Explicitly click to close actions menu in integration test for violations#2812
pedrottimark merged 1 commit intomasterfrom
cypress-violations-lifecycle-actions

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Aug 24, 2022

Description

Test failure

1560369927628525568 from master build for #2715 on 2022-08-18

should contain correct action buttons for the lifecycle stage

Timed out retrying after 4050ms: cy.click() failed because this element:

<button aria-label="Actions" id="pf-dropdown-toggle-id-17" class="pf-c-dropdown__toggle pf-m-plain" type="button" aria-expanded="false" aria-haspopup="true">...</button>

is being covered by another element:

<button tabindex="-1" data-ouia-component-type="PF4/DropdownItem" data-ouia-safe="true" data-ouia-component-id="OUIA-Generated-DropdownItem-2" data-key="1" aria-disabled="false" type="button" class="pf-c-dropdown__menu-item" role="menuitem">Mark as...</button>

Indeed, the kabob button of the second row is covered by the action menu of the first row.
prow

Although hard to say why it failed this time this way, it seems like a good habit to use most direct interaction to put UI back into a neutral state for each of the 2 sub-tests.

Changed files

  1. Edit cypress/constants/ViolationsPage.js

    • Make selector specific enough not to match the buttons in an open actions menu.
      Initial attempt to click button again to close the menu failed because the selector also matched the button elements for action menu items.
  2. Edit cypress/integration/violations/violations.test.js

    • Replace indirect with direct interaction to close action menu.

Checklist

  • Investigated and inspected CI test results
  • Edited integration test

Testing Performed

  • For local deployment: ran the test individually, and then ran all tests in the file.
  • Inspect elements in readonly demo to see the elements in open and closed action menu.

@ghost
Copy link

ghost commented Aug 24, 2022

Images are ready for the commit at dc1727a.

To use with deploy scripts, first export MAIN_IMAGE_TAG=3.71.x-372-gdc1727a11a.

@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2022

@pedrottimark: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/gke-nongroovy-e2e-tests dc1727a link false /test gke-nongroovy-e2e-tests
ci/prow/gke-postgres-qa-e2e-tests dc1727a link false /test gke-postgres-qa-e2e-tests
ci/prow/gke-qa-e2e-tests dc1727a link false /test gke-qa-e2e-tests
ci/prow/openshift-newest-qa-e2e-tests dc1727a link false /test openshift-newest-qa-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@pedrottimark
Copy link
Contributor Author

/test gke-ui-e2e-tests
/test style-checks

@pedrottimark pedrottimark requested review from bradr5 and dvail August 25, 2022 15:31
Copy link
Contributor

@dvail dvail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to say why it failed this time this way

True, but even if this was a fluke I agree that closing dropdowns like this should help the tests be more reliable in general.

@pedrottimark pedrottimark merged commit 87e279c into master Aug 25, 2022
@pedrottimark pedrottimark deleted the cypress-violations-lifecycle-actions branch August 25, 2022 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants