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

New Playwright tests and modifications #7267

Merged
merged 55 commits into from
Sep 21, 2023
Merged

Conversation

prury
Copy link
Member

@prury prury commented Sep 13, 2023

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

Some new automated test coverage, will be improved in the future.
reason why i did not use for-each:
image

MerchShop was failing when waiting for page to load, so i took it off for now

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality

Optional

  • I've tested it at </ksm/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at de69f56

Added data-testid attributes to various components for Playwright testing. Added new tests for collection creation, footer, and search functionality. Improved some existing tests for language and redirect by increasing timeouts and waiting for page load.

🤖 Generated by Copilot at de69f56

We test the web with Playwright
We add the data-testid to every element
We check the links, the tabs, the search and the creation
We rock the code with automation

@prury prury requested a review from a team as a code owner September 13, 2023 20:31
@prury prury requested review from floyd-li and daiagi and removed request for a team September 13, 2023 20:31
@netlify
Copy link

netlify bot commented Sep 13, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit ee485d5
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/650c4f5e103e6800088432ba
😎 Deploy Preview https://deploy-preview-7267--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@prury prury requested a review from roiLeo September 13, 2023 20:31
@reviewpad
Copy link
Contributor

reviewpad bot commented Sep 13, 2023

AI-Generated Summary: This pull request contains six patches that primarily focus on adding data-testids for end-to-end testing on various components such as the footer, create-collection, search, and search-suggestion components. Additionally, patches include a relocation of a fixture image used for end-to-end testing and the addition of new comprehensive tests for createcollection, footer, and searching functionality. Minor adjustments were made on pre-existing tests such as changing the waiting time and adding page loading in the language and redirect tests, respectively.

@reviewpad reviewpad bot added medium Pull request is medium waiting-for-review labels Sep 13, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Sep 13, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@prury prury changed the title Converting tests New Playwright tests and modifications Sep 13, 2023
Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

I wouldn't trust .o-icon or .o-input selector maybe add test-id

before
Screenshot 2023-09-14 at 09-04-49 fix Teleport Bridge Rename Statemine to AssetHub Kusama · kodadot_nft-gallery@3c28fd6

after
Screenshot 2023-09-14 at 09-05-06 New Playwright tests and modifications · kodadot_nft-gallery@de69f56

+1min for not so many components, can you try to reduce it?

components/TheFooter.vue Outdated Show resolved Hide resolved
tests/e2e/createcollection.spec.ts Outdated Show resolved Hide resolved
tests/e2e/footer.spec.ts Outdated Show resolved Hide resolved
@prury
Copy link
Member Author

prury commented Sep 14, 2023

I wouldn't trust .o-icon or .o-input selector maybe add test-id

before Screenshot 2023-09-14 at 09-04-49 fix Teleport Bridge Rename Statemine to AssetHub Kusama · kodadot_nft-gallery@3c28fd6

after Screenshot 2023-09-14 at 09-05-06 New Playwright tests and modifications · kodadot_nft-gallery@de69f56

+1min for not so many components, can you try to reduce it?

will make the changes, ty.
i can also try to activate parallelism, since it seems that we are only using one worker for tests

edit: is already active for tests inside same file

@prury
Copy link
Member Author

prury commented Sep 14, 2023

reduced by 30s, lmk if that works

tests/e2e/createcollection.spec.ts Outdated Show resolved Hide resolved
tests/e2e/redirect.spec.ts Outdated Show resolved Hide resolved
@prury prury marked this pull request as draft September 15, 2023 14:12
@prury prury marked this pull request as ready for review September 18, 2023 19:32
@prury
Copy link
Member Author

prury commented Sep 18, 2023

Report:

  • tried to run playwright tests on the same build it uses for unity tests but was unable to
  • reverted everything back to what it were before
  • realized tests were not passing anymore after the reverted changes(they were passing successful before trying step 1)
  • realized that in the middle of the process the bot updated playwright package, causing some commands not to run anymore
  • simplified the test that was not passing in order to fit new package
  • also identified that we are getting some 404 pages locally(go to create/collection and select polkadot hub)
  • they are now passing again

@prury prury mentioned this pull request Sep 19, 2023
16 tasks
@codeclimate
Copy link

codeclimate bot commented Sep 21, 2023

Code Climate has analyzed commit ee485d5 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Sep 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@roiLeo roiLeo added this pull request to the merge queue Sep 21, 2023
Merged via the queue into kodadot:main with commit 50caab8 Sep 21, 2023
14 checks passed
This was referenced Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants