-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates tests to comply with formatting
- Loading branch information
Showing
10 changed files
with
126 additions
and
23 deletions.
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ yarn-error.log* | |
*.sw? | ||
|
||
*.iml | ||
cypress/* |
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,3 +1,5 @@ | ||
{ | ||
"pluginsFile": "tests/e2e/plugins/index.js" | ||
"video": false, | ||
"pluginsFile": "tests/e2e/plugins/index.js", | ||
"screenshotOnRunFailure": false | ||
} |
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,59 @@ | ||
describe('Home.vue', function () { | ||
|
||
describe('overall view', () => { | ||
before(() => { | ||
cy.visit('/'); | ||
}); | ||
it('Home should be active', () => { | ||
cy.get(':nth-child(1) > a > span').should('have.class', 'active'); | ||
}); | ||
it('Should show aggregated data', () => { | ||
cy.get(':nth-child(1) > .overview__value').should('be.visible'); | ||
}); | ||
it('Wallet Install is hidden on found wallet', () => { | ||
cy.get('.wallet-install').should('not.be.visible'); | ||
}); | ||
it('Tip mask is shown on found wallet', () => { | ||
cy.get('.tip__post').should('be.visible'); | ||
}); | ||
}); | ||
|
||
describe('create tip', () => { | ||
const randomString = [...Array(20)].map(() => Math.random().toString(36)[2]).join(''); | ||
it('Should create tip', () => { | ||
cy.get('.col-md-4 > .input-group > .form-control').type('0.1'); | ||
cy.get('.col-md-8 > .form-control').type('https://aeternity.com'); | ||
cy.get(':nth-child(3) > .form-control').type(randomString, { force: true }); | ||
cy.get('.btn').click(); | ||
}); | ||
|
||
it('Created tip should be visible', () => { | ||
cy.contains(randomString, {timeout: 10000}).should('be.visible'); | ||
}); | ||
|
||
it('Tip should navigate to SingleTipView', () => { | ||
cy.contains(randomString).click(); | ||
cy.url().should('contain', '/tip/'); | ||
}); | ||
}); | ||
|
||
describe('retip', () => { | ||
before(() => { | ||
cy.visit('/'); | ||
cy.server(); | ||
cy.route('/v2/accounts/ak_fUq2NesPXcYZ1CcqBcGC3StpdnQw3iVxMA3YSeCNAwfN4myQk').as('getAccount'); | ||
}); | ||
it('Should be able to retip tip', () => { | ||
cy.wait('@getAccount'); | ||
// Define route here so we do not trigger it while loading initially | ||
cy.route('POST', '/v2/debug/transactions/dry-run').as('dryRun'); | ||
cy.get('.tip__amount .retip__icon').first().click(); | ||
cy.get('.retip__container').should('be.visible'); | ||
cy.get('.retip__container input').type('0.01'); | ||
cy.get('.retip__container .btn').click(); | ||
cy.wait('@dryRun', { requestTimeout: 10000 }); | ||
cy.get('.retip__wrapper').should('be.visible'); | ||
cy.get('.retip__container').should('not.be.visible'); | ||
}); | ||
}); | ||
}); |
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,19 @@ | ||
describe('TipRecord.vue', function () { | ||
before(() => { | ||
cy.visit('/#/tip/1'); | ||
}); | ||
|
||
it('Content should be visible', () => { | ||
cy.get('.title > span').should('be.visible'); | ||
cy.get('.tip__amount').should('be.visible'); | ||
cy.get('.tip__amount').should('contain.text', '0.1'); | ||
}); | ||
|
||
const randomString = [...Array(20)].map(() => Math.random().toString(36)[2]).join(''); | ||
it.skip('Should be able to post comment', () => { | ||
// Needs backend implementation | ||
cy.get('.form-control').type(randomString); | ||
cy.get('.btn').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