-
Notifications
You must be signed in to change notification settings - Fork 0
UI testing for access store and conversion of ipynb to py #298
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to go to tests/ui
test/ui/test_access_store_ui.py
Outdated
| with open("./ai_lab_secure_configuration_storage.sqlite", "rb") as f: | ||
| data = f.read() | ||
| assert data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can open the file with
https://github.com/exasol/notebook-connector/blob/main/exasol%2Fnb_connector%2Fsecret_store.py#L23
It should open with the password you used to create it.
Furthermore, you need to remove the file at the end of the test. Probably the best is to run the test in a temporary directory. Probably best with the fixture tmp_path and a context for chdir.
Co-authored-by: Torsten Kilias <tkilias@users.noreply.github.com>
Co-authored-by: Torsten Kilias <tkilias@users.noreply.github.com>
test/ui/test_access_store_ui.py
Outdated
|
|
||
| box_element = page_session.locator(":text('Configuration Store')").locator('..').locator('..') | ||
| box_element.wait_for() | ||
| box_element.screenshot() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkilias
box_element.screenshot() - i had to add this line because, the open button is not getting the tick mark,
is this allowed ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least something we might need to investigate, because you're also calling box_element.screenshot() in line 25. A reason why the tick mark is missing could be that there is a slight delay until the tick mark appears. Could replace the box_element.screenshot() in line 23 with a sleep.
| box_element.wait_for() | ||
| box_element.screenshot() | ||
|
|
||
| assert_solara_snapshot(box_element.screenshot()) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add also the loading of the secret store using https://github.com/exasol/notebook-connector/blob/main/exasol%2Fnb_connector%2Fsecret_store.py#L23
| open_btn.icon = 'check' | ||
| finally: | ||
| # Save the file in the shared store. | ||
| if ipython and hasattr(ipython, 'run_line_magic'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jana-selva added this, because run_line_magic is throwing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment that we added this to enable testing.
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | ||
| - name: Tests | ||
| run: poetry run -- pytest -rA --setup-show test/ui/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need matrix for this ?
No description provided.