Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Composer/packages/adaptive-flow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@bfc/ui-shared": "*",
"@emotion/react": "^11.1.3",
"@emotion/styled": "^11.1.3",
"@fluentui/react": "^8.57.1",
"@fluentui/react": "^8.83.1",
"adaptive-expressions": "4.12.0-rc1",
"botbuilder-lg": "4.14.0-dev.391a2ab",
"create-react-class": "^15.6.3",
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/adaptive-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "MIT",
"peerDependencies": {
"@fluentui/react": "^8.57.1",
"@fluentui/react": "^8.83.1",
"@fluentui/style-utilities": "^8.6.0",
"@fluentui/theme": "2.5.0",
"format-message": "^6.2.3",
Expand All @@ -27,7 +27,7 @@
},
"devDependencies": {
"@botframework-composer/test-utils": "*",
"@fluentui/react": "^8.57.1",
"@fluentui/react": "^8.83.1",
"@types/lodash": "^4.14.149",
"@types/react": "16.9.23"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('<ManageLuis />', () => {
const onNext = jest.fn();
const onToggleVisibility = jest.fn();

const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
const { baseElement, findByText, findByTestId } = renderWithRecoil(
<ManageLuis
hidden={false}
onDismiss={onDismiss}
Expand All @@ -131,7 +131,7 @@ describe('<ManageLuis />', () => {

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

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

Expand Down Expand Up @@ -200,7 +200,7 @@ describe('<ManageLuis />', () => {
const onNext = jest.fn();
const onToggleVisibility = jest.fn();

const { baseElement, findByText, findByTestId, findByRole } = renderWithRecoil(
const { baseElement, findByText, findByTestId } = renderWithRecoil(
<ManageLuis
hidden={false}
onDismiss={onDismiss}
Expand All @@ -216,7 +216,7 @@ describe('<ManageLuis />', () => {
fireEvent.click(createOption);

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

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

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

const nextButton3 = await findByRole('button', { name: 'Next' });
const nextButton3 = (await findByText('Next')).closest('button')!;
expect(nextButton3).toBeDefined();
expect(nextButton3).toBeDisabled();

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

// choose subscription
// select group
await act(async () => {
await fireEvent.click(resourceOption);
});

const myGroup = await findByText('mockedGroup');
expect(myGroup).toBeDefined();
await act(async () => {
fireEvent.click(resourceOption);
const myGroup = await findByText('mockedGroup');
fireEvent.click(myGroup);
fireEvent.blur(resourceOption);
});

await act(async () => {
await fireEvent.click(myGroup);
await fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
});

// select region
const regionOption = await findByTestId('rootRegion');
expect(regionOption).toBeDefined();
expect(regionOption).toBeEnabled();
// choose subscription
await act(async () => {
await fireEvent.keyDown(regionOption, DOWN_ARROW);
});
Expand Down Expand Up @@ -311,7 +312,7 @@ describe('<ManageLuis />', () => {
const onNext = jest.fn();
const onToggleVisibility = jest.fn();

const { baseElement, findByText, findByRole } = renderWithRecoil(
const { baseElement, findByText } = renderWithRecoil(
<ManageLuis
hidden={false}
onDismiss={onDismiss}
Expand All @@ -327,7 +328,7 @@ describe('<ManageLuis />', () => {
fireEvent.click(generateOption);

// click the next button, ensure the title changes
const nextButton = await findByRole('button', { name: 'Next' });
const nextButton = (await findByText('Next')).closest('button')!;
expect(nextButton).toBeDefined();
await act(async () => {
await fireEvent.click(nextButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jest.mock('../../../src/utils/auth', () => ({
prepareAxios: jest.fn(),
}));

describe.skip('<ManageQNA />', () => {
describe('<ManageQNA />', () => {
it('displays correct ui copy', async () => {
const onDismiss = jest.fn();
const onGetKey = jest.fn();
Expand Down Expand Up @@ -152,7 +152,7 @@ describe.skip('<ManageQNA />', () => {
const onNext = jest.fn();
const onToggleVisibility = jest.fn();

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

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

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

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

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

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

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

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

const nextButton3 = await findByRole('button', { name: 'Next' });
const nextButton3 = (await findByText('Next')).closest('button')!;
expect(nextButton3).toBeDefined();
expect(nextButton3).toBeDisabled();

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

// choose subscription
// select group
await act(async () => {
await fireEvent.click(resourceOption);
fireEvent.click(resourceOption);
});
await act(async () => {
fireEvent.click(resourceOption);
const myGroup = await findByText('mockedGroup');
fireEvent.click(myGroup);
fireEvent.blur(resourceOption);
});

const myGroup = await findByText('mockedGroup');
expect(myGroup).toBeDefined();

await act(async () => {
await fireEvent.click(myGroup);
await fireEvent.change(resourceName, { target: { value: 'mockedResource' } });
});

// select region
const regionOption = await findByTestId('rootRegion');
expect(regionOption).toBeDefined();
expect(regionOption).toBeEnabled();
// choose subscription
await act(async () => {
await fireEvent.click(regionOption);
});
Expand All @@ -332,7 +333,6 @@ describe.skip('<ManageQNA />', () => {
const tierOption = await findByTestId('tier');
expect(tierOption).toBeDefined();
expect(tierOption).toBeEnabled();
// choose subscription
await act(async () => {
await fireEvent.keyDown(tierOption, DOWN_ARROW);
});
Expand Down Expand Up @@ -366,7 +366,7 @@ describe.skip('<ManageQNA />', () => {
const onNext = jest.fn();
const onToggleVisibility = jest.fn();

const { baseElement, findByText, findByRole } = renderWithRecoil(
const { baseElement, findByText } = renderWithRecoil(
<ManageQNA
hidden={false}
onDismiss={onDismiss}
Expand All @@ -382,7 +382,7 @@ describe.skip('<ManageQNA />', () => {
fireEvent.click(generateOption);

// click the next button, ensure the title changes
const nextButton = await findByRole('button', { name: 'Next' });
const nextButton = (await findByText('Next')).closest('button')!;
expect(nextButton).toBeDefined();
await act(async () => {
await fireEvent.click(nextButton);
Expand Down
Loading