-
Notifications
You must be signed in to change notification settings - Fork 17
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(e2e): explore-wallets #664
Open
mikhail-zlochevskyi
wants to merge
11
commits into
main
Choose a base branch
from
mikhail/e2e-explore-wallets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ec8bd35
init commit;
56631c9
add test for Choose Wallet section;
0adc49b
added Daily Use tests;
6a214a6
added Desktop Wallets links tests;
99f8de0
fix unprocessable character tests;
4557be1
remove only
228d72d
Merge branch 'main' into mikhail/e2e-explore-wallets
228908c
fix test ids
1e2746e
add fetching of the version for desktop wallets
ab40916
update github key
8dfe07a
update github key; add auth to download link builder;
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import { | ||
desktopWalletsUrls, | ||
mobileWalletsUrls, | ||
webWallets, | ||
} from "../../fixture/wallets.config"; | ||
|
||
const viewports = ["macbook-16", "iphone-xr", "ipad-2"]; | ||
|
||
viewports.forEach((viewport) => { | ||
context(`/explore/wallets on ${viewport}`, () => { | ||
beforeEach(() => { | ||
cy.visit("/explore/wallets"); | ||
cy.viewport(<Cypress.ViewportPreset>viewport); | ||
}); | ||
|
||
it("should have Choose Wallet section visible and expected text", () => { | ||
cy.checkElementVisibilityAndText( | ||
"section-title-explore-wallets-defichain-wallets", | ||
"CHOOSE A WALLET THAT SUITS YOU" | ||
); | ||
cy.checkElementVisibilityAndText("sub-title", "DeFiChain Wallets"); | ||
cy.checkElementVisibilityAndText( | ||
"desc", | ||
"Gain access to the DeFi landscape through non-custodial wallets designed for a multitude of requirements." | ||
); | ||
}); | ||
|
||
it("should have Start exploring section clickable", () => { | ||
if (viewport === "macbook-16") { | ||
cy.findByTestId("start-exploring-button").click({ | ||
scrollBehavior: false, | ||
}); | ||
cy.url().should("include", "#explore-wallets-daily-use-section"); | ||
} | ||
cy.checkElementVisibilityAndText( | ||
"section-title-for-daily-use", | ||
"FOR DAILY USE" | ||
); | ||
cy.checkElementVisibilityAndText( | ||
"for-daily-use-section-title", | ||
"Daily access to DeFiChain" | ||
); | ||
|
||
cy.checkElementVisibilityAndText( | ||
"for-daily-use-section-subtitle", | ||
"These wallets provide lightweight, easy access to DeFiChain’s suite of features. Best suited for users who interact with DeFiChain on a near-daily basis, while not compromising on speed and security of funds." | ||
); | ||
}); | ||
|
||
it("should have For Daily Use elements visible and expected links", () => { | ||
webWallets.forEach((webWallet) => { | ||
cy.checkElementVisibilityAndHref(webWallet.testId, webWallet.url); | ||
}); | ||
mobileWalletsUrls.forEach((mobileWallet) => { | ||
cy.checkElementVisibilityAndHref(mobileWallet.testId, mobileWallet.url); | ||
}); | ||
}); | ||
|
||
it("should have Suitable For Advanced usage elements visible and expected text", () => { | ||
cy.checkElementVisibilityAndText( | ||
"section-title-advance-usage", | ||
"SUITABLE FOR ADVANCE USAGE" | ||
); | ||
cy.checkElementVisibilityAndText( | ||
"advance-use-section-title", | ||
"Advanced usage of DeFiChain" | ||
); | ||
cy.checkElementVisibilityAndText( | ||
"advance-use-section-subtitle", | ||
"Advanced wallets that are suited for complex usage of DeFiChain, such as masternode and multi-signature management along with much more." | ||
); | ||
}); | ||
|
||
it("should have Desktop Wallets links visible and expected text", () => { | ||
desktopWalletsUrls.forEach((desktopWallet) => { | ||
cy.checkElementVisibilityAndHref( | ||
desktopWallet.testId, | ||
desktopWallet.url | ||
); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
export const webWallets = [ | ||
{ | ||
testId: "brave-link-jly", | ||
url: "https://chrome.google.com/webstore/detail/jellywallet/eegcfalgkkhehkhbjbggbhhlcnckadih", | ||
}, | ||
{ | ||
testId: "firefox-link-jly", | ||
url: "https://addons.mozilla.org/en-US/firefox/addon/jellywallet/", | ||
}, | ||
{ | ||
testId: "chrome-link-jly", | ||
url: "https://chrome.google.com/webstore/detail/jellywallet/eegcfalgkkhehkhbjbggbhhlcnckadih", | ||
}, | ||
]; | ||
|
||
export const mobileWalletsUrls = [ | ||
{ | ||
wallet: "dfxWallet", | ||
testId: "google-play-link-dfx", | ||
url: "https://play.google.com/store/apps/details?id=com.defichain.app.dfx", | ||
}, | ||
{ | ||
wallet: "dfxWallet", | ||
testId: "appstore-link-dfx", | ||
url: "https://apps.apple.com/app/id1582633093", | ||
}, | ||
{ | ||
wallet: "lightWallet", | ||
testId: "google-play-link-dfc", | ||
url: "https://play.google.com/store/apps/details?id=com.defichain.app", | ||
}, | ||
{ | ||
wallet: "lightWallet", | ||
testId: "appstore-link-dfc", | ||
url: "https://apps.apple.com/us/app/defichain-wallet/id1572472820", | ||
}, | ||
]; | ||
|
||
export const desktopWalletsUrls = [ | ||
{ | ||
testId: "github-link-advance-use-section-dfc-win", | ||
url: "https://github.com/BirthdayResearch/defichain-app/releases/download/v3.2.9/DeFi-Wallet-Setup-3.2.9.exe", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-dfc-mac", | ||
url: "https://github.com/BirthdayResearch/defichain-app/releases/download/v3.2.9/DeFi-Wallet-3.2.9.dmg", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-dfc-linux", | ||
url: "https://github.com/BirthdayResearch/defichain-app/releases/download/v3.2.9/DeFi-Wallet-3.2.9.AppImage", | ||
}, | ||
{ | ||
testId: "github-link-rasp-pi", | ||
url: "https://github.com/Martin8617/Defi-Wallet-for-Raspberry-Pi", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-cli-mac", | ||
url: "https://github.com/DeFiCh/ain/releases/download/v3.2.8/defichain-3.2.8-x86_64-apple-darwin18.tar.gz", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-cli-win", | ||
url: "https://github.com/DeFiCh/ain/releases/download/v3.2.8/defichain-3.2.8-x86_64-w64-mingw32.zip", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-cli-linux", | ||
url: "https://github.com/DeFiCh/ain/releases/download/v3.2.8/defichain-3.2.8-x86_64-pc-linux-gnu.tar.gz", | ||
}, | ||
{ | ||
testId: "github-link-advance-use-section-electrum", | ||
url: "https://github.com/BirthdayResearch/defichain-electrum/releases/latest", | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will not work without proper versioning