Bug 1957895 - Cypress helper projectDropdown.shouldContain is not an assertion
Summary: Cypress helper projectDropdown.shouldContain is not an assertion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.8.0
Assignee: David Taylor
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-06 18:00 UTC by Jon Jackson
Modified: 2021-07-27 23:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:07:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8878 0 None open Bug 1957895: Cypress helper projectDropdown.shouldContain is not an assertion 2021-05-10 19:05:31 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:07:22 UTC

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


Note You need to log in before you can comment on or make changes to this bug.