-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dialog name incorrect when creating new dialog in form editor (#…
…1605) * fix #1144 * fix flicker when jumping into the new dialog * do not render dialog when hidden * invoke onCreateDialogComplete callback async * delay navigation by 500ms after creating dialog from form * convert dialog wrapper and new dialog modal to typescript * set up tests to allow for `@app` path mapping * add test for dialog wrapper
- Loading branch information
1 parent
b2faf6a
commit 01d70e4
Showing
9 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Composer/packages/client/__tests__/components/DialogWrapper/index.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import React from 'react'; | ||
import { render } from 'react-testing-library'; | ||
import { DialogWrapper } from '@app/components/DialogWrapper'; | ||
|
||
describe('<DialogWrapper />', () => { | ||
const props = { | ||
isOpen: true, | ||
title: 'My Dialog', | ||
subText: 'Create new dialog', | ||
onDismiss: jest.fn(), | ||
}; | ||
|
||
it('renders null when not open', () => { | ||
const { container } = render(<DialogWrapper {...props} isOpen={false} />); | ||
expect(container.hasChildNodes()).toBeFalsy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters