Skip to content

Commit 9de3737

Browse files
committed
test: Fix tests
1 parent 8207fee commit 9de3737

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

components/create-do-dialog.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ describe('CreateDataObjectDialog', () => {
3636
>
3737
</create-data-object-dialog>`);
3838

39+
element.show();
40+
3941
confirmButton = element.shadowRoot?.querySelector('#confirm-btn')!;
4042
cancelButton = element.shadowRoot?.querySelector('#cancel-btn')!;
4143
});
@@ -99,9 +101,7 @@ describe('CreateDataObjectDialog', () => {
99101

100102
expect(confirmSpy.callCount).to.equal(0);
101103
expect(element.namespace.error).to.be.true;
102-
expect(element.namespace.errorText).to.equal(
103-
'Custom namespace required.'
104-
);
104+
expect(element.namespace.errorText).to.equal('Custom namespace required');
105105
});
106106
});
107107
});

components/create-do-dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class CreateDataObjectDialog extends ScopedElementsMixin(LitElement) {
7777
name: {
7878
formField: this.doName,
7979
validators: [
80-
Validators.required('DO Name required'),
80+
Validators.required('DO name required'),
8181
this.doNameTakenValidator,
8282
],
8383
},

oscd-template-generator.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ describe('TemplateGenerator', () => {
5959
confirmButton.click();
6060

6161
expect(dialog.cdcType.error).to.be.true;
62-
expect(dialog.cdcType.errorText).to.equal(
63-
'Please select a common data class.'
64-
);
62+
expect(dialog.cdcType.errorText).to.equal('CDC required');
6563
expect(dialog.doName.error).to.be.true;
66-
expect(dialog.doName.errorText).to.equal('Not a valid DO name.');
64+
expect(dialog.doName.errorText).to.equal('DO name required');
6765
const doNameInput = dialog.shadowRoot?.querySelector(
6866
'#do-name'
6967
) as HTMLInputElement;

0 commit comments

Comments
 (0)