generated from muratkeremozcan/react-cypress-ts-vite-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #49 from cesarhenrq/qa
4588 feat inital page
- Loading branch information
Showing
26 changed files
with
228 additions
and
47 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 |
---|---|---|
@@ -1 +1,45 @@ | ||
describe('e2e', () => {}); | ||
describe('MetaVagas App', () => { | ||
const clickTestsHelper = [ | ||
{ whereToClick: 'Tecnologia', whatToExpect: 'filter-cards-technology' }, | ||
{ whereToClick: 'Cargos', whatToExpect: 'filter-cards-roles' }, | ||
{ whereToClick: 'Cidades', whatToExpect: 'filter-cards-location' }, | ||
]; | ||
|
||
describe('Home Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
}); | ||
|
||
it('should navigate to login page when click on "Entrar" in header', () => { | ||
cy.getByCy('header').contains('Entrar').click(); | ||
cy.location('pathname').should('eq', '/login'); | ||
}); | ||
|
||
it('should navigate to register page when click on "Cadastrar-se gratuitamente" in header', () => { | ||
cy.getByCy('header').contains('Cadastrar-se gratuitamente').click(); | ||
cy.location('pathname').should('eq', '/register'); | ||
}); | ||
|
||
it('should navigate to login page when click on "Entrar" in footer', () => { | ||
cy.getByCy('footer').contains('Entrar').click(); | ||
cy.location('pathname').should('eq', '/login'); | ||
}); | ||
|
||
it('should navigate to register page when click on "Cadastrar-se gratuitamente" in footer', () => { | ||
cy.getByCy('footer').contains('Cadastrar-se gratuitamente').click(); | ||
cy.location('pathname').should('eq', '/register'); | ||
}); | ||
|
||
it('should navigate to register page when click on "cadastro gratuito"', () => { | ||
cy.contains('cadastro gratuito').click(); | ||
cy.location('pathname').should('eq', '/register'); | ||
}); | ||
|
||
clickTestsHelper.forEach(({ whereToClick, whatToExpect }) => { | ||
it(`should navigate to ${whereToClick} page when click on ${whereToClick}`, () => { | ||
cy.getByCy('filter-card-container').contains(whereToClick).click(); | ||
cy.getByCy(whatToExpect).should('exist'); | ||
}); | ||
}); | ||
}); | ||
}); |
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 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,12 +1,12 @@ | ||
import GlobalStyle from '@styles/global'; | ||
|
||
import BaseLayout from '@pages/BaseLayout'; | ||
import Router from '@routes/Router'; | ||
|
||
export default function App() { | ||
return ( | ||
<div className="App"> | ||
<GlobalStyle /> | ||
<BaseLayout>it works!</BaseLayout> | ||
<Router /> | ||
</div> | ||
); | ||
} |
5 changes: 3 additions & 2 deletions
5
src/components/FilterCardContainer/FilterCardContainer.cy.tsx
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
8 changes: 7 additions & 1 deletion
8
src/components/FilterCardContainer/FilterCardContainer.test.tsx
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
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
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
Oops, something went wrong.