Skip to content
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

chore: add test for using instance terminal [WD-8310] #626

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

mas-who
Copy link
Collaborator

@mas-who mas-who commented Jan 30, 2024

Done

  • Added e2e test for instance terminal usage and warning before navigating away

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Ensure ci passes

@webteam-app
Copy link

Demo starting at https://lxd-ui-626.demos.haus

tests/instances.spec.ts Outdated Show resolved Hide resolved
tests/instances.spec.ts Outdated Show resolved Hide resolved
const terminalInput = page.getByRole("textbox", { name: "Terminal input" });
await terminalInput.fill("lsb_release -a");
await terminalInput.press("Enter");
await expect(page.locator(".xterm-rows")).toContainText("jammy");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is going to change for sure. Maybe check for the text "Distributor ID:", or something else that is not expected to change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the text check to Ubuntu. Although in createInstance we always select a jammy image, will we update that to the next lts version released?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess we will change it in the future. Maybe it should be a constant? Not sure how to make the test more stable. Or keep with ubuntu it should be fine as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I think for this specific test using Ubuntu should be fine 👍

Signed-off-by: Mason Hu <mason.hu@canonical.com>
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mas-who mas-who merged commit 2bddb69 into canonical:main Jan 30, 2024
6 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants