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

1864: Integration tests for Verein360 applications #1879

Merged
merged 5 commits into from
Jan 24, 2025

Conversation

seluianova
Copy link
Contributor

@seluianova seluianova commented Jan 21, 2025

Short description

Integration tests for Verein360 applications

Proposed changes

  • added some tests

Not included:

  • general testing of application creation (not related to Verein360)
  • some branches in validateAllAttributesForPreVerifiedApplication() because them seem to be unreachable

Side effects

no, only tests

Testing

n/a

Resolved issues

Fixes: #1864

Copy link
Contributor

@f1sh1918 f1sh1918 left a comment

Choose a reason for hiding this comment

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

Very good work! 👍
Lots of important reusable parts for future tests.

I couldn't find any issue but could image to add one or two small test cases


companion object {
@JvmStatic
fun validationErrorTestCases(): List<ValidationErrorTestCase> {
Copy link
Contributor

@f1sh1918 f1sh1918 Jan 22, 2025

Choose a reason for hiding this comment

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

i would add here the policy opt in
givenInformationIsCorrectAndComplete to check that its set

Import is also a test if personalData like name and the contactName in organization data is set

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will open a separate PR for that, it requires some additional work

Copy link
Contributor Author

@seluianova seluianova Jan 27, 2025

Choose a reason for hiding this comment

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

The problem with these fields is that they are validated in init blocks, which means, it's not possible to create an application object with invalid values, such as givenInformationIsCorrectAndComplete = false.
I think I would have to re-work the current approach and build an application as a string rather than as an object.
Or create a default object, serialize it to a string, and then replace the values in the string with invalid values.
Not sure yet what is less ugly.
I will create another task for that.

UPD. or will just re-open and update the description of the current one

* Serialize object into graphql request format
* e.g. { stringProperty: "value", intProperty: 123, objectProperty: { booleanProperty: true } }
*/
fun serializeObject(obj: Any): String {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Super nice

Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

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

LGTM

@seluianova seluianova merged commit 1d19749 into main Jan 24, 2025
2 checks passed
@seluianova seluianova deleted the 1864-integration-tests-for-addeakapplication branch January 24, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration tests for addEakApplication mutation (Verein360)
3 participants