Skip to content

Commit

Permalink
chore: Use cypress/react18, tweak toggle text selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarat committed Feb 6, 2024
1 parent 128e00c commit 3a1b59d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import FlagProvider from '@unleash/proxy-client-react';
import { Provider } from 'react-redux';
import { getStore } from '../../src/store';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { mount } from '@cypress/react';
import { mount } from '@cypress/react18';
import { RBACProvider } from '@redhat-cloud-services/frontend-components/RBACProvider';

Cypress.Commands.add('mountWithContext', (Component, options = {}, props) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GroupSystems/GroupSystems.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('defaults', () => {
});

it(`pagination is set to ${DEFAULT_ROW_COUNT}`, () => {
cy.get('.pf-v5-c-options-menu__toggle-text')
cy.get('.pf-v5-c-menu-toggle__text')
.find('b')
.eq(0)
.should('have.text', `1 - ${DEFAULT_ROW_COUNT}`);
Expand Down
2 changes: 1 addition & 1 deletion src/components/GroupsTable/GroupsTable.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('defaults', () => {
});

it(`pagination is set to ${DEFAULT_ROW_COUNT}`, () => {
cy.get('.pf-v5-c-options-menu__toggle-text')
cy.get('.pf-v5-c-menu-toggle__text')
.find('b')
.eq(0)
.should('have.text', `1 - ${DEFAULT_ROW_COUNT}`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable rulesdir/disallow-fec-relative-imports */
/* eslint-disable camelcase */
import React from 'react';
import { mount } from '@cypress/react';
import { mount } from '@cypress/react18';
import CreateGroupModal from './CreateGroupModal';
import { TEXT_INPUT } from '@redhat-cloud-services/frontend-components-utilities';
import { Provider } from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion src/components/InventoryTable/InventoryTable.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('with default parameters', () => {

describe('defaults', () => {
it(`pagination is set to ${DEFAULT_ROW_COUNT}`, () => {
cy.get('.pf-v5-c-options-menu__toggle-text')
cy.get('.pf-v5-c-menu-toggle__text')
.find('b')
.eq(0)
.should('have.text', `1 - ${DEFAULT_ROW_COUNT}`);
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpinnerFallback.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Fallback from './SpinnerFallback';
import { mount } from '@cypress/react';
import { mount } from '@cypress/react18';

describe('SpinnerFallback tests', () => {
it('renders correctly', () => {
Expand Down

0 comments on commit 3a1b59d

Please sign in to comment.