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
Synpress Implementation #830
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
402c30a
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli c61bc65
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli e0d2ee0
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli ba41bdf
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli e1e93d5
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli e28ef30
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli b4171d2
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli 37f7ee2
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli 7c1e086
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli fa0cbf6
Merge branch 'DXgovernance:v1.1-beta' into v1.1-beta
MiltonTulli eedbde2
configure synpress
MiltonTulli 7925b76
refactor
MiltonTulli eadd77f
include beta branch in integration test ci to test
MiltonTulli ef6507f
edit github action
MiltonTulli cc5196d
update integration script with record key
MiltonTulli e7b0644
Remove long text from typed field and remove "remove" installed package
MiltonTulli e5b92f5
remove unused code
MiltonTulli File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,48 @@ | ||
/// <reference types="cypress" /> | ||
import Guilds from '../../support/pageObjects/Guilds'; | ||
import { clickAnywhereToClose } from '../../utils'; | ||
|
||
describe('Guilds', () => { | ||
it('Should show Guild not available page', () => { | ||
Guilds.goToGuildsPage('localhost', '0xbadAddress555555'); | ||
cy.contains('No guild exists on this address.'); | ||
it('Should show deployed guilds in LandingPage', () => { | ||
Guilds.goToGuildsPage(); | ||
cy.findAllByTestId('guildCard').should( | ||
'have.length', | ||
Guilds.deployedGuildsAddresses.length | ||
); | ||
}); | ||
|
||
it('Should redirect to guild page', () => { | ||
cy.findAllByTestId('guildCard') | ||
.eq(1) | ||
.invoke('attr', 'href') | ||
.then(href => { | ||
cy.findAllByTestId('guildCard').eq(1).click(); | ||
cy.url().should('include', href); | ||
}); | ||
}); | ||
|
||
it('Should render proper components on Guild page', () => { | ||
const guildAddress = Guilds.deployedGuildsAddresses[0]; | ||
expect(Guilds.deployedGuildsAddresses.length).to.be.equal(3); | ||
Guilds.goToGuildsPage('localhost', guildAddress); | ||
Guilds.shouldRenderProposalsList(); | ||
Guilds.shouldRenderSidebar(); | ||
}); | ||
|
||
it('Should be able to connect with metamask account', () => { | ||
Guilds.clickOpenWalletModalBtn(); | ||
cy.findByTestId('wallet-option-MetaMask').eq(0).click(); | ||
cy.waitFor(null, 1000); | ||
cy.acceptMetamaskAccess(true); | ||
clickAnywhereToClose(); | ||
}); | ||
|
||
it('Should trigger Create Proposal', () => { | ||
cy.findByTestId('create-proposal-button').should('be.visible').click(); | ||
cy.url().should('include', '/proposalType'); | ||
cy.findByTestId('proposal-type-continue-button') | ||
.should('be.visible') | ||
.click(); | ||
cy.url().should('include', '/create'); | ||
Guilds.fillCreateProposalForm(); | ||
cy.findByTestId('create-proposal-action-button').click(); | ||
}); | ||
}); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
// *********************************************************** | ||
|
||
import './commands'; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["node", "cypress", "@testing-library/cypress"], | ||
"typeRoots": ["../node_modules/@types"], | ||
"isolatedModules": false, | ||
}, | ||
"include": ["**/*.ts"] | ||
} | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": [ | ||
"node", | ||
"cypress", | ||
"@types/puppeteer-core", | ||
"@synthetixio/synpress/support", | ||
"cypress-wait-until", | ||
"@testing-library/cypress" | ||
], | ||
"typeRoots": ["../node_modules/@types"], | ||
"isolatedModules": false | ||
}, | ||
"include": ["**/*.ts"] | ||
} | ||
|
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,4 @@ | ||
export const clickAnywhereToClose = (nodeOrSelector: string = 'body') => { | ||
return cy.get(nodeOrSelector).click(0, 0); | ||
}; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get record key from env | ||
export $(cat .env | grep CYPRESS_RECORD_KEY | xargs) | ||
RECORD_KEY="${CYPRESS_RECORD_KEY}" | ||
|
||
export PRIVATE_KEY=0x0054b824c2083e7db09f36edb2ab24eb31f8276fa6cd62e30b42e3a185b37179 | ||
export PASSWORD="TestMetaMask" | ||
export NETWORK_NAME=localhost | ||
export RPC_URL=http://127.0.0.1:8545/ | ||
export CHAIN_ID=1337 | ||
export IS_TESTNET=true | ||
|
||
|
||
if test -z "$RECORD_KEY" | ||
then | ||
synpress run --configFile synpress.json --record false | ||
else | ||
synpress run --configFile synpress.json --record --key $RECORD_KEY | ||
fi |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"projectId": "bocbgz", | ||
"experimentalStudio": true, | ||
"viewportWidth": 1920, | ||
"viewportHeight": 1080, | ||
"baseUrl": "http://localhost:3000/#", | ||
"userAgent": "synpress", | ||
"retries": { "runMode": 0, "openMode": 0 }, | ||
"integrationFolder": "./cypress/integration", | ||
"screenshotsFolder": "./cypress/screenshots", | ||
"videosFolder": "cypress/videos", | ||
"chromeWebSecurity": true, | ||
"component": { | ||
"componentFolder": "src", | ||
"testFiles": "**/*spec.{js,jsx,ts,tsx}" | ||
}, | ||
"env": { | ||
"coverage": false | ||
}, | ||
"defaultCommandTimeout": 60000, | ||
"pageLoadTimeout": 60000, | ||
"requestTimeout": 60000 | ||
} | ||
|
Oops, something went wrong.
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.
id put a quick comment here about where this private key is from
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.
This is localhost hardhat account. Extracted from dev.sh
dxvote/scripts/dev.sh
Line 25 in b0cca80