From e1dd6da73392363718b54d85d00dfa2dab579311 Mon Sep 17 00:00:00 2001 From: jmfrancois Date: Thu, 12 Oct 2023 17:58:42 +0200 Subject: [PATCH] fix: test:cy imports --- .../design-system/src/components/Dropdown/Dropdown.cy.tsx | 2 +- .../src/components/InlineEditing/InlineEditing.cy.tsx | 2 +- .../variations/InlineEditing.textarea.cy.tsx | 8 ++++---- packages/design-system/src/components/Link/Link.cy.tsx | 3 ++- packages/design-system/src/components/Modal/Modal.cy.tsx | 2 +- .../design-system/src/components/Stepper/Stepper.cy.tsx | 2 +- .../design-system/src/components/Tooltip/Tooltip.cy.tsx | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/design-system/src/components/Dropdown/Dropdown.cy.tsx b/packages/design-system/src/components/Dropdown/Dropdown.cy.tsx index 61f10eb249..346476c4e0 100644 --- a/packages/design-system/src/components/Dropdown/Dropdown.cy.tsx +++ b/packages/design-system/src/components/Dropdown/Dropdown.cy.tsx @@ -1,7 +1,7 @@ /* eslint-disable testing-library/prefer-screen-queries */ /* eslint-disable testing-library/await-async-query */ /* eslint-disable no-console */ -import Dropdown from './'; +import { Dropdown } from './'; import { ButtonTertiary } from '../../components/Button'; import { IconsProvider } from '../../components/IconsProvider'; diff --git a/packages/design-system/src/components/InlineEditing/InlineEditing.cy.tsx b/packages/design-system/src/components/InlineEditing/InlineEditing.cy.tsx index 1cbf81aaa9..ab5beeb245 100644 --- a/packages/design-system/src/components/InlineEditing/InlineEditing.cy.tsx +++ b/packages/design-system/src/components/InlineEditing/InlineEditing.cy.tsx @@ -1,7 +1,7 @@ /* eslint-disable cypress/unsafe-to-chain-command */ /* eslint-disable testing-library/await-async-query */ /* eslint-disable testing-library/prefer-screen-queries */ -import InlineEditing from './'; +import { InlineEditing } from './'; context('', () => { it('should go to edit mode when clicking on the button', () => { diff --git a/packages/design-system/src/components/InlineEditing/variations/InlineEditing.textarea.cy.tsx b/packages/design-system/src/components/InlineEditing/variations/InlineEditing.textarea.cy.tsx index 21f0dacdbf..feb1c988d3 100644 --- a/packages/design-system/src/components/InlineEditing/variations/InlineEditing.textarea.cy.tsx +++ b/packages/design-system/src/components/InlineEditing/variations/InlineEditing.textarea.cy.tsx @@ -1,4 +1,4 @@ -import InlineEditingMulti from './InlineEditing.textarea'; +import { InlineEditingTextarea } from './InlineEditing.textarea'; context('', () => { const defaultProps = { @@ -7,14 +7,14 @@ context('', () => { }; it('should render with filled value', () => { - cy.mount(); + cy.mount(); cy.get('[data-testid="inlineediting.button.edit"]').should('exist'); cy.get('p').should('have.text', 'Some text'); }); it('should allow inline editing', () => { - cy.mount(); + cy.mount(); // Switch to edit mode cy.get('[data-testid="inlineediting.button.edit"]').click(); @@ -30,7 +30,7 @@ context('', () => { }); it('should allow to have some constraints', () => { - cy.mount(); + cy.mount(); cy.get('[data-testid="inlineediting.button.edit"]').click(); cy.get('[data-testid="inlineediting.textarea"]').should('have.attr', 'required'); diff --git a/packages/design-system/src/components/Link/Link.cy.tsx b/packages/design-system/src/components/Link/Link.cy.tsx index c57cb93cd3..5228f9719c 100644 --- a/packages/design-system/src/components/Link/Link.cy.tsx +++ b/packages/design-system/src/components/Link/Link.cy.tsx @@ -1,6 +1,7 @@ /* eslint-disable testing-library/await-async-query */ /* eslint-disable testing-library/prefer-screen-queries */ -import Link from './'; +import { Link } from './'; + context('', () => { it('should render', () => { cy.mount( diff --git a/packages/design-system/src/components/Modal/Modal.cy.tsx b/packages/design-system/src/components/Modal/Modal.cy.tsx index 73e3baa0ae..9406866016 100644 --- a/packages/design-system/src/components/Modal/Modal.cy.tsx +++ b/packages/design-system/src/components/Modal/Modal.cy.tsx @@ -4,7 +4,7 @@ /* eslint-disable testing-library/prefer-screen-queries */ import { useState } from 'react'; import { ButtonPrimary } from '../Button'; -import Modal, { ModalPropsType } from './Modal'; +import { Modal, ModalPropsType } from './Modal'; function ModalStory(props: Partial) { const [modalOpen, setModalOpen] = useState(false); diff --git a/packages/design-system/src/components/Stepper/Stepper.cy.tsx b/packages/design-system/src/components/Stepper/Stepper.cy.tsx index a9bb698aaa..763fac2f6f 100644 --- a/packages/design-system/src/components/Stepper/Stepper.cy.tsx +++ b/packages/design-system/src/components/Stepper/Stepper.cy.tsx @@ -1,6 +1,6 @@ /* eslint-disable testing-library/prefer-screen-queries */ /* eslint-disable testing-library/await-async-query */ -import Stepper from '.'; +import { Stepper } from '.'; context('', () => { it('should render first step as current step', () => { diff --git a/packages/design-system/src/components/Tooltip/Tooltip.cy.tsx b/packages/design-system/src/components/Tooltip/Tooltip.cy.tsx index 145680f44b..b642e740fb 100644 --- a/packages/design-system/src/components/Tooltip/Tooltip.cy.tsx +++ b/packages/design-system/src/components/Tooltip/Tooltip.cy.tsx @@ -1,6 +1,6 @@ /* eslint-disable testing-library/prefer-screen-queries */ /* eslint-disable testing-library/await-async-query */ -import Tooltip from './Tooltip'; +import { Tooltip } from './Tooltip'; context('', () => { describe('default', () => {