Skip to content

Commit

Permalink
Merge branch 'main' into VACMS-19826-modernized-pages-and-fl-update-o…
Browse files Browse the repository at this point in the history
…perating-status
  • Loading branch information
eselkin authored Nov 23, 2024
2 parents fc35f19 + 2c792a8 commit 400d8bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ export default function FormQuestion({
));

return (
<div className="feature" id={`question-${question.id}`}>
<va-summary-box
class="vads-u-margin-bottom--3"
id={`question-${question.id}`}
>
<Element name={scrollElementName} />
<h2>{question.text[selectedLanguage]}</h2>
<h2 slot="headline">{question.text[selectedLanguage]}</h2>
{options}
</div>
</va-summary-box>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ Cypress.Commands.add('testQuestionScenario', ({ scenario, routeOption }) => {
cy.reload();
cy.get('body', { timeout: normal }).should('be.visible');
scenario.questions.forEach(question => {
cy.get(`div[id=${question.id}]`, { timeout: slow }).should('be.visible');
cy.get(`div[id=${question.id}] > button[value=${question.value}]`).click();
cy.get(`va-summary-box[id=${question.id}]`, { timeout: slow }).should(
'be.visible',
);
cy.get(
`va-summary-box[id=${question.id}] > button[value=${question.value}]`,
).click();
});
cy.get(`div[class*=${scenario.result.class}]`, { timeout: slow }).should(
'be.visible',
Expand All @@ -25,7 +29,7 @@ describe('Coronavirus Screener', () => {
it('Gets the correct result for each scenario', () => {
cy.visit('/covid19screen');
cy.get('body').should('be.visible');
cy.get('div[id=question-isStaff]').should('be.visible');
cy.get('va-summary-box[id=question-isStaff]').should('be.visible');
cy.get('div[class*=covid-screener-results-incomplete]').should(
'be.visible',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Coronavirus Screener Alternate', () => {
// custom travel question /459
cy.visit('/covid19screen/459');
cy.get('body', { timeout: normal }).should('be.visible');
cy.get('div[id=question-isStaff]').should('be.visible');
cy.get('va-summary-box[id=question-isStaff]').should('be.visible');
cy.get('div[class*=covid-screener-results-incomplete]').should(
'be.visible',
);
Expand All @@ -105,7 +105,7 @@ describe('Coronavirus Screener Alternate', () => {

cy.visit('/covid19screen/459GH');
cy.get('body', { timeout: normal }).should('be.visible');
cy.get('div[id=question-isStaff]').should('be.visible');
cy.get('va-summary-box[id=question-isStaff]').should('be.visible');
cy.get('div[class*=covid-screener-results-incomplete]').should(
'be.visible',
);
Expand All @@ -119,7 +119,7 @@ describe('Coronavirus Screener Alternate', () => {
// custom travel question case insensitive /459gh
cy.visit('/covid19screen/459gh');
cy.get('body', { timeout: normal }).should('be.visible');
cy.get('div[id=question-isStaff]').should('be.visible');
cy.get('va-summary-box[id=question-isStaff]').should('be.visible');
cy.get('div[class*=covid-screener-results-incomplete]').should(
'be.visible',
);
Expand Down

0 comments on commit 400d8bf

Please sign in to comment.