Zn draw tester - #5140
Closed
ludogibbs wants to merge 6 commits into
Closed
Conversation
Test script designed to verify that ZnDraw is properly loaded as the Visualizer object, ensuring that all default methods are correctly initialized and accessible.
Contributor
|
For it to execute, in CI, you need to include the test in testsuite/python/CMakeList.txt. |
PythonFZ
reviewed
Aug 26, 2025
Comment on lines
+522
to
+523
| self.zndraw = zndraw.zndraw.ZnDraw( | ||
| url=url, token=self.token, timeout=config) |
Contributor
There was a problem hiding this comment.
I'd recommend not using internal zndraw modules and use from zndraw import ZnDraw.
PythonFZ
reviewed
Aug 26, 2025
Comment on lines
+34
to
+54
| def test_register(self): | ||
| next_option_names = [] | ||
| idx = 0 | ||
| driver = self.driver | ||
| buttons = driver.find_elements( | ||
| By.XPATH, '//button[@class="btn btn-outline-tertiary"]') | ||
| for button in buttons: | ||
| button.click() | ||
| s(t=0.1) | ||
| elements = driver.find_elements(By.ID, "root[method]switcher") | ||
| j = len(elements) - 1 | ||
| options = [x for x in elements[j].find_elements( | ||
| By.TAG_NAME, "option")] | ||
| option_names = [x.get_attribute("value") for x in options] | ||
| if option_names == next_option_names: | ||
| continue | ||
| else: | ||
| assert option_names == method_list[idx], f"Difference: { | ||
| set(option_names) ^ set(method_list[idx])}" | ||
| idx += 1 | ||
| next_option_names = option_names |
Contributor
There was a problem hiding this comment.
There is a good chance this will break for future versions of ZnDraw for several reasons
- I won't be using bootstrap anymore, see WIP use materials-ui for ZnDraw zincware/ZnDraw#799
- the options on the different drop-down menus might change over time.
Are there any ZnDraw extensions currently used by Espresso or within any tutorial?
Member
|
Closing as we won't be able to work on this PR further due to the significant deviation from the development branch and ZnDraw 0.6. |
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.
Switching back from ZnDrawLocal to ZnDraw as the Visualizer object to prevent occasional errors.
Test script designed to verify that ZnDraw is properly loaded as the Visualizer object, ensuring that all default methods are correctly initialized and accessible.