#5322 - Refactor IDT import and save tests for optimized execution #5381
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.
Overview
This pull request refines and optimizes the test suite for IDT import and saving by clearing the canvas after each test without reloading the page in accordance with this task.
Key changes
selectClearCanvasTool
to automatically close all interfering popups before clicking the «Clear Canvas» button, making it faster to write tests with this approach in the future.resetZoomLevelToDefault
andchooseTab
functions to encapsulate its logic.markResetToDefaultState
andprocessResetToDefaultState
- these allow for broader and more flexible resetting of the test environment post-execution.How the feature works? / How did you fix the issue?
The modifications have resulted in a reduction in the maximum execution time on a single worker — down to approximately 70 seconds (on my PC) from the previous ~170 seconds using the older page reload method. For tests where it is still necessary to reload the page, clear comments have been added to explain the rationale.
Reset Logic Enhancements
The logic for resetting states to default has been moved to
afterEach
so that if a test fails, clearing is performed in any case:In the future, this will allow tests to be quickly translated by clearing the canvas without reloading the page by extending
resetStateTypes
.Check list
#1234 – issue name