From c2a2eff7fee87bdee971649ab7a538d20453bdad Mon Sep 17 00:00:00 2001 From: elevatebart Date: Fri, 1 Dec 2023 19:08:40 +0100 Subject: [PATCH] add keys for rootstory --- components/Alert/react/Alert.rootstory.tsx | 19 ++++++++-- components/Button/react/Button.rootstory.tsx | 5 ++- .../StatusIcon/react/StatusIconReact.cy.tsx | 38 ++++++++++++++----- .../Tag/react/{Tag.cy.tsx => TagReact.cy.tsx} | 12 ++++-- .../Tag/vue/{Tag.cy.tsx => TagVue.cy.tsx} | 2 +- 5 files changed, 57 insertions(+), 19 deletions(-) rename components/Tag/react/{Tag.cy.tsx => TagReact.cy.tsx} (76%) rename components/Tag/vue/{Tag.cy.tsx => TagVue.cy.tsx} (95%) diff --git a/components/Alert/react/Alert.rootstory.tsx b/components/Alert/react/Alert.rootstory.tsx index fc86edc0a..1986e2d29 100644 --- a/components/Alert/react/Alert.rootstory.tsx +++ b/components/Alert/react/Alert.rootstory.tsx @@ -13,6 +13,7 @@ export default () => { title="Spec not found" detailsTitle="Stack trace" data-cy="alert-1" + key="alert-1" details={
             {dedent`Uncaught Error: Error occurred in defineConfig()
@@ -68,6 +69,7 @@ export default () => {
       
       {displayTimedAlert ? (
          setDisplayTimedAlert(false)}
@@ -76,6 +78,7 @@ export default () => {
         />
       ) : null}
        {
       >
         Success body
       
-      
-      
+      
+      
        {
       cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
       est laborum."
       />
-      
-      
+      
+      
       {(['xs', 'sm', 'md', 'lg'] as const).map((size) => (
         <>
           
           {variant}
@@ -23,7 +24,7 @@ export default ({
             .reverse()
             .map((size) => {
               return (
-                
+
{ it('defaults to a variant that exists if the one provided does not exist', () => { mount(
- - -
+ + +
, ) cy.get('svg').first().invoke('html').as('firstIcon') @@ -24,9 +34,14 @@ describe('StatusIcon', () => { it('displays a placeholder icon if no status is passed', () => { mount(
- - -
+ + +
, ) cy.get('svg').first().invoke('html').as('firstIcon') @@ -39,9 +54,14 @@ describe('StatusIcon', () => { it('displays a placeholder icon if null status is passed', () => { mount(
- - -
+ + + , ) cy.get('svg').first().invoke('html').as('firstIcon') diff --git a/components/Tag/react/Tag.cy.tsx b/components/Tag/react/TagReact.cy.tsx similarity index 76% rename from components/Tag/react/Tag.cy.tsx rename to components/Tag/react/TagReact.cy.tsx index 395a6f9b8..cc419bdbf 100644 --- a/components/Tag/react/Tag.cy.tsx +++ b/components/Tag/react/TagReact.cy.tsx @@ -3,7 +3,7 @@ import * as React from 'react' import { mount } from 'cypress/react18' import Tag from './Tag' -import { SizeClasses, ColorClasses } from '../constants' +import { SizeClasses, ColorClasses } from '@cypress-design/constants-tag' import assertions from '../assertions' describe('Tag', () => { @@ -20,12 +20,18 @@ describe('Tag', () => { ).map((color) => { return ( <> -
+
{`{Tag}`}
-
+
{`{Tag}`} diff --git a/components/Tag/vue/Tag.cy.tsx b/components/Tag/vue/TagVue.cy.tsx similarity index 95% rename from components/Tag/vue/Tag.cy.tsx rename to components/Tag/vue/TagVue.cy.tsx index df2018ce5..06d5b517d 100644 --- a/components/Tag/vue/Tag.cy.tsx +++ b/components/Tag/vue/TagVue.cy.tsx @@ -2,7 +2,7 @@ import { mount } from 'cypress/vue' import assertions from '../assertions' import Tag from './Tag.vue' -import { SizeClasses, ColorClasses } from '../constants' +import { SizeClasses, ColorClasses } from '../constants/dist/dist' describe('', () => { function mountStory() {