Skip to content

Commit e315f6a

Browse files
committed
format fixes
1 parent 1583a1f commit e315f6a

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

cypress/components/ToolingTable.cy.tsx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
/* eslint-disable @typescript-eslint/no-unused-vars */
12
/* eslint-disable linebreak-style */
23
import React from 'react';
34
import ToolingTable from '~/pages/tools/components/ToolingTable';
4-
import type { GroupedTools, Transform } from '~/pages/tools/hooks/useToolsTransform';
5+
import type {
6+
GroupedTools,
7+
Transform,
8+
} from '~/pages/tools/hooks/useToolsTransform';
59
import type { JSONSchemaTool } from '~/pages/tools/JSONSchemaTool';
610
import mockNextRouter, { MockRouter } from '../plugins/mockNextRouterUtils';
711

@@ -26,8 +30,8 @@ const mockTools: JSONSchemaTool[] = [
2630
];
2731

2832
const mockToolsByGroup: GroupedTools = {
29-
'validator': [mockTools[0]],
30-
'editor': [mockTools[1]],
33+
validator: [mockTools[0]],
34+
editor: [mockTools[1]],
3135
};
3236

3337
const mockTransform: Transform = {
@@ -45,7 +49,7 @@ const mockTransform: Transform = {
4549
};
4650

4751
describe('ToolingTable Component', () => {
48-
let setTransformStub: Cypress.SinonStub;
52+
let setTransformStub: any;
4953
let mockRouter: MockRouter;
5054

5155
beforeEach(() => {
@@ -63,7 +67,7 @@ describe('ToolingTable Component', () => {
6367
transform={mockTransform}
6468
setTransform={setTransformStub}
6569
numberOfTools={2}
66-
/>
70+
/>,
6771
);
6872

6973
cy.contains('Validator').should('exist');
@@ -79,7 +83,7 @@ describe('ToolingTable Component', () => {
7983
transform={mockTransform}
8084
setTransform={setTransformStub}
8185
numberOfTools={2}
82-
/>
86+
/>,
8387
);
8488

8589
cy.contains('obsolete').should('exist');
@@ -90,22 +94,24 @@ describe('ToolingTable Component', () => {
9094

9195
it('handles sorting and modal interactions', () => {
9296
cy.viewport(1200, 800); // Set large viewport to show desktop table
93-
97+
9498
cy.mount(
9599
<ToolingTable
96100
toolsByGroup={mockToolsByGroup}
97101
transform={mockTransform}
98102
setTransform={setTransformStub}
99103
numberOfTools={2}
100-
/>
104+
/>,
101105
);
102106

103-
cy.get('.hidden.lg\\:block').first().within(() => {
104-
cy.contains('Name').click();
105-
cy.get('@setTransform').should('have.been.called');
106-
107-
cy.get('tbody tr').first().click();
108-
});
107+
cy.get('.hidden.lg\\:block')
108+
.first()
109+
.within(() => {
110+
cy.contains('Name').click();
111+
cy.get('@setTransform').should('have.been.called');
112+
113+
cy.get('tbody tr').first().click();
114+
});
109115

110116
cy.get('[role="dialog"]').should('exist');
111117
});
@@ -117,7 +123,7 @@ describe('ToolingTable Component', () => {
117123
transform={mockTransform}
118124
setTransform={setTransformStub}
119125
numberOfTools={0}
120-
/>
126+
/>,
121127
);
122128

123129
cy.contains('No Tools Found :(').should('exist');
@@ -130,7 +136,7 @@ describe('ToolingTable Component', () => {
130136
transform={mockTransform}
131137
setTransform={setTransformStub}
132138
numberOfTools={2}
133-
/>
139+
/>,
134140
);
135141

136142
cy.get('.hidden.lg\\:block').should('exist');

0 commit comments

Comments
 (0)