Test Fixes (#25276)

* fixes masked-input component throwing error when there is no value

* removes copy button assertions from masked input test

* reverts masked input assertion removal and updates test selectors
This commit is contained in:
Jordan Reimer
2024-02-07 16:24:47 -07:00
committed by GitHub
parent d07e120557
commit bfe50eee84
2 changed files with 4 additions and 7 deletions

View File

@@ -74,8 +74,9 @@ export default class MaskedInputComponent extends Component {
get copyValue() {
// Value must be a string to be copied
if (typeof this.args.value === 'string') return this.args.value;
if (typeof this.args.value === 'object') return JSON.stringify(this.args.value);
return this.args.value.toString();
const { value } = this.args;
if (!value || typeof value === 'string') return value;
if (typeof value === 'object') return JSON.stringify(value);
return value.toString();
}
}