Skip to content

Commit 6e43cf5

Browse files
authored
chore: update fluent to v 8.83 (#9319)
* chore: update fluent to the latest version * Add sorting aria labels * Do not commit electron locale chage * Kick CI * Fix tests * Fix remaining tests * Update yarn lock
1 parent 5762763 commit 6e43cf5

File tree

36 files changed

+1919
-2175
lines changed

36 files changed

+1919
-2175
lines changed

Composer/packages/adaptive-flow/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@bfc/ui-shared": "*",
2929
"@emotion/react": "^11.1.3",
3030
"@emotion/styled": "^11.1.3",
31-
"@fluentui/react": "^8.57.1",
31+
"@fluentui/react": "^8.83.1",
3232
"adaptive-expressions": "4.12.0-rc1",
3333
"botbuilder-lg": "4.14.0-dev.391a2ab",
3434
"create-react-class": "^15.6.3",

Composer/packages/adaptive-form/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"license": "MIT",
2020
"peerDependencies": {
21-
"@fluentui/react": "^8.57.1",
21+
"@fluentui/react": "^8.83.1",
2222
"@fluentui/style-utilities": "^8.6.0",
2323
"@fluentui/theme": "2.5.0",
2424
"format-message": "^6.2.3",
@@ -27,7 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"@botframework-composer/test-utils": "*",
30-
"@fluentui/react": "^8.57.1",
30+
"@fluentui/react": "^8.83.1",
3131
"@types/lodash": "^4.14.149",
3232
"@types/react": "16.9.23"
3333
},

Composer/packages/client/__tests__/components/ManageLuis/ManageLuis.test.tsx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('<ManageLuis />', () => {
119119
const onNext = jest.fn();
120120
const onToggleVisibility = jest.fn();
121121

122-
const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
122+
const { baseElement, findByText, findByTestId } = renderWithRecoil(
123123
<ManageLuis
124124
hidden={false}
125125
onDismiss={onDismiss}
@@ -131,7 +131,7 @@ describe('<ManageLuis />', () => {
131131

132132
// test the default option (choose existing)
133133
// click the next button, ensure the title changes
134-
const nextButton = await findByRole('button', { name: 'Next' });
134+
const nextButton = (await findByText('Next')).closest('button')!;
135135
expect(nextButton).toBeDefined();
136136
await act(async () => {
137137
await fireEvent.click(nextButton);
@@ -148,7 +148,7 @@ describe('<ManageLuis />', () => {
148148

149149
// ensure that since a subscription hasn't been selected
150150
// this button is disabled
151-
const nextButton2 = await findByRole('button', { name: 'Next' });
151+
const nextButton2 = (await findByText('Next')).closest('button')!;
152152
expect(nextButton2).toBeDefined();
153153
expect(nextButton2).toBeDisabled();
154154

@@ -200,7 +200,7 @@ describe('<ManageLuis />', () => {
200200
const onNext = jest.fn();
201201
const onToggleVisibility = jest.fn();
202202

203-
const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
203+
const { baseElement, findByText, findByTestId } = renderWithRecoil(
204204
<ManageLuis
205205
hidden={false}
206206
onDismiss={onDismiss}
@@ -216,7 +216,7 @@ describe('<ManageLuis />', () => {
216216
fireEvent.click(createOption);
217217

218218
// click the next button, ensure the title changes
219-
const nextButton = await findByRole('button', { name: 'Next' });
219+
const nextButton = (await findByText('Next')).closest('button')!;
220220
expect(nextButton).toBeDefined();
221221
await act(async () => {
222222
await fireEvent.click(nextButton);
@@ -225,7 +225,7 @@ describe('<ManageLuis />', () => {
225225

226226
// ensure that since a subscription hasn't been selected
227227
// this button is disabled
228-
const nextButton2 = await findByRole('button', { name: 'Next' });
228+
const nextButton2 = (await findByText('Next')).closest('button')!;
229229
expect(nextButton2).toBeDefined();
230230
expect(nextButton2).toBeDisabled();
231231

@@ -252,7 +252,7 @@ describe('<ManageLuis />', () => {
252252
await fireEvent.click(nextButton2);
253253
});
254254

255-
const nextButton3 = await findByRole('button', { name: 'Next' });
255+
const nextButton3 = (await findByText('Next')).closest('button')!;
256256
expect(nextButton3).toBeDefined();
257257
expect(nextButton3).toBeDisabled();
258258

@@ -264,24 +264,25 @@ describe('<ManageLuis />', () => {
264264
expect(resourceName).toBeDefined();
265265
expect(resourceName).toBeEnabled();
266266

267-
// choose subscription
267+
// select group
268268
await act(async () => {
269269
await fireEvent.click(resourceOption);
270270
});
271-
272-
const myGroup = await findByText('mockedGroup');
273-
expect(myGroup).toBeDefined();
271+
await act(async () => {
272+
fireEvent.click(resourceOption);
273+
const myGroup = await findByText('mockedGroup');
274+
fireEvent.click(myGroup);
275+
fireEvent.blur(resourceOption);
276+
});
274277

275278
await act(async () => {
276-
await fireEvent.click(myGroup);
277-
await fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
279+
fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
278280
});
279281

280282
// select region
281283
const regionOption = await findByTestId('rootRegion');
282284
expect(regionOption).toBeDefined();
283285
expect(regionOption).toBeEnabled();
284-
// choose subscription
285286
await act(async () => {
286287
await fireEvent.keyDown(regionOption, DOWN_ARROW);
287288
});
@@ -311,7 +312,7 @@ describe('<ManageLuis />', () => {
311312
const onNext = jest.fn();
312313
const onToggleVisibility = jest.fn();
313314

314-
const { baseElement, findByText, findByRole } = renderWithRecoil(
315+
const { baseElement, findByText } = renderWithRecoil(
315316
<ManageLuis
316317
hidden={false}
317318
onDismiss={onDismiss}
@@ -327,7 +328,7 @@ describe('<ManageLuis />', () => {
327328
fireEvent.click(generateOption);
328329

329330
// click the next button, ensure the title changes
330-
const nextButton = await findByRole('button', { name: 'Next' });
331+
const nextButton = (await findByText('Next')).closest('button')!;
331332
expect(nextButton).toBeDefined();
332333
await act(async () => {
333334
await fireEvent.click(nextButton);

Composer/packages/client/__tests__/components/ManageQNA/ManageQNA.test.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jest.mock('../../../src/utils/auth', () => ({
104104
prepareAxios: jest.fn(),
105105
}));
106106

107-
describe.skip('<ManageQNA />', () => {
107+
describe('<ManageQNA />', () => {
108108
it('displays correct ui copy', async () => {
109109
const onDismiss = jest.fn();
110110
const onGetKey = jest.fn();
@@ -152,7 +152,7 @@ describe.skip('<ManageQNA />', () => {
152152
const onNext = jest.fn();
153153
const onToggleVisibility = jest.fn();
154154

155-
const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
155+
const { baseElement, findByText, findByTestId } = renderWithRecoil(
156156
<ManageQNA
157157
hidden={false}
158158
onDismiss={onDismiss}
@@ -164,7 +164,7 @@ describe.skip('<ManageQNA />', () => {
164164

165165
// test the default option (choose existing)
166166
// click the next button, ensure the title changes
167-
const nextButton = await findByRole('button', { name: 'Next' });
167+
const nextButton = (await findByText('Next')).closest('button')!;
168168
expect(nextButton).toBeDefined();
169169
await act(async () => {
170170
await fireEvent.click(nextButton);
@@ -181,7 +181,7 @@ describe.skip('<ManageQNA />', () => {
181181

182182
// ensure that since a subscription hasn't been selected
183183
// this button is disabled
184-
const nextButton2 = await findByRole('button', { name: 'Next' });
184+
const nextButton2 = (await findByText('Next')).closest('button')!;
185185
expect(nextButton2).toBeDefined();
186186
expect(nextButton2).toBeDisabled();
187187

@@ -233,7 +233,7 @@ describe.skip('<ManageQNA />', () => {
233233
const onNext = jest.fn();
234234
const onToggleVisibility = jest.fn();
235235

236-
const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
236+
const { baseElement, findByText, findByTestId } = renderWithRecoil(
237237
<ManageQNA
238238
hidden={false}
239239
onDismiss={onDismiss}
@@ -249,7 +249,7 @@ describe.skip('<ManageQNA />', () => {
249249
fireEvent.click(createOption);
250250

251251
// click the next button, ensure the title changes
252-
const nextButton = await findByRole('button', { name: 'Next' });
252+
const nextButton = (await findByText('Next')).closest('button')!;
253253
expect(nextButton).toBeDefined();
254254
await act(async () => {
255255
await fireEvent.click(nextButton);
@@ -258,7 +258,7 @@ describe.skip('<ManageQNA />', () => {
258258

259259
// ensure that since a subscription hasn't been selected
260260
// this button is disabled
261-
const nextButton2 = await findByRole('button', { name: 'Next' });
261+
const nextButton2 = (await findByText('Next')).closest('button')!;
262262
expect(nextButton2).toBeDefined();
263263
expect(nextButton2).toBeDisabled();
264264

@@ -285,7 +285,7 @@ describe.skip('<ManageQNA />', () => {
285285
await fireEvent.click(nextButton2);
286286
});
287287

288-
const nextButton3 = await findByRole('button', { name: 'Next' });
288+
const nextButton3 = (await findByText('Next')).closest('button')!;
289289
expect(nextButton3).toBeDefined();
290290
expect(nextButton3).toBeDisabled();
291291

@@ -297,24 +297,25 @@ describe.skip('<ManageQNA />', () => {
297297
expect(resourceName).toBeDefined();
298298
expect(resourceName).toBeEnabled();
299299

300-
// choose subscription
300+
// select group
301301
await act(async () => {
302-
await fireEvent.click(resourceOption);
302+
fireEvent.click(resourceOption);
303+
});
304+
await act(async () => {
305+
fireEvent.click(resourceOption);
306+
const myGroup = await findByText('mockedGroup');
307+
fireEvent.click(myGroup);
308+
fireEvent.blur(resourceOption);
303309
});
304-
305-
const myGroup = await findByText('mockedGroup');
306-
expect(myGroup).toBeDefined();
307310

308311
await act(async () => {
309-
await fireEvent.click(myGroup);
310312
await fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
311313
});
312314

313315
// select region
314316
const regionOption = await findByTestId('rootRegion');
315317
expect(regionOption).toBeDefined();
316318
expect(regionOption).toBeEnabled();
317-
// choose subscription
318319
await act(async () => {
319320
await fireEvent.click(regionOption);
320321
});
@@ -332,7 +333,6 @@ describe.skip('<ManageQNA />', () => {
332333
const tierOption = await findByTestId('tier');
333334
expect(tierOption).toBeDefined();
334335
expect(tierOption).toBeEnabled();
335-
// choose subscription
336336
await act(async () => {
337337
await fireEvent.keyDown(tierOption, DOWN_ARROW);
338338
});
@@ -366,7 +366,7 @@ describe.skip('<ManageQNA />', () => {
366366
const onNext = jest.fn();
367367
const onToggleVisibility = jest.fn();
368368

369-
const { baseElement, findByText, findByRole } = renderWithRecoil(
369+
const { baseElement, findByText } = renderWithRecoil(
370370
<ManageQNA
371371
hidden={false}
372372
onDismiss={onDismiss}
@@ -382,7 +382,7 @@ describe.skip('<ManageQNA />', () => {
382382
fireEvent.click(generateOption);
383383

384384
// click the next button, ensure the title changes
385-
const nextButton = await findByRole('button', { name: 'Next' });
385+
const nextButton = (await findByText('Next')).closest('button')!;
386386
expect(nextButton).toBeDefined();
387387
await act(async () => {
388388
await fireEvent.click(nextButton);

0 commit comments

Comments
 (0)