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

Add playwright e2e testing #703

Merged
merged 24 commits into from
Apr 13, 2023
Merged

Add playwright e2e testing #703

merged 24 commits into from
Apr 13, 2023

Conversation

sirius651
Copy link
Contributor

Pull Request Summary

Add playwright e2e testing

Check list

  • contains breaking changes
  • adds new feature
  • modifies existing feature (bug fix or improvements)
  • relies on other tasks
  • documentation changes
  • tested on mobile devices

Release notes:

add: playwright testing workflow

Sorry, something went wrong.

@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Visit the preview URL for this PR (updated for commit 84e7f43):

https://astar-apps--pr703-add-playwright-riwh2bre.web.app

(expires Thu, 20 Apr 2023 07:12:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db

@sirius651 sirius651 marked this pull request as ready for review March 30, 2023 08:02
@sirius651
Copy link
Contributor Author

I completed brief example of test cases in dapp-staking page here , I also want to discuss whether playwright helps while you try to writing e2e testing for the assets page or the dashboard page. @impelcrypto @bobo-k2

Copy link
Contributor

@bobo-k2 bobo-k2 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -0,0 +1,425 @@
//@ts-ignore
import { test, expect, Page } from '@playwright/test';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this file since tests are not applicable to our use case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can remove it. removed now

@impelcrypto
Copy link
Member

impelcrypto commented Apr 4, 2023

Hi @sirius651
I got this error. Do you know what might be issue? I've installed both dependencies and playwright.

image

@sirius651
Copy link
Contributor Author

Hi @sirius651 I got this error. Do you know what might be issue? I've installed both dependencies and playwright.

it seems error says Protocol error - cannot navigate to invalid URL . unfortunately, I couldn't reproduce like that. can you try like this as put absolute path?

test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:8080/astar/dapp-staking/discover');
})

@impelcrypto
Copy link
Member

@sirius651 Sorry, it looks like the double quotation ("") I used in #703 (comment) was wrong. I've modified and it worked!

impelcrypto and others added 2 commits April 10, 2023 20:17
* reafactor: created playwright module

* ui-test: added test code for sidebar

* refactor: clean up
* Added polkadot wallet

* Create polkadot account with Playwright

* Additional e2e tests

* Moved polkadto wallet to tests folder

* Minor refactoring

* Headless mode support
@sirius651
Copy link
Contributor Author

merge this PR now, and once the rpc environment is ready, we'll create another PR separately

@sirius651 sirius651 merged commit ffd9a20 into main Apr 13, 2023
@sirius651 sirius651 deleted the add/playwright branch April 13, 2023 07:25
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.

None yet

4 participants