Add tests, update changelog and minor fixes

This commit is contained in:
Arun Kumar
2021-03-20 01:07:49 +05:30
parent dcda7184d0
commit d565413082
7 changed files with 33 additions and 6 deletions
+1 -1
View File
@@ -905,7 +905,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
});
}
if (prevProps.name !== this.props.name && this.props.name) {
if (this.props.name && prevProps.name !== this.props.name) {
this.setState({
name: this.props.name,
});
+1
View File
@@ -257,6 +257,7 @@ export const ExportDialog = ({
onClick={() => {
setModalIsShown(true);
}}
data-testid="export-button"
icon={exportFile}
type="button"
aria-label={t("buttons.export")}
+4 -4
View File
@@ -45,10 +45,6 @@ export class ProjectName extends Component<Props> {
public render() {
return this.props.isNameEditable ? (
<span className="TextInput" aria-label={this.props.label}>
{this.props.value}
</span>
) : (
<span
suppressContentEditableWarning
ref={this.makeEditable}
@@ -62,6 +58,10 @@ export class ProjectName extends Component<Props> {
>
{this.props.value}
</span>
) : (
<span className="TextInput" aria-label={this.props.label}>
{this.props.value}
</span>
);
}
}
+1
View File
@@ -58,6 +58,7 @@ export const ToolButton = React.forwardRef((props: ToolButtonProps, ref) => {
"ToolIcon--selected": props.selected,
},
)}
data-testid={props["data-testid"]}
hidden={props.hidden}
title={props.title}
aria-label={props["aria-label"]}