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

Fix test suites #164

Merged
merged 6 commits into from
Jan 7, 2025
Merged

Fix test suites #164

merged 6 commits into from
Jan 7, 2025

Conversation

matrei
Copy link
Contributor

@matrei matrei commented Jan 6, 2025

No description provided.

matrei added 6 commits January 4, 2025 09:32
Setting values using the Geb `RadioButtons` module currently takes over 2 minutes, significantly slowing down integration tests. This commit introduces a temporary workaround to speed up the tests while awaiting a proper fix for the `RadioButtons` module.
Removed `@Stepwise` annotations in test classes where they had no observable impact on test execution. This simplifies the test setup and avoids potential confusion.
Eliminated `@DirtiesContext` annotations from test classes and methods where they were unnecessary, improving test execution time and reducing context reload overhead.
@matrei matrei requested a review from bkoehm January 6, 2025 23:55
Copy link
Contributor

@bkoehm bkoehm left a comment

Choose a reason for hiding this comment

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

Thank you!


@DirtiesContext(classMode=DirtiesContext.ClassMode.BEFORE_CLASS)
@Stepwise
@Integration
Copy link
Contributor

Choose a reason for hiding this comment

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

So the data these tests create doesn't populate the context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They clean up after themselves.

void testRegisterValidation() {
when:
to RegisterPage
submit()
def registerPage = browser.to(RegisterPage).tap {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see a lot of changing go to browser.go or to to browser.to ... are go/to not working or is this just clean up so the IDE understands where these methods are supposed to invoke?

Copy link
Contributor Author

@matrei matrei Jan 7, 2025

Choose a reason for hiding this comment

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

It is for the IDE. Much nicer to work with when you have the types. In GebSpec the delegates are found. But not in ContainerGebSpec. We should try and fix this. But I don't mind being explicit here, I think it reads really well.

passwordExpired.checked = '1'

submit()
// Temporary workaround for problem with Geb RadioButtons module
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 our plugin or Geb having this problem? Can you open a ticket on this if it's ours?

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 do not know yet. I asked a question about it in the Groovy Slack geb channel, but no response so far.

@matrei matrei merged commit bd9c6ea into 5.0.x Jan 7, 2025
4 checks passed
@matrei matrei deleted the matrei/remove-pending branch January 7, 2025 07:12
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.

3 participants