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
Changes from 1 commit
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,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