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

test(e2e): add storage mode e2e tests #5926

Merged
merged 4 commits into from
Mar 16, 2023
Merged

Conversation

justynoh
Copy link
Contributor

@justynoh justynoh commented Mar 14, 2023

Problem

We don't have e2e tests for storage mode yet! This PR adds them and achieves parity with Angular.

Closes #5113

Solution

Shard out some of the test case data that is shared between the two modes.
Add support for storage mode in all relevant handlers. Specifically, changes needed to be made to createForm and verifySubmission to accommodate storage mode individual response page and CSV modes which each displayed data differently (help...). Some utils had to be modified as well in the process.

@justynoh justynoh marked this pull request as ready for review March 15, 2023 01:07
@justynoh justynoh requested a review from KenLSM March 15, 2023 01:08
@justynoh
Copy link
Contributor Author

Closing and reopening to get CI to run

@justynoh justynoh closed this Mar 15, 2023
@justynoh justynoh reopened this Mar 15, 2023
@justynoh
Copy link
Contributor Author

snyk pls 🥺

@justynoh justynoh closed this Mar 15, 2023
@justynoh justynoh reopened this Mar 15, 2023
@justynoh justynoh requested review from tshuli and wanlingt March 16, 2023 03:07
@@ -166,15 +166,15 @@ export const ALL_FIELDS: E2eFieldMetadata[] = [
{
title: 'Birthday',
fieldType: BasicField.Date,
val: format(new Date(), DATE_INPUT_FORMAT),
val: format(new Date(952970366), DATE_INPUT_FORMAT),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this date value 952970366 special?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

:)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok no but on a serious note, I couldn't leave it as the current date because our Storage mode's individual response page also displays the date of submission which would also be the current date. So the expect() for finding the response to this question would certainly always succeed, regardless of whether the response to the question was shown.

Copy link
Contributor

@KenLSM KenLSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@justynoh justynoh merged commit 0e4de73 into develop Mar 16, 2023
@justynoh justynoh deleted the test/react-e2e-encrypt branch March 16, 2023 05:16
@wanlingt wanlingt mentioned this pull request Mar 24, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write initial e2e tests for react
2 participants