-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec921eb
commit b152dc5
Showing
31 changed files
with
148 additions
and
19 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 |
---|---|---|
|
@@ -110,8 +110,6 @@ jobs: | |
node-version-file: package.json | ||
- run: npm ci --include=dev | ||
- run: npm run migrate up | ||
- run: npm run fixtures:load-ci -- cypress/e2e/${{ matrix.e2e_test }}/fixtures.sql | ||
- run: npm run update-organization-info -- 500 | ||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ describe("join organizations", () => { | |
); | ||
}); | ||
|
||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join collectivité territoriale with official contact domain", function () { | ||
cy.visit("/users/join-organization"); | ||
cy.login("[email protected]"); | ||
|
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 |
---|---|---|
|
@@ -11,6 +11,10 @@ describe("join organizations", () => { | |
); | ||
}); | ||
|
||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join suggested organisation", function () { | ||
cy.visit("/"); | ||
cy.login("[email protected]"); | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,10 @@ describe("join organizations", () => { | |
); | ||
}); | ||
|
||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join suggested organisation", function () { | ||
cy.visit("/"); | ||
cy.login("[email protected]"); | ||
|
4 changes: 4 additions & 0 deletions
4
cypress/e2e/join_with_code_sent_to_official_contact_email/index.cy.ts
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,6 +1,10 @@ | ||
// | ||
|
||
describe("join organizations", () => { | ||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join collectivité territoriale with code send to official contact email", function () { | ||
cy.visit("/users/join-organization"); | ||
cy.login("[email protected]"); | ||
|
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,6 +1,10 @@ | ||
// | ||
|
||
describe("join organizations", () => { | ||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join collectivité territoriale with code send to official contact email", function () { | ||
cy.visit("/users/join-organization"); | ||
cy.login("[email protected]"); | ||
|
@@ -16,22 +20,6 @@ describe("join organizations", () => { | |
"[email protected]", | ||
); | ||
|
||
// cy.maildevGetMessageBySubject( | ||
// "[ProConnect] Authentifier un email sur ProConnect", | ||
// ).then((email) => { | ||
// cy.maildevVisitMessageById(email.id); | ||
// cy.get("em:nth-child(1)") | ||
// .invoke("text") | ||
// .then((code) => { | ||
// cy.maildevDeleteMessageById(email.id); | ||
// cy.go("back"); | ||
// cy.get('[name="official_contact_email_verification_token"]').type( | ||
// code, | ||
// ); | ||
// cy.get('[type="submit"]').click(); | ||
// }); | ||
// }); | ||
|
||
cy.maildevGetMessageBySubject( | ||
"[ProConnect] Authentifier un email sur ProConnect", | ||
) | ||
|
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,6 +1,10 @@ | ||
// | ||
|
||
describe("join organizations", () => { | ||
it("should seed the database once", function () { | ||
cy.seed(); | ||
}); | ||
|
||
it("join collectivité territoriale with official contact email", function () { | ||
cy.visit("/users/join-organization"); | ||
cy.login("[email protected]"); | ||
|
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
4 changes: 4 additions & 0 deletions
4
cypress/e2e/signin_from_proconnect_federation_client/index.cy.ts
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
4 changes: 4 additions & 0 deletions
4
cypress/e2e/signin_with_email_verification_renewal/index.cy.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
|
||
import { dirname } from "path"; | ||
|
||
// | ||
|
||
export function seed() { | ||
{ | ||
const command = "npm run delete-database"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command, { env: { ENABLE_DATABASE_DELETION: "True" } }).then( | ||
(result) => cy.task("log", result.stdout), | ||
); | ||
} | ||
{ | ||
const command = "npm run migrate up"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command).then((result) => cy.task("log", result.stdout)); | ||
} | ||
{ | ||
const scope = dirname(Cypress.spec.relative); | ||
const command = `npm run fixtures:load-ci -- ${scope}/fixtures.sql`; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command).then((result) => cy.task("log", result.stdout)); | ||
} | ||
{ | ||
const command = "npm run update-organization-info -- 2000"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command, { timeout: 10_000 }).then((result) => | ||
cy.task("log", result.stdout), | ||
); | ||
} | ||
|
||
return cy.wrap(undefined); | ||
} |