Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DR-67960] fix HLR keyboard only cypress test (and hopefully fix SC e2e test) #26465

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'path';

Check warning on line 1 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / E2E Allow List Annotations

E2E Allow List Merge Block Warning

*MERGE BLOCK WARNING* This PR contains changes related to this test spec which has been disabled for flakiness. Beginning on Nov 6th, 2023, merging will be blocked for PRs in products that have flaky Unit/E2E tests associated with them. Please resolve these tests BY 11/5/23 in order to avoid merge blocking. More information is available at: https://depo-platform-documentation.scrollhelp.site/developer-docs/test-stability-review.

import testForm from 'platform/testing/e2e/cypress/support/form-tester';

Check warning on line 3 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:3:1:Importing from platform via platform/testing is deprecated. Import from @department-of-veterans-affairs/platform-testing instead or check babel.config.json for an alias to the import.

Check warning on line 3 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:3:1:Importing from platform via platform/testing is deprecated. Import from @department-of-veterans-affairs/platform-testing instead or check babel.config.json for an alias to the import.
import { createTestConfig } from 'platform/testing/e2e/cypress/support/form-tester/utilities';

Check warning on line 4 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:4:1:Importing from platform via platform/testing is deprecated. Import from @department-of-veterans-affairs/platform-testing instead or check babel.config.json for an alias to the import.

Check warning on line 4 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:4:1:Importing from platform via platform/testing is deprecated. Import from @department-of-veterans-affairs/platform-testing instead or check babel.config.json for an alias to the import.
import { setStoredSubTask } from 'platform/forms/sub-task';

Check warning on line 5 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:5:1:Importing from platform via platform/forms is deprecated. Import from @department-of-veterans-affairs/platform-forms instead or check babel.config.json for an alias to the import.

Check warning on line 5 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:5:1:Importing from platform via platform/forms is deprecated. Import from @department-of-veterans-affairs/platform-forms instead or check babel.config.json for an alias to the import.

import formConfig from '../config/form';
import manifest from '../manifest.json';
Expand Down Expand Up @@ -89,7 +89,7 @@
cy.url().should('include', `${BASE_URL}/add-issue?index=`);
cy.axeCheck();
if (navigator.userAgent.includes('Chrome')) {
cy.get('#issue-name')

Check warning on line 92 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:92:19:It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line.

Check warning on line 92 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:92:19:It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line.
.shadow()
.find('input')
.focus()
Expand Down Expand Up @@ -144,7 +144,7 @@
if (navigator.userAgent.includes('Chrome')) {
// using realType to hopefully fix the input fields appear to
// be disabled in CI causing the stress test to fail
cy.get('#add-location-name')

Check warning on line 147 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:147:19:It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line.

Check warning on line 147 in src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/appeals/995/tests/995-supplemental-claim.cypress.spec.js:147:19:It is unsafe to chain further commands that rely on the subject after this command. It is best to split the chain, chaining again from `cy.` in a next command line.
.shadow()
.find('input')
.focus()
Expand Down Expand Up @@ -215,6 +215,11 @@
if (index > 0) {
cy.url().should('include', `index=${index}`);
}
cy.get('#add-facility-name')
.shadow()
.find('input')
.focus(); // Try focusing first

cy.get('#add-facility-name')
.shadow()
.find('input')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import formConfig from '../config/form';

Check warning on line 1 in src/applications/appeals/996/tests/hlr-keyboard-only.cypress.spec.js

View workflow job for this annotation

GitHub Actions / E2E Allow List Annotations

E2E Allow List Merge Block Warning

*MERGE BLOCK WARNING* This PR contains changes related to this test spec which has been disabled for flakiness. Beginning on Nov 6th, 2023, merging will be blocked for PRs in products that have flaky Unit/E2E tests associated with them. Please resolve these tests BY 11/5/23 in order to avoid merge blocking. More information is available at: https://depo-platform-documentation.scrollhelp.site/developer-docs/test-stability-review.
import { CONTESTABLE_ISSUES_API, WIZARD_STATUS } from '../constants';

import mockV2Data from './fixtures/data/maximal-test-v2.json';
Expand Down Expand Up @@ -89,9 +89,15 @@
);
cy.tabToInputWithLabel('service connection');
cy.realPress('Space');
cy.tabToElement('#root_otherEntry');
cy.typeInFocused('Few words');
cy.tabToContinueForm();
cy.tabToElement('[name="otherEntry"]');
// Need to specifically find input within va-text-input element
cy.get(':focus')
.find('input')
.type('Few words', { delay: 0 });
// For some reason, the Continue button is not consistently appearing in Cypress snapshot with `[type="submit"]`
// Both Back and Continue button have ids ending with -continueButton, so using .usa-button-primary to identify which button is submit
cy.tabToElement('.usa-button-primary[id$="-continueButton"]');
cy.realPress('Space');

// Issue summary
cy.url().should('include', chapters.conditions.pages.issueSummary.path);
Expand Down Expand Up @@ -137,7 +143,11 @@

// Check confirmation page print button
cy.url().should('include', 'confirmation');
cy.get('button.screen-only').should('exist');
// Another instance where we need to specifically find the element inside of a shadow dom (va-button)
cy.get('.screen-only')
.shadow()
.find('[type="button"')
.should('exist');
});
});
});
Loading