Skip to content

Commit 958286e

Browse files
authored
Merge pull request #3869 from dlabrecq/deps
Dependency updates
2 parents 0974bb1 + 601a47f commit 958286e

File tree

7 files changed

+262
-424
lines changed

7 files changed

+262
-424
lines changed

package-lock.json

+140-302
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@
5252
"dependencies": {
5353
"@patternfly/patternfly": "5.3.1",
5454
"@patternfly/react-charts": "7.3.0",
55-
"@patternfly/react-component-groups": "^5.1.0",
55+
"@patternfly/react-component-groups": "^5.2.0",
5656
"@patternfly/react-core": "5.3.3",
5757
"@patternfly/react-icons": "5.3.2",
5858
"@patternfly/react-table": "5.3.3",
5959
"@patternfly/react-tokens": "5.3.1",
60-
"@redhat-cloud-services/frontend-components": "^4.2.10",
60+
"@redhat-cloud-services/frontend-components": "^4.2.11",
6161
"@redhat-cloud-services/frontend-components-notifications": "^4.1.0",
6262
"@redhat-cloud-services/frontend-components-translations": "^3.2.7",
6363
"@redhat-cloud-services/frontend-components-utilities": "^4.0.11",
64-
"@redhat-cloud-services/rbac-client": "^1.4.4",
64+
"@redhat-cloud-services/rbac-client": "^1.4.5",
6565
"@reduxjs/toolkit": "^2.2.5",
6666
"@unleash/proxy-client-react": "^4.2.4",
6767
"axios": "^1.7.2",
@@ -85,20 +85,20 @@
8585
"@formatjs/icu-messageformat-parser": "^2.7.8",
8686
"@redhat-cloud-services/eslint-config-redhat-cloud-services": "^2.0.4",
8787
"@redhat-cloud-services/frontend-components-config": "^6.0.14",
88-
"@redhat-cloud-services/tsc-transform-imports": "^1.0.10",
89-
"@swc/core": "^1.5.7",
88+
"@redhat-cloud-services/tsc-transform-imports": "^1.0.11",
89+
"@swc/core": "^1.5.24",
9090
"@swc/jest": "^0.2.36",
9191
"@testing-library/jest-dom": "^6.4.5",
92-
"@testing-library/react": "^15.0.7",
92+
"@testing-library/react": "^16.0.0",
9393
"@testing-library/user-event": "^14.5.2",
9494
"@types/jest": "^29.5.12",
9595
"@types/qs": "^6.9.15",
9696
"@types/react": "^18.3.3",
9797
"@types/react-dom": "^18.3.0",
9898
"@types/react-redux": "^7.1.33",
9999
"@types/react-router-dom": "^5.3.3",
100-
"@typescript-eslint/eslint-plugin": "^7.11.0",
101-
"@typescript-eslint/parser": "^7.11.0",
100+
"@typescript-eslint/eslint-plugin": "^7.12.0",
101+
"@typescript-eslint/parser": "^7.12.0",
102102
"aphrodite": "^2.4.0",
103103
"copy-webpack-plugin": "^12.0.2",
104104
"eslint": "^8.57.0",
@@ -120,7 +120,7 @@
120120
"jest-transform-stub": "^2.0.0",
121121
"jws": "^4.0.0",
122122
"npm-run-all": "^4.1.5",
123-
"prettier": "^3.2.5",
123+
"prettier": "^3.3.0",
124124
"rimraf": "^5.0.7",
125125
"swc_mut_cjs_exports": "^0.90.24",
126126
"ts-jest": "^29.1.4",

src/routes/components/dropdownWrapper/dropdownWrapper.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, render, screen } from '@testing-library/react';
1+
import { render, screen } from '@testing-library/react';
22
import userEvent from '@testing-library/user-event';
33
import React from 'react';
44

@@ -16,9 +16,9 @@ test('primary selector', async () => {
1616
expect(screen.queryAllByText('CPU').length).toBe(0);
1717
expect(screen.queryAllByText('Memory').length).toBe(0);
1818
const button = screen.getByRole('button');
19-
await act(async () => user.click(button));
19+
await user.click(button);
2020
const menuItems = screen.getAllByRole('menuitem');
2121
expect(menuItems.length).toBe(3);
22-
await act(async () => user.click(menuItems[1]));
22+
await user.click(menuItems[1]);
2323
expect(handleOnClick.mock.calls).toEqual([['memory']]);
2424
});

src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, render, screen } from '@testing-library/react';
1+
import { render, screen } from '@testing-library/react';
22
import userEvent from '@testing-library/user-event';
33
import React from 'react';
44

@@ -24,11 +24,11 @@ test('checkbox selector', async () => {
2424
expect(screen.queryAllByText('CPU').length).toBe(0);
2525
expect(screen.queryAllByText('Memory').length).toBe(0);
2626
expect(screen.queryAllByText('Storage').length).toBe(0);
27-
await act(async () => user.click(screen.getByRole('button')));
27+
await user.click(screen.getByRole('button'));
2828
expect(screen.queryAllByText('CPU').length).toBe(1);
2929
expect(screen.queryAllByText('Memory').length).toBe(1);
3030
expect(screen.queryAllByText('Storage').length).toBe(1);
3131
expect(handleOnSelect.mock.calls.length).toBe(0);
32-
await act(async () => user.click(screen.getAllByRole('checkbox')[0]));
32+
await user.click(screen.getAllByRole('checkbox')[0]);
3333
expect(handleOnSelect.mock.calls).toEqual([['cpu']]);
3434
});

src/routes/components/selectWrapper/selectWrapper.test.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, render, screen } from '@testing-library/react';
1+
import { render, screen } from '@testing-library/react';
22
import userEvent from '@testing-library/user-event';
33
import React from 'react';
44

@@ -23,9 +23,9 @@ test('primary selector', async () => {
2323
expect(screen.queryAllByText('CPU').length).toBe(1);
2424
expect(screen.queryAllByText('Memory').length).toBe(0);
2525
const button = screen.getByRole('button');
26-
await act(async () => user.click(button));
26+
await user.click(button);
2727
const options = screen.getAllByRole('option');
2828
expect(options.length).toBe(3);
29-
await act(async () => user.click(options[1]));
29+
await user.click(options[1]);
3030
expect(handleOnSelect.mock.calls).toEqual([['memory']]);
3131
});

src/routes/settings/costModels/components/addPriceList.test.tsx

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { act, configure, render, screen } from '@testing-library/react';
1+
import { configure, render, screen } from '@testing-library/react';
22
import userEvent from '@testing-library/user-event';
33
import type { Rate } from 'api/rates';
44
import messages from 'locales/messages';
@@ -124,67 +124,67 @@ describe('add-a-new-rate', () => {
124124
let options = null;
125125
render(<RenderFormDataUI submit={submit} cancel={cancel} />);
126126

127-
await act(async () => user.type(screen.getByLabelText('Description'), 'regular rate test'));
127+
await user.type(screen.getByLabelText('Description'), 'regular rate test');
128128

129129
// select first option for metric
130-
await act(async () => user.click(screen.getByLabelText('Select Metric')));
130+
await user.click(screen.getByLabelText('Select Metric'));
131131
options = await screen.findAllByRole('option');
132-
await act(async () => user.click(options[0]));
132+
await user.click(options[0]);
133133

134134
// select first option for measurement
135-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
135+
await user.click(screen.getByLabelText('Select Measurement'));
136136
options = await screen.findAllByRole('option');
137-
await act(async () => user.click(options[3])); // Previous select options are not being removed from page
137+
await user.click(options[3]); // Previous select options are not being removed from page
138138

139139
// make sure the default cost type is selected
140140
expect(screen.getByLabelText(qr.infraradio)).toHaveProperty('checked', true);
141141

142142
// selecting a different measurement does not reset cost type to default
143-
await act(async () => user.click(screen.getByLabelText(qr.supplradio)));
143+
await user.click(screen.getByLabelText(qr.supplradio));
144144

145-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
145+
await user.click(screen.getByLabelText('Select Measurement'));
146146
options = await screen.findAllByRole('option');
147-
await act(async () => user.click(options[1]));
147+
await user.click(options[1]);
148148

149149
expect(screen.getByLabelText(qr.supplradio)).toHaveProperty('checked', true);
150150

151151
// selecting metric will reset both measurement and cost type
152-
await act(async () => user.click(screen.getByLabelText(qr.infraradio)));
152+
await user.click(screen.getByLabelText(qr.infraradio));
153153

154-
await act(async () => user.click(screen.getByLabelText('Select Metric')));
154+
await user.click(screen.getByLabelText('Select Metric'));
155155
options = await screen.findAllByRole('option');
156-
await act(async () => user.click(options[1]));
156+
await user.click(options[1]);
157157

158158
expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull();
159159

160-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
160+
await user.click(screen.getByLabelText('Select Measurement'));
161161
options = await screen.findAllByRole('option');
162-
await act(async () => user.click(options[3])); // Previous select options are not being removed from page
162+
await user.click(options[3]); // Previous select options are not being removed from page
163163

164164
expect(screen.getByLabelText(qr.supplradio)).toHaveProperty('checked', true);
165-
await act(async () => user.click(screen.getByLabelText(qr.infraradio)));
165+
await user.click(screen.getByLabelText(qr.infraradio));
166166

167167
const rateInput = screen.getByLabelText('Assign rate');
168168

169169
// setting rate to anything but a number
170170
expect(screen.queryByText(regExp(messages.priceListNumberRate))).toBeNull();
171-
await act(async () => user.type(rateInput, 'A'));
171+
await user.type(rateInput, 'A');
172172
expect(screen.getByText(regExp(messages.priceListNumberRate))).not.toBeNull();
173173

174174
// setting rate to a negative number - validation is done on blur
175-
await act(async () => user.clear(rateInput));
176-
await act(async () => user.type(rateInput, '-12'));
175+
await user.clear(rateInput);
176+
await user.type(rateInput, '-12');
177177
expect(screen.getByText(regExp(messages.priceListPosNumberRate))).not.toBeNull();
178178

179179
// setting rate to a valid number
180-
await act(async () => user.clear(rateInput));
181-
await act(async () => user.type(rateInput, '0.2'));
180+
await user.clear(rateInput);
181+
await user.type(rateInput, '0.2');
182182
expect(screen.queryByText(regExp(messages.priceListNumberRate))).toBeNull();
183183

184184
// making sure button is enabled
185185
const createButton = screen.getByText(regExp(messages.createRate));
186186
expect(createButton.getAttribute('aria-disabled')).toBe('false');
187-
await act(async () => user.click(createButton));
187+
await user.click(createButton);
188188
expect(submit).toHaveBeenCalled();
189189
}, 10000);
190190

@@ -196,68 +196,68 @@ describe('add-a-new-rate', () => {
196196

197197
render(<RenderFormDataUI submit={submit} cancel={cancel} />);
198198

199-
await act(async () => user.type(screen.getByLabelText('Description'), 'tag rate test'));
199+
await user.type(screen.getByLabelText('Description'), 'tag rate test');
200200

201-
await act(async () => user.click(screen.getByLabelText('Select Metric')));
201+
await user.click(screen.getByLabelText('Select Metric'));
202202
options = await screen.findAllByRole('option');
203-
await act(async () => user.click(options[0]));
203+
await user.click(options[0]);
204204

205-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
205+
await user.click(screen.getByLabelText('Select Measurement'));
206206
options = await screen.findAllByRole('option');
207-
await act(async () => user.click(options[3])); // Previous select options are not being removed from page
207+
await user.click(options[3]); // Previous select options are not being removed from page
208208

209-
await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))));
209+
await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)));
210210

211211
// tag key is required validation
212212
const tagKeyInput = screen.getByPlaceholderText(qr.tagKeyPlaceHolder);
213-
await act(async () => user.type(tagKeyInput, 'test'));
213+
await user.type(tagKeyInput, 'test');
214214
expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull();
215-
await act(async () => user.clear(tagKeyInput));
215+
await user.clear(tagKeyInput);
216216
expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull();
217-
await act(async () => user.type(tagKeyInput, 'openshift'));
217+
await user.type(tagKeyInput, 'openshift');
218218
expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull();
219219

220220
// tag value is required validation
221221
const tagValueInput = screen.getByPlaceholderText('Enter a tag value');
222-
await act(async () => user.type(tagValueInput, 'test'));
222+
await user.type(tagValueInput, 'test');
223223
expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull();
224-
await act(async () => user.clear(tagValueInput));
224+
await user.clear(tagValueInput);
225225
expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull();
226-
await act(async () => user.type(tagValueInput, 'openshift'));
226+
await user.type(tagValueInput, 'openshift');
227227
expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull();
228228

229229
// rate must be a number
230230
const tagRateInput = screen.getByLabelText('Assign rate');
231-
await act(async () => user.type(tagRateInput, 'test'));
231+
await user.type(tagRateInput, 'test');
232232
expect(screen.getByText(regExp(messages.priceListNumberRate))).not.toBeNull();
233233

234234
// rate is required
235-
await act(async () => user.clear(tagRateInput));
235+
await user.clear(tagRateInput);
236236
expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull();
237237

238238
// rate must be positive
239-
await act(async () => user.type(tagRateInput, '-0.23'));
239+
await user.type(tagRateInput, '-0.23');
240240
expect(screen.getByText(regExp(messages.priceListPosNumberRate))).not.toBeNull();
241241

242242
// setting a valid rate - now form is valid and can be submitted
243243
const createButton = screen.getByText(regExp(messages.createRate));
244244
expect(createButton.getAttribute('aria-disabled')).toBe('true');
245-
await act(async () => user.clear(tagRateInput));
245+
await user.clear(tagRateInput);
246246

247-
await act(async () => user.type(tagRateInput, '0.23'));
248-
await act(async () => user.type(screen.getByPlaceholderText('Enter a tag description'), 'default worker'));
247+
await user.type(tagRateInput, '0.23');
248+
await user.type(screen.getByPlaceholderText('Enter a tag description'), 'default worker');
249249
expect(createButton.getAttribute('aria-disabled')).toBe('false');
250250

251251
// set tag to default
252-
await act(async () => user.click(screen.getByLabelText('Default')));
252+
await user.click(screen.getByLabelText('Default'));
253253

254254
// add a new rate disables the submit button
255-
await act(async () => user.click(screen.getByText(/add more tag values/i)));
255+
await user.click(screen.getByText(/add more tag values/i));
256256
expect(createButton.getAttribute('aria-disabled')).toBe('true');
257257

258-
await act(async () => user.click(screen.getAllByRole('button', { name: /remove tag value/i })[1]));
258+
await user.click(screen.getAllByRole('button', { name: /remove tag value/i })[1]);
259259
expect(createButton.getAttribute('aria-disabled')).toBe('false');
260-
await act(async () => user.click(createButton));
260+
await user.click(createButton);
261261
expect(submit).toHaveBeenCalled();
262262
}, 15000);
263263

@@ -269,37 +269,37 @@ describe('add-a-new-rate', () => {
269269

270270
render(<RenderFormDataUI submit={submit} cancel={cancel} />);
271271

272-
await act(async () => user.click(screen.getByLabelText('Select Metric')));
272+
await user.click(screen.getByLabelText('Select Metric'));
273273
options = await screen.findAllByRole('option');
274-
await act(async () => user.click(options[1]));
274+
await user.click(options[1]);
275275

276-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
276+
await user.click(screen.getByLabelText('Select Measurement'));
277277
options = await screen.findAllByRole('option');
278-
await act(async () => user.click(options[3])); // Previous select options are not being removed from page
278+
await user.click(options[3]); // Previous select options are not being removed from page
279279

280-
await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))));
280+
await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)));
281281

282282
// tag key is duplicated
283283
const tagKeyInput = screen.getByPlaceholderText(qr.tagKeyPlaceHolder);
284-
await act(async () => user.type(tagKeyInput, 'app'));
284+
await user.type(tagKeyInput, 'app');
285285
expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull();
286286

287-
await act(async () => user.type(tagKeyInput, '1'));
287+
await user.type(tagKeyInput, '1');
288288
expect(screen.queryByText(regExp(messages.priceListDuplicate))).toBeNull();
289289

290290
// change measurement will set tag key as not duplicate
291-
await act(async () => user.type(tagKeyInput, '{backspace}'));
291+
await user.type(tagKeyInput, '{backspace}');
292292
expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull();
293293

294-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
294+
await user.click(screen.getByLabelText('Select Measurement'));
295295
options = await screen.findAllByRole('option');
296-
await act(async () => user.click(options[1]));
296+
await user.click(options[1]);
297297

298298
expect(screen.queryByText(regExp(messages.priceListDuplicate))).toBeNull();
299299

300-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
300+
await user.click(screen.getByLabelText('Select Measurement'));
301301
options = await screen.findAllByRole('option');
302-
await act(async () => user.click(options[3]));
302+
await user.click(options[3]);
303303

304304
expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull();
305305
});
@@ -312,13 +312,13 @@ describe('add-a-new-rate', () => {
312312

313313
await render(<RenderFormDataUI submit={submit} cancel={cancel} />);
314314

315-
await act(async () => user.click(screen.getByLabelText('Select Metric')));
315+
await user.click(screen.getByLabelText('Select Metric'));
316316
options = await screen.findAllByRole('option');
317-
await act(async () => user.click(options[2]));
317+
await user.click(options[2]);
318318

319-
await act(async () => user.click(screen.getByLabelText('Select Measurement')));
319+
await user.click(screen.getByLabelText('Select Measurement'));
320320
options = await screen.findAllByRole('option');
321-
await act(async () => user.click(options[0]));
321+
await user.click(options[0]);
322322
expect(screen.queryAllByLabelText(regExp(messages.costModelsEnterTagRate))).toHaveLength(0);
323323
});
324324
});

0 commit comments

Comments
 (0)