Skip to content

Commit f93a88f

Browse files
committed
Merge branch 'develop'
2 parents 910406d + 21eca18 commit f93a88f

47 files changed

Lines changed: 419 additions & 201 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
describe('The Signup Page', () => {
2+
const userToSignup = {
3+
'[name=first_name]': 'Signupuser',
4+
'[name=last_name]': 'Successful',
5+
'[name=organization]': 'Signup Corp',
6+
'[name=organization_position]': 'Tester',
7+
'[name=email]': 'signup@success.test',
8+
'[name=phone_no]': '0102030405',
9+
'[name=password1]': 'derpderp',
10+
'[name=password2]': 'derpderp',
11+
};
12+
13+
it('signup a new user', function () {
14+
cy.visit('accounts/signup/');
15+
16+
cy.url().should('include', '/accounts/signup/');
17+
18+
for (const key in userToSignup) {
19+
if (Object.prototype.hasOwnProperty.call(userToSignup, key)) {
20+
const element = userToSignup[key];
21+
cy.get(key).type(element, { delay: 0 });
22+
}
23+
}
24+
25+
cy.get('[type=submit]').click();
26+
27+
cy.location().should((loc) => {
28+
expect(loc.pathname).to.eq('/');
29+
});
30+
});
31+
});

frontend_tests/cypress/e2e/project/collectivity/cantAccessInlineTasks.cy.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ describe("I can go to action page but can't see the loop to access the inline ta
88
});
99

1010
it("goes to action page and can't see inline tasks loop button", () => {
11-
cy.visit(`/project/${currentProject.pk}`);
11+
cy.visit(`/project/${currentProject.pk}/actions`);
1212

13-
cy.contains('Recommandations').click({ force: true });
14-
15-
cy.url().should('include', '/actions');
1613
cy.get('#tasks-inline-button').should('not.exist');
1714
});
1815
});
16+
17+
// page recommandations

frontend_tests/cypress/e2e/project/multiportail/canViewProjectShareBetweenPortal.cy.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ describe('Project share between portal', () => {
1919
.should('be.visible')
2020
.should('include.text', 'example2');
2121
});
22+
23+
it('display current portal EDL first', () => {
24+
cy.visit('/project/23/connaissance');
25+
26+
cy.get('[data-cy="survey-name"]').each(($el, index) => {
27+
if (index === 0) {
28+
cy.wrap($el).should('contain.text', 'Questionnaire example1');
29+
}
30+
});
31+
});
2232
});

frontend_tests/cypress/e2e/project/navigation/canAccessActions.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ describe('I can access actions tab in a project as an advisor', () => {
2424
cy.url().should('include', '/actions');
2525
});
2626
});
27+
28+
// page projet

frontend_tests/cypress/e2e/project/switchtender/otherTerritory/canReadOnlyRecommandations.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ describe('I can read only recommandations', () => {
1212
cy.contains('Ajouter une recommandation').should('not.exist');
1313
});
1414
});
15+
16+
// page recommandations

frontend_tests/cypress/e2e/project/switchtender/readOnly/canReadOnlyRecommandations.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ describe('I can read only recommandations', () => {
1212
cy.contains('Ajouter une recommandation').should('not.exist');
1313
});
1414
});
15+
16+
// page recommandations

frontend_tests/cypress/e2e/project/tasks/canDeleteTask.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ describe('I can go to tasks tab', () => {
4242
// cy.get('[data-test-id="no-tasks-banner"]').should('exist');
4343
});
4444
});
45+
46+
// page recommandations

frontend_tests/cypress/e2e/project/tasks/canPublishDraftTask.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ describe('I can go to tasks tab', () => {
4646
});
4747
});
4848
});
49+
50+
// page recommandations

frontend_tests/cypress/e2e/project/tasks/canSeeInlineTasks.cy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ describe('I can go to tasks tab', () => {
2222
);
2323
});
2424
});
25+
26+
// page recommandations

frontend_tests/cypress/e2e/project/tasks/canSeeKanbanTasks.cy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('I can go to tasks tab', () => {
99

1010
it('list all kanban tasks', () => {
1111
cy.visit(`/project/${currentProject.pk}`);
12-
cy.becomeAdvisor(currentProject.pk);
12+
cy.becomeAdvisor(currentProject.pk); // A remplacer par une fixture avec un user déjà advisor du projet
1313
cy.visit(`/project/${currentProject.pk}/actions`);
1414
cy.createTask('test');
1515

@@ -19,3 +19,5 @@ describe('I can go to tasks tab', () => {
1919
cy.get('[data-test-id="kanban-tasks-switch-button"]').should('be.checked');
2020
});
2121
});
22+
23+
// page recommandations

0 commit comments

Comments
 (0)