Skip to content

Conversation

samtygier-stfc
Copy link
Collaborator

Issue

Closes #2333

Description

The issue was caused by not waiting for the new stack to finish loading. The delay was usually long enough but not always. When it was too slow, then _add_images_to_existing_dataset() would run after the dataset had been deleted in the tearDown. This caused an error dialog which then confused the _click_messageBox() leading to a misleading error message.

This resolves the issue by doing a proper wait_until(), so that the test does not proceed until the stack is replaced.

Also add a check for any left open QMessageBox or QDialog, so that this would be caught sooner, or get a better error.

Testing

This fixes the tests

Acceptance Criteria

Tests should all pass

Documentation

Not needed, small fix up to #2317

@coveralls
Copy link

Coverage Status

coverage: 74.337%. remained the same
when pulling 0243d63 on 2333-fix-test-replace
into 1d27e84 on main.

@samtygier-stfc samtygier-stfc marked this pull request as ready for review September 20, 2024 16:34
@samtygier-stfc samtygier-stfc mentioned this pull request Sep 24, 2024
Copy link
Collaborator

@MikeSullivan7 MikeSullivan7 left a comment

Choose a reason for hiding this comment

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

All tests pass, both system tests and unit tests. Refactoring is good and makes sense.

@MikeSullivan7 MikeSullivan7 added this pull request to the merge queue Sep 24, 2024
Merged via the queue into main with commit da6382a Sep 24, 2024
8 checks passed
@MikeSullivan7 MikeSullivan7 deleted the 2333-fix-test-replace branch September 24, 2024 14:34
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.

test_replace_image_stack fails with Could not find button
3 participants