-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(seed): add yes we hack organization
- Loading branch information
1 parent
23202c2
commit 02b7d37
Showing
5 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
e2e/features/organizations/yes_we_hack_domain_verification.feature
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,32 @@ | ||
#language: fr | ||
Fonctionnalité: Page organisation - domaine à vérifier | ||
|
||
Contexte: | ||
Soit une base de données nourrie au grain | ||
Quand je navigue sur la page | ||
* je vois "Bonjour Hyyypertool !" | ||
* je clique sur le bouton "AgentConnect" | ||
|
||
Scénario: | ||
Quand je clique sur "Domaines à verifier" | ||
Alors je suis redirigé sur "/organizations/domains" | ||
* je vois "Liste des domaines à vérifier" | ||
* je vois la ligne de table "81403721400016" | ||
* sur la même ligne je vois "Yes we hack" | ||
|
||
Quand sur la même ligne je clique sur "➡️" | ||
Alors je vois "A propos de « Yes we hack »" | ||
* je vois "Dénomination : Yes we hack" | ||
|
||
Soit le tableau sous le title "Domaines de l'organisation" | ||
* je vois la ligne "yeswehack.com" dans le tableau | ||
* sur la même ligne je vois "❓" | ||
|
||
Quand j'ouvre le menu déroulant sur la même ligne | ||
Et je clique sur "✅ Domain autorisé" | ||
Alors je vois la ligne "yeswehack.com" dans le tableau | ||
Et sur la même ligne je vois "✅" | ||
|
||
Quand je clique sur "Domaines à verifier" | ||
Et je clique sur "Rafraichir" | ||
* le tableau sous le title "Domaines de l'organisation" |
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
45 changes: 45 additions & 0 deletions
45
packages/~/infra/moncomptepro/database/src/seed/organizations/commune_de_pompierre.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
|
||
import { schema, type MonComptePro_PgDatabase } from "../.."; | ||
|
||
export async function insert_commune_de_pompierre(pg: MonComptePro_PgDatabase) { | ||
const [{ id: organization_id }] = await pg | ||
.insert(schema.organizations) | ||
.values({ | ||
cached_activite_principale: "84.11Z", | ||
cached_adresse: "6 rue du chevalier de la barre, 88300 Pompierre", | ||
cached_categorie_juridique: "7210", | ||
cached_code_officiel_geographique: null, | ||
cached_code_postal: "88300", | ||
cached_enseigne: "Mairie", | ||
cached_est_active: true, | ||
cached_est_diffusible: true, | ||
cached_etat_administratif: "A", | ||
cached_libelle_activite_principale: | ||
"84.11Z - Administration publique générale", | ||
cached_libelle_categorie_juridique: "Commune et commune nouvelle", | ||
cached_libelle_tranche_effectif: "1 ou 2 salariés, en 2019", | ||
cached_libelle: "Commune de pompierre - Mairie", | ||
cached_nom_complet: "Commune de pompierre", | ||
cached_statut_diffusion: "O", | ||
cached_tranche_effectifs_unite_legale: "02", | ||
cached_tranche_effectifs: "01", | ||
created_at: "2022-04-11 15:31:44.199+00", | ||
organization_info_fetched_at: "2022-08-08 17:36:27.443+00", | ||
siret: "21880352600019", | ||
updated_at: "2022-04-11 15:31:44.199+00", | ||
}) | ||
.returning({ id: schema.organizations.id }); | ||
|
||
await pg.insert(schema.email_domains).values({ | ||
organization_id, | ||
domain: "9online.fr", | ||
verification_type: null, | ||
can_be_suggested: true, | ||
verified_at: null, | ||
created_at: "2022-04-11 15:31:44.199+00", | ||
updated_at: "2022-04-11 15:31:44.199+00", | ||
}); | ||
|
||
return organization_id; | ||
} |
45 changes: 45 additions & 0 deletions
45
packages/~/infra/moncomptepro/database/src/seed/organizations/yes_we_hack.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
|
||
import { schema, type MonComptePro_PgDatabase } from "../.."; | ||
|
||
export async function insert_yes_we_hack(pg: MonComptePro_PgDatabase) { | ||
const [{ id: organization_id }] = await pg | ||
.insert(schema.organizations) | ||
.values({ | ||
cached_activite_principale: "62.09Z", | ||
cached_adresse: "14 rue charles v, 75004 Paris", | ||
cached_categorie_juridique: "5710", | ||
cached_code_officiel_geographique: "75104", | ||
cached_code_postal: "75004", | ||
cached_enseigne: "", | ||
cached_est_active: true, | ||
cached_est_diffusible: true, | ||
cached_etat_administratif: "A", | ||
cached_libelle_activite_principale: | ||
"62.09Z - Autres activités informatiques", | ||
cached_libelle_categorie_juridique: "SAS, société par actions simplifiée", | ||
cached_libelle_tranche_effectif: "20 à 49 salariés, en 2021", | ||
cached_libelle: "Yes we hack", | ||
cached_nom_complet: "Yes we hack", | ||
cached_statut_diffusion: "O", | ||
cached_tranche_effectifs_unite_legale: "21", | ||
cached_tranche_effectifs: "12", | ||
created_at: "2023-12-19 10:02:33.274+00", | ||
organization_info_fetched_at: "2024-09-24 09:15:41.308+00", | ||
siret: "81403721400016", | ||
updated_at: "2024-09-24 09:15:41.308+00", | ||
}) | ||
.returning({ id: schema.organizations.id }); | ||
|
||
await pg.insert(schema.email_domains).values({ | ||
organization_id, | ||
domain: "yeswehack.com", | ||
verification_type: null, | ||
can_be_suggested: true, | ||
verified_at: "2024-03-26 05:37:24.197+00", | ||
created_at: "2023-12-19 10:02:33.274+00", | ||
updated_at: "2024-03-26 05:37:24.197+00", | ||
}); | ||
|
||
return organization_id; | ||
} |
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