Serialize Dialog tests and fix reducibleMiddlewareToCancel condition polling#116
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This merge request restructures dialog-related tests to run under a shared serialized test registry, addressing isolation issues caused by the global dialog registry state. The change is necessary because multiple dialog and toast tests rely on shared registration APIs (
Dialog.register,DialogRegistry.registerToast,_DialogRegistry.get) and can interfere with each other if executed outside a coordinated serialized scope.Instead of keeping several independent serialized suites, the tests are now grouped under a single
DialogRegistryTestscontainer. This makes registry-dependent behavior explicit and reduces flakiness from cross-test contamination. An alternative would have been to remove global/shared registry usage from the tests entirely, but this MR chooses the lighter-weight approach of reorganizing the suite boundaries.It also tightens one middleware cancellation test by replacing polling-based assertions with direct state checks plus an explicit store synchronization step, making the test less timing-dependent.
Changes Made
Introduced a new top-level serialized test container:
Moved existing dialog registry-related suites under that shared container:
DialogTestsis now nested underDialogRegistryTestsToastDismissCallbackTestsis now nested underDialogRegistryTestsDialogDSLTestsextension target was updated accordingly:Preserved dialog test setup that clears the registry on suite init, but now within the nested suite structure:
Consolidated all registry-dependent dialog/toast coverage under the same serialized execution scope, including:
Improved
MiddlewareCancellationTeststo avoid asynchronous polling when validating cancellation:waitForConditionfor the initial loading assertion with direct state verificationawait store.wait()after dispatching cancel action