-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4994aed
commit a9aef89
Showing
5 changed files
with
5,294 additions
and
2,784 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
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,55 @@ | ||
/// <reference types="cypress" /> | ||
describe('Hermione Granger Account Flow', () => { | ||
it('Should log in as Hermione Granger and perform deposit and withdrawal', | ||
() => { | ||
cy.visit( | ||
'https://www.globalsqa.com/angularJs-protractor/BankingProject/#/login' | ||
); | ||
cy.contains('Customer Login', { timeout: 10000 }) | ||
.should('be.visible'); | ||
|
||
cy.contains('Customer Login').click(); | ||
|
||
cy.get('select').select('Hermoine Granger'); | ||
|
||
cy.contains('Login').should('be.visible').click(); | ||
|
||
cy.contains('Account Number').parent().should('contain', '1001'); | ||
|
||
cy.get('strong.ng-binding').should('contain', '5096'); | ||
|
||
cy.get('strong.ng-binding').contains('Dollar').should('be.visible'); | ||
|
||
cy.contains('Deposit').click(); | ||
cy.get('input[placeholder="amount"]').type('100'); | ||
cy.contains('Deposit').click(); | ||
|
||
cy.get('span.error.ng-binding[ng-show="message"]', { timeout: 10000 }) | ||
.should('not.have.class', 'ng-hide') | ||
.and('contain', 'Deposit Successful'); | ||
|
||
cy.get('div.center').should('contain', '5196'); | ||
|
||
cy.contains('Withdraw').click(); | ||
cy.get('input[placeholder="amount"]').type('100'); | ||
cy.contains('Withdraw').click(); | ||
|
||
cy.get('span.error.ng-binding[ng-show="message"]', { timeout: 10000 }) | ||
.should('not.have.class', 'ng-hide') | ||
.and('be.visible') | ||
.and('contain', 'Transaction successful'); | ||
|
||
cy.get('strong.ng-binding').eq(1).should('contain', '5096'); | ||
|
||
cy.contains('Transactions').click(); | ||
|
||
cy.contains('Back').should('be.visible').click(); | ||
|
||
cy.get('select').select('1002'); | ||
|
||
cy.contains('Transactions').click(); | ||
cy.get('tbody tr').should('have.length', 0); | ||
|
||
cy.contains('Logout').should('be.visible').click(); | ||
}); | ||
}); |
Oops, something went wrong.