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

Enviroment var to expand test cases #7849

Merged
merged 21 commits into from
Nov 6, 2023
Merged

Enviroment var to expand test cases #7849

merged 21 commits into from
Nov 6, 2023

Conversation

prury
Copy link
Member

@prury prury commented Oct 27, 2023

Added a fixed mnemonic inside a Github Secret variable to expand test cases.
Before, we had a random mnemonic without balance or nfts in it, making it impossible to test confirmation modals, mass minting, shopping cart and masslisting.

Tests are not probably not passing because of this:
image
or this:
image

But as you can see, a copy of this PR on my forked repository with the same secret set works just fine:
Prury nft-gallery

PR Type

  • Testing feature

Context

Copilot Summary

🤖 Generated by Copilot at 568beaf

This pull request enables the use of a secret mnemonic phrase for end-to-end testing, and updates the e2e-login page and the test cases accordingly. It also fixes a minor bug in the createcollection test.

🤖 Generated by Copilot at 568beaf

We use the secret phrase to enter the realm
We test the account with the avatar's helm
We create new collections with our funds
We fix the broken tests with our guns

@netlify
Copy link

netlify bot commented Oct 27, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 5c21163
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6548e2911d777900086a86b6
😎 Deploy Preview https://deploy-preview-7849--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.

@reviewpad
Copy link
Contributor

reviewpad bot commented Oct 27, 2023

AI-Generated Summary: This pull request consists of three patches:

  1. The first patch modifies the .github/workflows/playwright.yml file to set an environment variable using a secret stored in the Github Secret Store and then uses this environment variable in the project's production environment file. It also updates the Run Playwright tests step to specifically run the account.spec.ts test file.

  2. The second patch alters the pages/e2e-login.vue file by replacing the manually generated mnemonic with the one loaded from a new environmental variable that was introduced in the previous patch.

  3. The final patch introduces a new tests/e2e/account.spec.ts file which includes a test case verifying if the right account is loaded. The test is based on matching a specific attribute of the avatar-identity-icon component to a hardcoded value.

These patches seem to be part of a broader effort to implement end-to-end testing using environment variables for secret handling and specific test scenarios applied to the account functionality of the system.

@reviewpad reviewpad bot added the small Pull request is small label Oct 27, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Oct 27, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@exezbcz
Copy link
Member

exezbcz commented Oct 27, 2023

I thought this issue was due to our disabling carbonless nfts by default lmao

@prury
Copy link
Member Author

prury commented Oct 27, 2023

I thought this issue was due to our disabling carbonless nfts by default lmao

Hehe, I'm trying to do that account thing we we're talking yesterday, but no success yet

@prury prury marked this pull request as ready for review October 30, 2023 12:35
@prury prury requested a review from a team as a code owner October 30, 2023 12:35
@prury prury requested review from preschian and Jarsen136 and removed request for a team October 30, 2023 12:35
@prury prury requested a review from roiLeo October 30, 2023 12:35
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.

Please update .env.example with this new env var

.github/workflows/playwright.yml Outdated Show resolved Hide resolved
@prury
Copy link
Member Author

prury commented Oct 31, 2023

Please update .env.example with this new env var

done

@prury
Copy link
Member Author

prury commented Nov 1, 2023

@yangwao merge?

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Nov 2, 2023
@roiLeo
Copy link
Contributor

roiLeo commented Nov 2, 2023

👀
Screenshot 2023-11-02 at 15-02-03 Enviroment var to expand test cases by prury · Pull Request #7849 · kodadot_nft-gallery

@prury
Copy link
Member Author

prury commented Nov 2, 2023

👀 Screenshot 2023-11-02 at 15-02-03 Enviroment var to expand test cases by prury · Pull Request #7849 · kodadot_nft-gallery

it is supposed to fail here @roiLeo, since PR from a forked repo cannot access the secret environment var
you can observe that all the fails are related to e2e login

@roiLeo
Copy link
Contributor

roiLeo commented Nov 2, 2023

it is supposed to fail here @roiLeo, since PR from a forked repo cannot access the secret environment var you can observe that all the fails are related to e2e login

What should the MNEMONIC_E2E be like? is it supposed to be your mnemoni key from your account?

@prury
Copy link
Member Author

prury commented Nov 2, 2023

it is supposed to fail here @roiLeo, since PR from a forked repo cannot access the secret environment var you can observe that all the fails are related to e2e login

What should the MNEMONIC_E2E be like? is it supposed to be your mnemoni key from your account?

hahaha, ofc not! its a fresh mnemonic with small amount of currency for testing purposes
you will be able to use it as well

@yangwao
Copy link
Member

yangwao commented Nov 2, 2023

@prury is there anything we should add/change before merging or we can just merge it?

@prury
Copy link
Member Author

prury commented Nov 2, 2023

@prury is there anything we should add/change before merging or we can just merge it?

I've been discussing some other options with @roiLeo, better to wait a bit more for now

@prury prury mentioned this pull request Nov 6, 2023
6 tasks
Copy link

codeclimate bot commented Nov 6, 2023

Code Climate has analyzed commit 5c21163 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

Copy link

sonarcloud bot commented Nov 6, 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

@yangwao yangwao merged commit 8a1039e into kodadot:main Nov 6, 2023
12 of 14 checks passed
@roiLeo
Copy link
Contributor

roiLeo commented Nov 6, 2023

will it blend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants