Skip to content

Commit a77f4a3

Browse files
committed
Merge branch 'develop' of https://github.com/betagouv/recommandations-collaboratives into feat/notif-navigation-project#805
2 parents d44cedc + e87ca1c commit a77f4a3

75 files changed

Lines changed: 1141 additions & 572 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.

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: check-yaml
77
- id: trailing-whitespace
8+
exclude_types: [sql]
89

910
- repo: https://github.com/psf/black
1011
rev: 24.10.0
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,22 @@ describe('Project share between portal', () => {
1919
.should('be.visible')
2020
.should('include.text', 'example2');
2121
});
22+
23+
it('display share by and with portal on list advisor dashboard', () => {
24+
cy.visit('/projects/advisor');
25+
cy.get('[data-cy="list-project-shared-by-origin"]')
26+
.should('be.visible')
27+
.should('include.text', 'example2');
28+
});
29+
30+
31+
it('display current portal EDL first', () => {
32+
cy.visit('/project/23/connaissance');
33+
34+
cy.get('[data-cy="survey-name"]').each(($el, index) => {
35+
if (index === 0) {
36+
cy.wrap($el).should('contain.text', 'Questionnaire example1');
37+
}
38+
});
39+
});
2240
});

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

0 commit comments

Comments
 (0)