Skip to content

Commit 190390a

Browse files
authored
test: fix unstable tests after cypress update (#5265)
1 parent d5064b8 commit 190390a

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

packages/main/src/components/Grid/Grid.cy.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,24 @@ describe('Grid', () => {
7575
{CustomItems}
7676
</Grid>
7777
);
78-
cy.findAllByTestId('grid-item').parent().should('have.css', 'grid-column', `span ${range.defaultSpan} / auto`);
79-
cy.findByTestId('custom-span').parent().should('have.css', 'grid-column', `span 12 / auto`);
78+
cy.findAllByTestId('grid-item').parent().should('have.css', 'grid-column', `span ${range.defaultSpan}`);
79+
cy.findByTestId('custom-span').parent().should('have.css', 'grid-column', `span 12`);
8080
cy.get('[data-component-name="GridIndentSpacer"]')
8181
.should('have.length', '1')
82-
.should('have.css', 'grid-column', `span 1 / auto`);
82+
.should('have.css', 'grid-column', 'span 1');
8383
cy.mount(
8484
<Grid defaultSpan="XL4 L3 M2 S1" defaultIndent="XL4 L5 M6 S7">
8585
{GridContent}
8686
{CustomItems}
8787
</Grid>
8888
);
89-
cy.findAllByTestId('grid-item').parent().should('have.css', 'grid-column', `span ${range.customSpan} / auto`);
90-
cy.findByTestId('custom-span').parent().should('have.css', 'grid-column', `span 12 / auto`);
89+
cy.findAllByTestId('grid-item').parent().should('have.css', 'grid-column', `span ${range.customSpan}`);
90+
cy.findByTestId('custom-span').parent().should('have.css', 'grid-column', `span 12`);
9191
cy.get('[data-component-name="GridIndentSpacer"]').each(($el, index, arr) => {
9292
if (arr.length - 1 === index) {
93-
cy.wrap($el).should('have.css', 'grid-column', `span 1 / auto`);
93+
cy.wrap($el).should('have.css', 'grid-column', 'span 1');
9494
} else {
95-
cy.wrap($el).should('have.css', 'grid-column', `span ${range.customIndent} / auto`);
95+
cy.wrap($el).should('have.css', 'grid-column', `span ${range.customIndent}`);
9696
}
9797
});
9898
});

packages/main/src/components/ResponsiveGridLayout/ResponsiveGridLayout.cy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ describe('ResponsiveGridLayout', () => {
9393
<div style={{ height: '100px', background: 'skyblue' }} data-testid={'2'} />
9494
</ResponsiveGridLayout>
9595
);
96-
cy.findByTestId('0').should('have.css', 'grid-column', 'span 2 / auto');
97-
cy.findByTestId('1').should('have.css', 'grid-column', 'span 5 / auto');
98-
cy.findByTestId('2').should('have.css', 'grid-column', 'span 1 / auto');
96+
cy.findByTestId('0').should('have.css', 'grid-column', 'span 2');
97+
cy.findByTestId('1').should('have.css', 'grid-column', 'span 5');
98+
cy.findByTestId('2').should('have.css', 'grid-column', 'span 1');
9999
});
100100

101101
cypressPassThroughTestsFactory(ResponsiveGridLayout);

packages/main/src/components/SelectDialog/SelectDialog.cy.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ describe('SelectDialog', () => {
3131
{listItems}
3232
</SelectDialog>
3333
);
34-
cy.findByText('Select Dialog').should(
35-
'have.css',
36-
'grid-area',
37-
'titleCenter / titleCenter / titleCenter / titleCenter'
38-
);
34+
cy.findByText('Select Dialog').should('have.css', 'grid-area', 'titleCenter');
3935
});
4036

4137
it('selection', () => {

0 commit comments

Comments
 (0)