Unit test ExportDialog (#7619)
* add test ids to dialog buttons Signed-off-by: Kerry Archibald <kerrya@element.io> * unit test ExportDialog Signed-off-by: Kerry Archibald <kerrya@element.io> * remove extra snapshot Signed-off-by: Kerry Archibald <kerrya@element.io> * fix bad snapshots Signed-off-by: Kerry Archibald <kerrya@element.io> * remove wrappers from snapshot Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
50f8c61fa8
commit
3eca71bc84
5 changed files with 3175 additions and 3 deletions
|
@ -28,6 +28,7 @@ export enum CheckboxStyle {
|
|||
interface IProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
inputRef?: React.RefObject<HTMLInputElement>;
|
||||
kind?: CheckboxStyle;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
interface IState {
|
||||
|
@ -44,7 +45,7 @@ export default class StyledCheckbox extends React.PureComponent<IProps, IState>
|
|||
constructor(props: IProps) {
|
||||
super(props);
|
||||
// 56^10 so unlikely chance of collision.
|
||||
this.id = "checkbox_" + randomString(10);
|
||||
this.id = this.props.id || "checkbox_" + randomString(10);
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue