opensearch-project / opensearch-dashboards-functional-test

Maintains functional tests for OpenSearch Dashboards and Dashboards plugins
Apache License 2.0
11 stars 102 forks source link

[Security Plugin] [2.x] Flaky behavior during `readonly.js` test #1245

Open peternied opened 2 months ago

peternied commented 2 months ago

When the test setup for Read Only mode is run, there are UX elements that cypress is complaining are that click target is covered. When inspecting the video the header is rendered [1] and then welcome experience appears [2] and covers the whole UX and looks like it should be dismissing before the test runs [3].

Acceptance criteria

Additional Context

Code related to this failure: https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/a008825a5fac5fab31c54f9f991ab22554b09566/cypress/integration/plugins/security-dashboards-plugin/switch_tenant.js#L7

The workflow failure was recorded on https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/8843007404?pr=1242

Screenshots

image

Test Run Video

Test report

<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="0.0000" tests="2" failures="1">
  <testsuite name="Root Suite" timestamp="2024-04-26T04:39:27" tests="0" file="cypress/integration/plugins/security-dashboards-plugin/readonly.js" time="0.0000" failures="0">
  </testsuite>
  <testsuite name="Read Only mode" timestamp="2024-04-26T04:39:27" tests="2" time="0.0000" failures="1">
    <testcase name="Read Only mode &quot;before all&quot; hook for &quot;should be able to modify the dashboard as admin&quot;" time="0.0000" classname="&quot;before all&quot; hook for &quot;should be able to modify the dashboard as admin&quot;">
      <failure message="Timed out retrying after 60050ms: `cy.click()` failed because this element:

`&lt;div class=&quot;euiPopover euiPopover--anchorDownCenter&quot; data-test-subj=&quot;account-popover&quot; id=&quot;actionsMenu&quot;&gt;...&lt;/div&gt;`

is being covered by another element:

`&lt;header class=&quot;homWelcome__header&quot;&gt;...&lt;/header&gt;`

Fix this problem, or use {force: true} to disable error checking.

https://on.cypress.io/element-cannot-be-interacted-with

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Read Only mode`" type="CypressError"><![CDATA[CypressError: Timed out retrying after 60050ms: `cy.click()` failed because this element:

`<div class="euiPopover euiPopover--anchorDownCenter" data-test-subj="account-popover" id="actionsMenu">...</div>`

is being covered by another element:

`<header class="homWelcome__header">...</header>`

Fix this problem, or use {force: true} to disable error checking.

https://on.cypress.io/element-cannot-be-interacted-with

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Read Only mode`
    at $Cy.ensureDescendents (http://localhost:5601/__cypress/runner/cypress_runner.js:164076:78)
    at ensureDescendents (http://localhost:5601/__cypress/runner/cypress_runner.js:150263:8)
    at ensureDescendentsAndScroll (http://localhost:5601/__cypress/runner/cypress_runner.js:150270:14)
    at ensureElIsNotCovered (http://localhost:5601/__cypress/runner/cypress_runner.js:150402:5)
    at runAllChecks (http://localhost:5601/__cypress/runner/cypress_runner.js:150592:52)
    at retryActionability (http://localhost:5601/__cypress/runner/cypress_runner.js:150616:16)
    at tryCatcher (http://localhost:5601/__cypress/runner/cypress_runner.js:13022:23)
    at Promise.attempt.Promise.try (http://localhost:5601/__cypress/runner/cypress_runner.js:10296:29)
    at whenStable (http://localhost:5601/__cypress/runner/cypress_runner.js:168808:63)
    at http://localhost:5601/__cypress/runner/cypress_runner.js:168305:14
    at tryCatcher (http://localhost:5601/__cypress/runner/cypress_runner.js:13022:23)
    at Promise._settlePromiseFromHandler (http://localhost:5601/__cypress/runner/cypress_runner.js:10957:31)
    at Promise._settlePromise (http://localhost:5601/__cypress/runner/cypress_runner.js:11014:18)
    at Promise._settlePromise0 (http://localhost:5601/__cypress/runner/cypress_runner.js:11059:10)
    at Promise._settlePromises (http://localhost:5601/__cypress/runner/cypress_runner.js:11139:18)
    at Promise._fulfill (http://localhost:5601/__cypress/runner/cypress_runner.js:11083:18)
From Your Spec Code:
    at switchTenantTo (http://localhost:5601/__cypress/tests?p=cypress/integration/plugins/security-dashboards-plugin/readonly.js:270:44)
    at Context.eval (http://localhost:5601/__cypress/tests?p=cypress/integration/plugins/security-dashboards-plugin/readonly.js:226:41)]]></failure>
    </testcase>
  </testsuite>
</testsuites>
dblock commented 1 week ago

@peternied Did the linked PR resolve this?

Catch All Triage - 1 2 3 4 5 6

peternied commented 1 week ago

Nope, this is still an outstanding issue in this repo.