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

Tests for error pages #223

Merged
merged 4 commits into from
Mar 31, 2021
Merged

Conversation

saulipurhonen
Copy link
Contributor

Description

Test that error situations trigger corresponding error pages.

Related issues

Closes #120

Type of change

  • New feature (non-breaking change which adds functionality)

Changes Made

  • Intercept 403 and 500 errors
  • Check that error pages render

Testing

  • Integration Tests

@saulipurhonen saulipurhonen added the enhancement New feature or request label Mar 31, 2021
@saulipurhonen saulipurhonen added this to the Beta - User Interaction milestone Mar 31, 2021
@saulipurhonen saulipurhonen self-assigned this Mar 31, 2021
@saulipurhonen saulipurhonen linked an issue Mar 31, 2021 that may be closed by this pull request
@hannyle
Copy link
Contributor

hannyle commented Mar 31, 2021

Cypress tests didn't pass on my local machine. First of them was an error in parseFormSchema in WizardAjvResolver.js. Probably we can try to rebase it on the latest develop branch ?
At least my tests all passed in current develop

@saulipurhonen
Copy link
Contributor Author

Cypress tests didn't pass on my local machine. First of them was an error in parseFormSchema in WizardAjvResolver.js. Probably we can try to rebase it on the latest develop branch ?
At least my tests all passed in current develop

@hannyle you might need to clear browser cache, also check AJV version that it matches the one in package.json. AJV package update had some breaking changes and on my local the browser cache had to be cleared after npm install.

@hannyle
Copy link
Contributor

hannyle commented Mar 31, 2021

Cypress tests didn't pass on my local machine. First of them was an error in parseFormSchema in WizardAjvResolver.js. Probably we can try to rebase it on the latest develop branch ?
At least my tests all passed in current develop

@hannyle you might need to clear browser cache, also check AJV version that it matches the one in package.json. AJV package update had some breaking changes and on my local the browser cache had to be cleared after npm install.

okay, I think I have the correct Ajv version. I also did try reinstall and clear cache, sadly the tests still failed. However when I locally rebased the branch, all the tests passed. :-/

Copy link
Contributor

@hannyle hannyle left a comment

Choose a reason for hiding this comment

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

I will find out more the issue in my local env.
Otherwise the test was nicely done.

@saulipurhonen
Copy link
Contributor Author

Cypress tests didn't pass on my local machine. First of them was an error in parseFormSchema in WizardAjvResolver.js. Probably we can try to rebase it on the latest develop branch ?
At least my tests all passed in current develop

@hannyle you might need to clear browser cache, also check AJV version that it matches the one in package.json. AJV package update had some breaking changes and on my local the browser cache had to be cleared after npm install.

okay, I think I have the correct Ajv version. I also did try reinstall and clear cache, sadly the tests still failed. However when I locally rebased the branch, all the tests passed. :-/

I think I've found a solution for this. On this branch we have AJV v8 but parseErrorSchema has incorrect propery name dataPath from earlier version. On your local dataPath doesn't correspond to anything and it should be instancePath as stated in AJV changelog.

I'll rebase and push into this branch.

@saulipurhonen saulipurhonen force-pushed the feature/error-pages-integration-tests branch from 01c2127 to c371fd3 Compare March 31, 2021 12:26
@hannyle
Copy link
Contributor

hannyle commented Mar 31, 2021

@hannyle you might need to clear browser cache, also check AJV version that it matches the one in package.json. AJV package update had some breaking changes and on my local the browser cache had to be cleared after npm install.

okay, I think I have the correct Ajv version. I also did try reinstall and clear cache, sadly the tests still failed. However when I locally rebased the branch, all the tests passed. :-/

I think I've found a solution for this. On this branch we have AJV v8 but parseErrorSchema has incorrect propery name dataPath from earlier version. On your local dataPath doesn't correspond to anything and it should be instancePath as stated in AJV changelog.

I'll rebase and push into this branch.

Right, the error was at dataPath in parseErrorSchema function. The rebase did help and my tests smoothly passed. Thanks!

@blankdots blankdots merged commit 4c19751 into develop Mar 31, 2021
@blankdots blankdots deleted the feature/error-pages-integration-tests branch March 31, 2021 13:01
@blankdots blankdots mentioned this pull request Mar 31, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests for error pages
4 participants