cy: no more naviagte

This commit is contained in:
Jean-Baptiste Pasquier
2020-09-17 13:08:44 +02:00
parent 9a0beef4fb
commit 4ab6ab9764
16 changed files with 133 additions and 32 deletions

View File

@ -26,12 +26,20 @@ context('Edit Job Offer Browser Testing', () => {
it('should visit user login screen', () => cy.userLogin());
it('should login', () => cy.login());
describe('Job Offer Edition process', () => {
it('should visit the job offers list screen', () => cy.naviagte('/job-offers'));
it('should visit the job offers list screen', () => {
cy.visit('/job-offers');
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/job-offers');
});
});
it('should visit the last job offer edit screen', () => {
cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => {
cy.naviagte('/job-offers/job-offers-edit/@' + id);
cy.visit('/job-offers/job-offers-edit/@' + id);
cy.location().should((loc) => {
expect(loc.pathname).to.eq('/job-offers/job-offers-edit/@' + id);
});
}));
});
it('should enter new job offer data', () => {