Skip to content

Commit

Permalink
chore(project): fix incorrect aria-invalid e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaDTH committed Apr 2, 2024
1 parent 4ba690f commit bcecc27
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion platforms/web/test-e2e/tests/register_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ function runTestSuite(config: typeof testConfigs.svod, providerName: string) {
I.dontSeeElement(constants.loginFormSelector);
});

Scenario(`The Sign up modal will invalidate when directly pressing submit - ${providerName}`, async ({ I }) => {
Scenario(`The Sign up modal will invalidate upon submit only if a value is inputted - ${providerName}`, async ({ I }) => {
I.click('Continue');
I.seeElementInDOM('div[class*=formFeedback]'); // This element can be visually hidden through CSS
I.seeAttributesOnElements('input[name="email"]', { 'aria-invalid': 'false' });
I.seeAttributesOnElements('input[name="password"]', { 'aria-invalid': 'false' });

I.fillField('Email', 'test');
I.fillField('Password', 'test');
I.click('Continue');
I.seeAttributesOnElements('input[name="email"]', { 'aria-invalid': 'true' });
I.seeAttributesOnElements('input[name="password"]', { 'aria-invalid': 'true' });
});
Expand Down

0 comments on commit bcecc27

Please sign in to comment.