Skip to content

Commit

Permalink
Merge pull request #3357 from LiteFarmOrg/LF-4354/Get_cypress_tests_p…
Browse files Browse the repository at this point in the history
…assing_on_integration_after_recent_patch_changes

LF-4354: Get cypress tests passing on integration after recent patch changes
  • Loading branch information
kathyavini committed Jul 31, 2024
2 parents d06c16b + f61d544 commit 2d34e9e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/end-to-end/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ const onboardCompleteQuestions = (role) => {

cy.url().should('include', '/certification/selection');
cy.get(Selectors.CERTIFICATION_SELECTION_CONTINUE).should('exist').and('be.disabled');
cy.get(Selectors.CERTIFICATION_SELECTION_TYPE).should('exist');
cy.get(Selectors.RADIO).first().check();
cy.get(Selectors.THIRD_PARTY_ORGANIC).should('exist');
cy.get(Selectors.THIRD_PARTY_ORGANIC).check();
cy.get(Selectors.CERTIFICATION_SELECTION_CONTINUE).should('not.be.disabled').click();

// Select certifier
Expand Down
2 changes: 1 addition & 1 deletion packages/end-to-end/cypress/support/selectorConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ROLE_SELECTION_CONTINUE = '[data-cy=roleSelection-continue]';
export const ROLE_SELECTION_ROLE = '[data-cy=roleSelection-role]';

export const CERTIFICATION_SELECTION_CONTINUE = '[data-cy=certificationSelection-continue]';
export const CERTIFICATION_SELECTION_TYPE = '[data-cy=certificationSelection-type]';
export const THIRD_PARTY_ORGANIC = '[data-cy=certification_id-1]';
export const CERTIFICATION_SUMMARY_CONTINUE = '[data-cy=certificationSummary-continue]';
export const CERTIFICATION_SELECTION_ITEM = '[data-cy=certifierSelection-item]';
export const CERTIFIER_SELECTION_PROCEED = '[data-cy=certifierSelection-proceed]';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function PureCertificationSelection({
const certificationRadioOptions = certifications.map((certification) => ({
label: t(`certifications:${certification.certification_translation_key}`),
value: certification.certification_id,
'data-cy': `${CERTIFICATION_ID}-${certification.certification_id}`,
}));
return [
...certificationRadioOptions,
Expand All @@ -68,7 +69,12 @@ export function PureCertificationSelection({
onSubmit={handleSubmit(onSubmit)}
buttonGroup={
<>
<Button data-cy='certificationSelection-continue' type={'submit'} fullLength disabled={disabled}>
<Button
data-cy="certificationSelection-continue"
type={'submit'}
fullLength
disabled={disabled}
>
{t('common:CONTINUE')}
</Button>
</>
Expand All @@ -80,7 +86,6 @@ export function PureCertificationSelection({
style={{ marginBottom: '20px' }}
/>
<RadioGroup
data-cy='certificationSelection-type'
name={CERTIFICATION_ID}
hookFormControl={control}
radios={radioOptions}
Expand Down

0 comments on commit 2d34e9e

Please sign in to comment.