-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from FelipeDuarteLuna/26-02-2024 - Cypress: te…
…stes end-to-end 26-02-2024 - Cypress: testes end-to-end
- Loading branch information
Showing
5 changed files
with
42 additions
and
6 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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { getGreeting } from '../support/app.po'; | ||
import { getTitle } from '../support/app.po'; | ||
|
||
describe('ecommerce', () => { | ||
beforeEach(() => cy.visit('/')); | ||
|
||
it('should display welcome message', () => { | ||
// Custom command example, see `../support/commands.ts` file | ||
cy.login('[email protected]', 'myPassword'); | ||
//cy.login('[email protected]', 'myPassword'); | ||
|
||
// Function helper example, see `../support/app.po.ts` file | ||
getGreeting().contains('Welcome ecommerce'); | ||
getTitle().contains('Ecommerce'); | ||
}); | ||
|
||
}); |
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 @@ | ||
import { getTitle } from '../support/app.po'; | ||
|
||
describe('ecommerce', () => { | ||
beforeEach(() => cy.visit('/')); | ||
|
||
it('Should Login', () => { | ||
|
||
/*cy.get('a').contains('Fazer Login').click(); | ||
cy.get('input[type="email"]').type('[email protected]'); | ||
cy.get('button').contains('Próximo').click(); | ||
cy.get('input[type="password"]').type('MentoriaAngularPro'); | ||
cy.get('button').contains('Entrar').click();*/ | ||
|
||
// Custom command example, see `../support/commands.ts` file | ||
cy.login('[email protected]', 'MentoriaAngularPro'); | ||
|
||
// should redirect to Home | ||
cy.url().should('include', '/home'); | ||
|
||
// Function helper example, see `../support/app.po.ts` file | ||
getTitle().contains('Ecommerce'); | ||
}); | ||
|
||
}); |
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 +1 @@ | ||
export const getGreeting = () => cy.get('h1'); | ||
export const getTitle = () => cy.get('h1'); |
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