Skip to content

23: Global setup for Playwright, and some basic Playwright UI tests #254

Merged
vishnoianil merged 9 commits intoinstructlab:mainfrom
adigidh:23-playwright
Oct 23, 2024
Merged

23: Global setup for Playwright, and some basic Playwright UI tests #254
vishnoianil merged 9 commits intoinstructlab:mainfrom
adigidh:23-playwright

Conversation

@adigidh
Copy link
Contributor

@adigidh adigidh commented Oct 8, 2024

fixes #23

Summary of changes:

  • Setup Playwright (installed packages, setup configuration)
  • Created a simple setup test that performs a real login with an e2e account and saves the storage state so the next tests can run in an authenticated state. Using env variables for username, and password so these can be supplied from the user.
  • Basic tests for login page
  • NPM scripts for execution on local
  • Docs in development markdown for running these tests locally

Example report after running the tests locally:
image

@vishnoianil
Copy link
Member

@adigidh Exited to see this PR. Thanks for pushing this. Let me know if this PR is ready for review.
Didn't look at it yet because it's in draft, so I am assuming it's still work in progress.

@adigidh
Copy link
Contributor Author

adigidh commented Oct 21, 2024

@adigidh Exited to see this PR. Thanks for pushing this. Let me know if this PR is ready for review. Didn't look at it yet because it's in draft, so I am assuming it's still work in progress.

@vishnoianil : Sent you a DM last week. Maybe this PR is good for first pass?
I'll resolve the conflicts on this one, and open it up for review.

@vishnoianil
Copy link
Member

@adigidh Exited to see this PR. Thanks for pushing this. Let me know if this PR is ready for review. Didn't look at it yet because it's in draft, so I am assuming it's still work in progress.

@vishnoianil : Sent you a DM last week. Maybe this PR is good for first pass? I'll resolve the conflicts on this one, and open it up for review.

@adigidh PR looks good to me. Can you please add instructions for running the test cases in the development doc in docs directory. Once you update the docs, PR it good for merge, so please mark it ready for review.

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
@adigidh adigidh marked this pull request as ready for review October 22, 2024 13:11
adigidh and others added 2 commits October 22, 2024 09:26
Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
@adigidh
Copy link
Contributor Author

adigidh commented Oct 22, 2024

re: #254 (comment)

Thanks for the feedback @vishnoianil. Made some updates, and opened it up for review

@vishnoianil vishnoianil added the cherry-pick-release-1.0 Label to cherry-pick PR from main to release-1.0 branch. label Oct 22, 2024
@vishnoianil
Copy link
Member

re: #254 (comment)

Thanks for the feedback @vishnoianil. Made some updates, and opened it up for review

@adigidh We need to cherry-pick this to release-1.0 branch as well. Do you want me to squash the commits and merge ? Or do you want to keep the commit history (more work for cherry-pick). ?

@adigidh
Copy link
Contributor Author

adigidh commented Oct 23, 2024

re: #254 (comment)
Thanks for the feedback @vishnoianil. Made some updates, and opened it up for review

@adigidh We need to cherry-pick this to release-1.0 branch as well. Do you want me to squash the commits and merge ? Or do you want to keep the commit history (more work for cherry-pick). ?

@vishnoianil : Either way is okay. Can be done along the lines of the usual project workflow 👍

@vishnoianil vishnoianil merged commit bb2259c into instructlab:main Oct 23, 2024
@vishnoianil
Copy link
Member

@adigidh Squashed and merged. Can you please cherry-pick it to the release-1.0 branch as well.

adigidh added a commit to adigidh/ui that referenced this pull request Oct 23, 2024
…nstructlab#254)

* fix merge conflicts -s

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* basic configuration for tests execution

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* basic tests in place

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* some refactoring for basic tests

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* basic playwright setup

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* add docs for playwright tests

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* updates per failures on linting

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

* fix linting errors

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>

---------

Signed-off-by: Aditya Gidh <aagidh@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-release-1.0 Label to cherry-pick PR from main to release-1.0 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add some basic Playwright UI tests

2 participants