-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ describe('Public enrollment', () => { | |
it('should be able to fill out enrollment info', () => { | ||
cy.tick(3000); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Täytä yhteystietosi'); | ||
onPublicEnrollmentPage.expectEnrollmentPersonDetails( | ||
'Sukunimi:TestiläEtunimet:Tessa', | ||
); | ||
|
@@ -72,11 +73,7 @@ describe('Public enrollment', () => { | |
'[email protected]', | ||
); | ||
onPublicEnrollmentPage.fillOutContactDetails('phoneNumber', '040112233'); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledCheckbox( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.enrollmentFullExamCheckbox(); | ||
|
||
onPublicEnrollmentPage.fillOutCertificateShippingDetails( | ||
'street', | ||
'Katu', | ||
|
@@ -94,6 +91,20 @@ describe('Public enrollment', () => { | |
'Suomi', | ||
); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Koulutustiedot'); | ||
onPublicEnrollmentPage.selectRadioButton( | ||
'Ei perustetta maksuttomalle kielitutkinnolle', | ||
); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledRadio( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.enrollmentFullExamRadio(); | ||
|
||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectEnrollmentDetails( | ||
'Tutkinto: Ruotsi, erinomainen taitoTutkintopäivä: 22.3.2022Ilmoittautuminen sulkeutuu: 15.3.2022Paikkoja vapaana: 6', | ||
); | ||
|
@@ -148,13 +159,6 @@ describe('Public enrollment', () => { | |
); | ||
onPublicEnrollmentPage.fillOutContactDetails('phoneNumber', '040112233'); | ||
onPublicEnrollmentPage.expectContactDetailsErrorNotExist('phoneNumber'); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.expectPreviuoslyEnrolledError(); | ||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledCheckbox( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.expectPreviouslyEnrolledErrorNotExist(); | ||
|
||
onPublicEnrollmentPage.expectCertificateShippingDetailsError('street'); | ||
onPublicEnrollmentPage.fillOutCertificateShippingDetails( | ||
|
@@ -192,6 +196,30 @@ describe('Public enrollment', () => { | |
); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Koulutustiedot'); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.expectEducationDetailsError(); | ||
onPublicEnrollmentPage.selectRadioButton( | ||
'Ei perustetta maksuttomalle kielitutkinnolle', | ||
); | ||
onPublicEnrollmentPage.expectEducationDetailsErrorNotExist(); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Valitse tutkinto'); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.expectFullExamError(); | ||
onPublicEnrollmentPage.enrollmentFullExamRadio(); | ||
onPublicEnrollmentPage.expectFullExamErrorNotExist(); | ||
|
||
onPublicEnrollmentPage.expectPreviouslyEnrolledError(); | ||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledRadio( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.expectPreviouslyEnrolledErrorNotExist(); | ||
|
||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.expectStepHeading('Esikatsele'); | ||
|
||
// TODO: test when consent error handling is added | ||
// onPublicEnrollmentPage.clickSubmit(); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,13 @@ import { examEventIdWithKoskiEducationDetailsFound } from 'tests/msw/fixtures/pu | |
describe('Public enrollment without payment', () => { | ||
it('is possible when suitable education credentials are returned from KOSKI', () => { | ||
cy.openPublicEnrollmentPage(examEventIdWithKoskiEducationDetailsFound); | ||
onPublicEnrollmentPage.expectTextContents( | ||
'Tietojemme mukaan olet suorittanut tai suorittamassa seuraavan tutkinnon:', | ||
); | ||
onPublicEnrollmentPage.expectTextContents('Ylioppilastutkinto'); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Täytä yhteystietosi'); | ||
onPublicEnrollmentPage.fillOutContactDetails('email', '[email protected]'); | ||
onPublicEnrollmentPage.fillOutContactDetails( | ||
'emailConfirmation', | ||
'[email protected]', | ||
); | ||
onPublicEnrollmentPage.fillOutContactDetails('phoneNumber', '040112233'); | ||
onPublicEnrollmentPage.clickNext(); | ||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledCheckbox( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.enrollmentFullExamCheckbox(); | ||
onPublicEnrollmentPage.fillOutCertificateShippingDetails('street', 'Katu'); | ||
onPublicEnrollmentPage.fillOutCertificateShippingDetails( | ||
'postalCode', | ||
|
@@ -35,6 +26,21 @@ describe('Public enrollment without payment', () => { | |
); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Koulutustiedot'); | ||
onPublicEnrollmentPage.expectTextContents( | ||
'Tietojemme mukaan olet suorittanut tai suorittamassa seuraavan tutkinnon:', | ||
); | ||
onPublicEnrollmentPage.expectTextContents('Ylioppilastutkinto'); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Valitse tutkinto'); | ||
onPublicEnrollmentPage.checkEnrollmentPreviouslyEnrolledRadio( | ||
'previously-enrolled-no', | ||
); | ||
onPublicEnrollmentPage.enrollmentFullExamRadio(); | ||
onPublicEnrollmentPage.clickNext(); | ||
|
||
onPublicEnrollmentPage.expectStepHeading('Esikatsele'); | ||
onPublicEnrollmentPage.expectPaymentSum('Maksuton'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters