Bug 1957895

Summary: Cypress helper projectDropdown.shouldContain is not an assertion
Product: OpenShift Container Platform Reporter: Jon Jackson <jonjacks>
Component: Management ConsoleAssignee: David Taylor <dtaylor>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, jokerman, yapei
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:07:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Jackson 2021-05-06 18:00:10 UTC
Description of problem:
Cypress projectDropdown view "shouldContain" helper is not an assertion.

Version-Release number of selected component (if applicable):
4.8

How reproducible:
Not currently causing an issue, but should be addressed as a low priority.

Steps to Reproduce:
The shouldContain helper is using `cy.contains` which is not an assertion. It is instead a function that gets a DOM element matching the test id and name. The test would still fail at this point since the element would not be found, but we should probably use an assertion when the helper name starts with "should".

Comment 2 Yadan Pei 2021-05-17 02:58:15 UTC
  shouldContain: (name: string) =>
    cy
      .byLegacyTestID('namespace-bar-dropdown')
      .contains(name)
      .should('exist'),


now shouldContains returns an assertion

Verified on latest master branch

Comment 5 errata-xmlrpc 2021-07-27 23:07:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438