Skip to content

Commit

Permalink
fix (web-forms, test, firefox): flaky error message text assertion
Browse files Browse the repository at this point in the history
For some reason, testing in Firefox fails unpredictably when asserting text content of an element where word breaks occur at element boundaries! I had hoped not to use a more specific selector here, but it’s gonna have to do...
  • Loading branch information
eyelidlessness committed Oct 4, 2024
1 parent 1b33139 commit b0b00a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/web-forms/tests/components/OdkWebForm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ describe('OdkWebForm', () => {
const formLoadFailureDialog = component.get('.form-load-failure-dialog');

expect(formLoadFailureDialog.isVisible()).toBe(true);
expect(formLoadFailureDialog.text()).toMatch(/\bnope\b/);

const message = formLoadFailureDialog.get('.message');

expect(message.text()).toMatch(/\bnope\b/);
});
});
});

0 comments on commit b0b00a0

Please sign in to comment.