-
Notifications
You must be signed in to change notification settings - Fork 22
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
Enable Artemis to hook into the React render timeline for more reliable tests #296
Merged
krusche
merged 18 commits into
ls1intum:develop
from
pal03377:improvement/add-onmounted-callback
Sep 2, 2023
Merged
Enable Artemis to hook into the React render timeline for more reliable tests #296
krusche
merged 18 commits into
ls1intum:develop
from
pal03377:improvement/add-onmounted-callback
Sep 2, 2023
Conversation
This file contains 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.
Checklist
Motivation and Context
To fix flaky client tests related to Apollon in #6955, I need to be able to wait for the next render cycle in React. To my knowledge, this is not possible without some "help" from the React code itself (or with a React testing library, which we don't use). Therefore, we need this PR.
Description
Added a new promise to the
ApollonEditor
callednextRender
, which resolves when the next scheduled React render of the editor component happens. It also ensures thatApollonEditor.store
will be properly initialized before it resolves.Steps for Testing
Development
: Fix flaky modeling assessment component tests Artemis#6955 using@palsch/apollon:2.14.12
, where this PR is available as an NPM package.npm start
locally to check that the standalone editor still works.Test Coverage