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

Bump ver component-library to 38.0.0 #28486

Merged
merged 44 commits into from Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fafa8a8
bump ver component-library to 38.0.0
it-harrison Mar 11, 2024
3dffccf
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
cc91109
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 12, 2024
1cc237a
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
d9cc688
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
8609a60
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
7d25a7c
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
547182d
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 12, 2024
a50bd81
Merge branch 'update-component-lib-38.0.0' of github.com:department-o…
it-harrison Mar 12, 2024
1aac78d
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
025e633
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
3667ef9
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
9ef3e60
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
3d9fa08
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
cfdaf4a
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
7760878
Merge branch 'main' into update-component-lib-38.0.0
it-harrison Mar 13, 2024
8e448f4
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 13, 2024
b2e4322
update MHV selectors
micahchiang Mar 13, 2024
9c29062
update missed test
micahchiang Mar 13, 2024
f97625f
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 14, 2024
2f68cf1
fix test spec
it-harrison Mar 14, 2024
37bf035
Merge branch 'update-component-lib-38.0.0' of github.com:department-o…
it-harrison Mar 14, 2024
bc2a62d
fix edu-benefits cypress test
it-harrison Mar 14, 2024
d19be57
update preneed intercept and progress bar selector
micahchiang Mar 14, 2024
647d57f
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 14, 2024
c038cd3
update pensions veteran certify selector
micahchiang Mar 14, 2024
32cf0c6
temporarily remove aXe checks
micahchiang Mar 14, 2024
f56f859
revert axe
micahchiang Mar 14, 2024
cd781b4
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 14, 2024
25f8717
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 14, 2024
ff2885e
update mhv tests
it-harrison Mar 14, 2024
435d903
Merge branch 'update-component-lib-38.0.0' of github.com:department-o…
it-harrison Mar 14, 2024
eb583d6
fix test
it-harrison Mar 14, 2024
469268b
fix test
it-harrison Mar 14, 2024
41b9827
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 14, 2024
66e9ced
resolve divergent branches
micahchiang Mar 14, 2024
b11d94a
merge main
micahchiang Mar 14, 2024
4246d29
comment out flaky category test
micahchiang Mar 15, 2024
2c45684
force true on veteran-certify checkbox
micahchiang Mar 15, 2024
51f0082
fix more tests
micahchiang Mar 15, 2024
c80758b
more mhv fixes
micahchiang Mar 15, 2024
0b56552
fix test
it-harrison Mar 15, 2024
c9efa5b
Merge branch 'main' into update-component-lib-38.0.0
micahchiang Mar 15, 2024
31fd0f8
update focusOnError helper to look for select tag
micahchiang Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -250,7 +250,7 @@
"@babel/runtime": "^7.15.4",
"@datadog/browser-logs": "^5.8.0",
"@datadog/browser-rum": "^4.49.0",
"@department-of-veterans-affairs/component-library": "^37.2.0",
"@department-of-veterans-affairs/component-library": "^38.0.0",
"@department-of-veterans-affairs/css-library": "^0.3.0",
"@department-of-veterans-affairs/formation": "^10.1.2",
"@department-of-veterans-affairs/react-jsonschema-form": "^1.2.5",
Expand Down
Expand Up @@ -12,7 +12,7 @@
}

describe('functionality of discharge wizard', () => {
it('fill out the form and expect the form to have elements', () => {

Check warning on line 15 in src/applications/discharge-wizard/tests/e2e/discharge-wizard.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/discharge-wizard/tests/e2e/discharge-wizard.cypress.spec.js:15:3:Cypress E2E tests must include at least one axeCheck call. Documentation for adding checks and understanding errors can be found here: https://depo-platform-documentation.scrollhelp.site/developer-docs/A11y-Testing.1935409178.html
// navigate to discharge wizard and make an axe check
// landing page
cy.visit('/discharge-upgrade-instructions/');
Expand All @@ -21,37 +21,42 @@
// questions page | fill out form
cy.get('.main .vads-c-action-link--green').click();

cy.get('va-radio[name="1_branchOfService"] va-radio-option')
.first()
cy.get('va-radio-option[name=1_branchOfService][value="army"]')
.find('label')
.click();

cy.get('select[name="2_dischargeYear"]').select('2016');
cy.get(
`va-radio-option[label="${
questionLabels['4_reason']['1']
}"] input[type="radio"]`,
).click();

cy.get(`va-radio-option[label="${questionLabels['4_reason']['1']}"]`)
.find('label')
.click();

cy.get(
`va-radio-option[label="Yes, ${
questionLabels['6_intention']['1']
}"] input[type="radio"]`,
).click();
`va-radio-option[label="Yes, ${questionLabels['6_intention']['1']}"]`,
)
.find('label')
.click();

cy.get('va-radio[name="7_courtMartial"] va-radio-option')
.first()
cy.get(
`va-radio-option[label="Yes, ${questionLabels['7_courtMartial'][
'1'
].toLowerCase()}"]`,
)
.find('label')
.click();

cy.get('va-radio[name="8_prevApplication"] va-radio-option')
.first()
cy.get('va-radio-option[name="8_prevApplication"][value="1"]')
.find('label')
.click();

cy.get('va-radio[name="9_prevApplicationYear"] va-radio-option')
.first()
cy.get('va-radio-option[name="9_prevApplicationYear"][value="1"]')
.find('label')
.click();

cy.get('va-radio[name="12_priorService"] va-radio-option')
.first()
cy.get(
`va-radio-option[label="Yes, ${questionLabels['12_priorService']['1']}"`,
)
.find('label')
.click();

// a11y check after all elements are visible
Expand Down
@@ -1,4 +1,4 @@
import Timeouts from 'platform/testing/e2e/timeouts';

Check warning on line 1 in src/applications/edu-benefits/feedback-tool/tests/00.feedback-tool.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/edu-benefits/feedback-tool/tests/00.feedback-tool.cypress.spec.js:1: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 mockFeedbackPost from './fixtures/mocks/feedback-post.json';
import mockFeedbackGet from './fixtures/mocks/feedback-1234.json';
import testData from './schema/maximal-test.json';
Expand Down Expand Up @@ -84,14 +84,11 @@
cy.get('input[type="checkbox"]').should('exist');
cy.axeCheck();

cy.get('va-checkbox')
.shadow()
.find('input')
.click();
cy.get('va-checkbox')
.shadow()
.find('input')
.click();
// checkbox to enter information manually
cy.get('label[id="option-label"]').click();

cy.get('label[id="option-label"]').click();

cy.get(
'input[name="root_educationDetails_school_view:manualSchoolEntry_name"]',
{ timeout: Timeouts.slow },
Expand Down
@@ -1,6 +1,6 @@
import SecureMessagingSite from '../sm_site/SecureMessagingSite';
import PatientInboxPage from '../pages/PatientInboxPage';
import { Assertions, AXE_CONTEXT, Locators } from '../utils/constants';
import { AXE_CONTEXT, Locators } from '../utils/constants';
import PatientMessageDraftsPage from '../pages/PatientMessageDraftsPage';
import mockMultiDraftsResponse from '../fixtures/draftsResponse/multi-draft-response.json';

Expand Down Expand Up @@ -66,11 +66,11 @@ describe('handle multiple drafts in one thread', () => {
cy.get(Locators.REPLY_FORM)
.find('h3')
.each(el => {
cy.wrap(el).should('include.text', Assertions.DRAFT);
cy.wrap(el).should('include.text', 'Draft');
});

cy.get(Locators.ALERTS.LAST_EDIT_DATE).each(el => {
cy.wrap(el).should('include.text', Assertions.EDITED);
cy.wrap(el).should('include.text', 'edited');
});
});

Expand Down
Expand Up @@ -54,7 +54,7 @@ describe('re-save multiple drafts in one thread', () => {
},
});

cy.get('#textarea').type('newText', { force: true });
cy.get('textarea').type('newText', { force: true });
draftPage.saveMultiDraftMessage(
updatedMultiDraftResponse.data[0],
updatedMultiDraftResponse.data[0].attributes.messageId,
Expand All @@ -77,7 +77,7 @@ describe('re-save multiple drafts in one thread', () => {
});

cy.get('#edit-draft-button').click({ waitForAnimations: true });
cy.get('#textarea').type('newText', { force: true });
cy.get('textarea').type('newText', { force: true });
draftPage.saveMultiDraftMessage(
updatedMultiDraftResponse.data[1],
updatedMultiDraftResponse.data[1].attributes.messageId,
Expand Down
Expand Up @@ -29,13 +29,13 @@ describe('Secure Messaging Compose Errors Keyboard Nav', () => {
},
});
composePage.verifyFocusOnErrorMessageToSelectRecipient();
composePage.selectRecipient();
composePage.selectRecipient('CAMRY_PCMM RELATIONSHIP_05092022_SLC4');
composePage.selectSideBarMenuOption('Inbox');
composePage.clickOnDeleteDraftButton();
});

it('focus on error message for empty category', () => {
composePage.selectRecipient();
composePage.selectRecipient('CAMRY_PCMM RELATIONSHIP_05092022_SLC4');
composePage.pushSendMessageWithKeyboardPress();
composePage.verifyFocusOnErrorMessageToSelectCategory();
cy.injectAxe();
Expand All @@ -52,7 +52,7 @@ describe('Secure Messaging Compose Errors Keyboard Nav', () => {
});

it('focus on error message for empty message subject', () => {
composePage.selectRecipient();
composePage.selectRecipient('CAMRY_PCMM RELATIONSHIP_05092022_SLC4');
composePage.selectCategory();
composePage.pushSendMessageWithKeyboardPress();
composePage.verifyFocusOnErrorEmptyMessageSubject();
Expand All @@ -71,7 +71,7 @@ describe('Secure Messaging Compose Errors Keyboard Nav', () => {
composePage.clickOnDeleteDraftButton();
});
it('focus on error message for empty message body', () => {
composePage.selectRecipient();
composePage.selectRecipient('CAMRY_PCMM RELATIONSHIP_05092022_SLC4');
composePage.selectCategory();
composePage.getMessageSubjectField().type('Test Subject', { force: true });
composePage.pushSendMessageWithKeyboardPress();
Expand Down
Expand Up @@ -19,7 +19,7 @@ describe('Secure Messaging Compose', () => {
},
},
});
composePage.selectRecipient();
composePage.selectRecipient('CAMRY_PCMM RELATIONSHIP_05092022_SLC4');
composePage.selectCategory();
composePage.attachMessageFromFile('test_image.jpg');
composePage.getMessageSubjectField().click();
Expand Down
Expand Up @@ -18,7 +18,7 @@ describe('Check confirmation message after save draft', () => {
composePage
.getCategory(requestBody.category)
.first()
.click();
.click({ force: true });
composePage.getMessageSubjectField().type(`${requestBody.subject}`);
composePage
.getMessageBodyField()
Expand Down
Expand Up @@ -10,7 +10,7 @@ describe('Secure Messaging Keyboard Nav To Compose', () => {
patientInboxPage.loadInboxMessages();
});
it('Keyboard Nav from Welcome Page to Compose', () => {
cy.tabToElement(Locators.LINKS.CREATE_NEW_MESSAGE);
cy.tabToElement('[data-testid="compose-message-link"]');
cy.realPress(['Enter']);
cy.injectAxe();
cy.axeCheck(AXE_CONTEXT, {
Expand Down
Expand Up @@ -15,7 +15,9 @@
'Go to your inbox',
);

cy.tabToElement(Locators.LINKS.CREATE_NEW_MESSAGE).should('have.focus');
cy.tabToElement('[data-testid="compose-message-link"]').should(
'have.focus',
);

cy.realPress('Tab');
cy.get(Locators.ALERTS.WELCOME_MESSAGE)
Expand All @@ -28,7 +30,7 @@
cy.realPress('Tab');
});

cy.get(Locators.ALERTS.BACK_TOP)

Check warning on line 33 in src/applications/mhv/secure-messaging/tests/e2e/keyboard-nav-test/secure-messaging-keyboard-nav-to-links-buttons-landing-page.cypress.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/keyboard-nav-test/secure-messaging-keyboard-nav-to-links-buttons-landing-page.cypress.spec.js:33:5: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.
.scrollIntoView()
.should('have.focus');

Expand Down
Expand Up @@ -2,7 +2,7 @@ import mockCustomResponse from '../fixtures/custom-response.json';
import defaultMockThread from '../fixtures/thread-response.json';
import mockMessageResponse from '../fixtures/message-custom-response.json';
import mockFolders from '../fixtures/generalResponses/folders.json';
import { Locators, Alerts, Paths, Assertions } from '../utils/constants';
import { Locators, Alerts, Paths } from '../utils/constants';

class FolderManagementPage {
currentThread = defaultMockThread;
Expand Down Expand Up @@ -141,7 +141,7 @@ class FolderManagementPage {
};

folderConfirmation = () => {
return cy.get(Locators.ALERTS.ALERT_TEXT);
return cy.get('[data-testid="alert-text"]');
};

verifyDeleteSuccessMessage = () => {
Expand Down Expand Up @@ -236,9 +236,9 @@ class FolderManagementPage {
};

verifyMoveMessageSuccessConfirmationMessage = () => {
cy.get(Locators.ALERTS.ALERT_TEXT)
cy.get('[data-testid="alert-text"]')
.should('exist')
.and('contain.text', Assertions.MESSAGE_CONVERSATION_SUCCESS);
.and('contain.text', 'Message conversation was successfully moved.');
};

verifyMoveMessageSuccessConfirmationHasFocus = () => {
Expand Down
Expand Up @@ -2,7 +2,7 @@
import mockMessageResponse from '../fixtures/message-response.json';
import mockThreadResponse from '../fixtures/thread-response.json';
import mockSignature from '../fixtures/signature-response.json';
import { Assertions, Locators, Paths } from '../utils/constants';
import { Locators, Paths } from '../utils/constants';
import mockDraftResponse from '../fixtures/message-compose-draft-response.json';
import mockRecipients from '../fixtures/recipients-response.json';

Expand Down Expand Up @@ -45,21 +45,21 @@
};

verifySendMessageConfirmationMessageText = () => {
cy.get(Locators.ALERTS.ALERT_TEXT).should(
cy.get('[data-testid="alert-text"]').should(
'contain.text',
'Secure message was successfully sent.',
);
};

verifySendMessageConfirmationMessageHasFocus = () => {
cy.focused().should('contain.text', 'Secure message was successfully sent');

Check warning on line 55 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:55:5: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.
};

selectRecipient = (recipient = 1) => {
cy.get(Locators.ALERTS.REPT_SELECT).click();
cy.get(Locators.ALERTS.REPT_SELECT)
.shadow()
.find('[id="select"]')
.find('select')
.select(recipient, { force: true });
};

Expand Down Expand Up @@ -104,21 +104,21 @@
};

verifyFocusOnErrorMessageToSelectRecipient = () => {
return cy

Check warning on line 107 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:107:12: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.
.focused()
.should('have.attr', 'error', 'Please select a recipient.');
};

verifyFocusOnErrorMessageToSelectCategory = () => {
cy.focused().should('have.attr', 'error', 'Please select a category.');

Check warning on line 113 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:113:5: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.
};

verifyFocusOnErrorEmptyMessageSubject = () => {
cy.focused().should('have.attr', 'error', 'Subject cannot be blank.');

Check warning on line 117 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:117:5: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.
};

verifyFocusOnErrorEmptyMessageBody = () => {
cy.focused().should('have.attr', 'error', 'Message body cannot be blank.');

Check warning on line 121 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:121:5: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.
};

//* Refactor* Needs to have mockDraftMessage as parameter
Expand Down Expand Up @@ -153,7 +153,7 @@
return cy
.get(Locators.MESSAGES_BODY)
.shadow()
.find('#textarea');
.find('textarea');
};

keyboardNavToMessageSubjectField = () => {
Expand All @@ -166,7 +166,7 @@
composeDraftByKeyboard = () => {
cy.tabToElement('#recipient-dropdown')
.shadow()
.find('#select')
.find('select')
.select(1, { force: true });
cy.tabToElement(Locators.BUTTONS.CATEGORY_RADIO_BUTTON)
.first()
Expand Down Expand Up @@ -300,7 +300,7 @@
verifyAlertModal = () => {
cy.get(`[modaltitle="We can't save this message yet"]`)
.shadow()
.find('[class="va-modal-inner va-modal-alert"]')
.find('[class="usa-modal va-modal-alert"]')
.should('contain', "We can't save this message yet");
};

Expand Down Expand Up @@ -333,7 +333,7 @@
};

verifyRecipient = (recipient = mockRecipients.data[0].id) => {
cy.get(Locators.ALERTS.REPT_SELECT)

Check warning on line 336 in src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/tests/e2e/pages/PatientComposePage.js:336:5: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('select')
.select(recipient)
Expand Down Expand Up @@ -388,17 +388,17 @@
};

verifyDeleteDraftSuccessfulMessage = () => {
cy.get(Locators.ALERTS.ALERT_TEXT).should(
cy.get('[data-testid="alert-text"]').should(
'contain.text',
Assertions.MESSAGE_CONVERSATION_SUCCESS_TRASH,
'Message conversation was successfully moved to Trash.',
);
};

verifySelectRecipientErrorMessage = () => {
cy.get(Locators.ALERTS.REPT_SELECT)
.shadow()
.find('[id="error-message"]')
.should('contain', Assertions.SELECT_RECIPIENT);
.should('contain', ' Please select a recipient.');
};

verifySubjectErrorMessage = () => {
Expand Down
@@ -1,4 +1,4 @@
import { Paths, Alerts, Locators } from '../utils/constants';
import { Paths, Alerts } from '../utils/constants';

class PatienErrorPage {
loadParticularFolderError = () => {
Expand Down Expand Up @@ -38,7 +38,7 @@ class PatienErrorPage {
};

verifyAlertMessage = () => {
cy.get(Locators.ALERTS.ALERT_TEXT)
cy.get('[data-testid="alert-text"]')
.should('be.visible')
.and('contain.text', Alerts.OUTAGE);
};
Expand Down
Expand Up @@ -443,13 +443,13 @@ class PatientInboxPage {

selectAdvancedSearchCategory = text => {
cy.get(Locators.FIELDS.CATEGORY_DROPDOWN)
.find('#select')
.find('select')
.select(text, { force: true });
};

selectAdvancedSearchCategoryCustomFolder = () => {
cy.get(Locators.FIELDS.CATEGORY_DROPDOWN)
.find('#select')
.find('select')
.select('Medication');
};

Expand All @@ -463,7 +463,7 @@ class PatientInboxPage {
composeMessage = () => {
cy.get('#recipient-dropdown')
.shadow()
.find('#select')
.find('select')
.select(1, { force: true });
cy.get(Locators.BUTTONS.CATEGORY_RADIO_BUTTON)
.first()
Expand All @@ -474,7 +474,7 @@ class PatientInboxPage {
.type('testSubject', { force: true });
cy.get('#compose-message-body')
.shadow()
.find('#textarea')
.find('textarea')
.type('testMessage', { force: true });
};

Expand Down Expand Up @@ -553,7 +553,7 @@ class PatientInboxPage {
sortMessagesByDate = (text, sortedResponse = mockSortedMessages) => {
cy.get(Locators.DROPDOWN)
.shadow()
.find('#select')
.find('select')
.select(`${text}`, { force: true });
cy.intercept(
'GET',
Expand Down