From 3a1b59d12568022aef5d8c613f968c47ee79b8ee Mon Sep 17 00:00:00 2001 From: Georgii Karataev Date: Tue, 6 Feb 2024 13:38:31 +0100 Subject: [PATCH] chore: Use cypress/react18, tweak toggle text selectors --- cypress/support/commands.js | 2 +- src/components/GroupSystems/GroupSystems.cy.js | 2 +- src/components/GroupsTable/GroupsTable.cy.js | 2 +- src/components/InventoryGroups/Modals/CreateGroupModal.cy.js | 2 +- src/components/InventoryTable/InventoryTable.cy.js | 2 +- src/components/SpinnerFallback.cy.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 504611888..e3367c2c1 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -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) => { diff --git a/src/components/GroupSystems/GroupSystems.cy.js b/src/components/GroupSystems/GroupSystems.cy.js index ec3ffcce1..07bd346a9 100644 --- a/src/components/GroupSystems/GroupSystems.cy.js +++ b/src/components/GroupSystems/GroupSystems.cy.js @@ -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}`); diff --git a/src/components/GroupsTable/GroupsTable.cy.js b/src/components/GroupsTable/GroupsTable.cy.js index 11e8ac6c4..37f215819 100644 --- a/src/components/GroupsTable/GroupsTable.cy.js +++ b/src/components/GroupsTable/GroupsTable.cy.js @@ -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}`); diff --git a/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js b/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js index 267657b8e..cf3fee182 100644 --- a/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js +++ b/src/components/InventoryGroups/Modals/CreateGroupModal.cy.js @@ -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'; diff --git a/src/components/InventoryTable/InventoryTable.cy.js b/src/components/InventoryTable/InventoryTable.cy.js index d28ad2b68..862c12924 100644 --- a/src/components/InventoryTable/InventoryTable.cy.js +++ b/src/components/InventoryTable/InventoryTable.cy.js @@ -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}`); diff --git a/src/components/SpinnerFallback.cy.js b/src/components/SpinnerFallback.cy.js index d0cd6cb98..3c3f5614b 100644 --- a/src/components/SpinnerFallback.cy.js +++ b/src/components/SpinnerFallback.cy.js @@ -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', () => {