Skip to content

Conversation

@jana-selva
Copy link
Contributor

No description provided.

Copy link
Collaborator

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

Comment on lines 30 to 32
with open("./ai_lab_secure_configuration_storage.sqlite", "rb") as f:
data = f.read()
assert data
Copy link
Collaborator

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>

box_element = page_session.locator(":text('Configuration Store')").locator('..').locator('..')
box_element.wait_for()
box_element.screenshot()
Copy link
Contributor Author

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 ??

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open_btn.icon = 'check'
finally:
# Save the file in the shared store.
if ipython and hasattr(ipython, 'run_line_magic'):
Copy link
Collaborator

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

Copy link
Collaborator

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/
Copy link
Contributor Author

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants