-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refacto: create folders pages, fonctionnalites, recherche
refacto: e2e tests organization
- Loading branch information
Showing
39 changed files
with
320 additions
and
45 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
cypress/e2e/annonces.cy.js → .../e2e/pages/annonces-et-observations.cy.js
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
2 changes: 1 addition & 1 deletion
2
cypress/e2e/conventions-collectives.cy.js → ...s/e2e/pages/conventions-collectives.cy.js
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,43 @@ | ||
describe('Dirigeants ESSOR ENERGIES (SOLARSUD)', () => { | ||
it('Should display dirigeants from INPI', () => { | ||
cy.login(); | ||
cy.visit(`/dirigeants/487444697`); | ||
cy.contains( | ||
'Cette entreprise possède 2 dirigeants enregistrés au Registre National des Entreprises (RNE) tenu par l’INPI.' | ||
).should('be.visible'); | ||
cy.contains('David, Jean-Claude POUYANNE, né(e) en octobre 1965').should( | ||
'be.visible' | ||
); | ||
}); | ||
|
||
it('[LOGGED] Should display comparison between INPI and IG', () => { | ||
cy.login(); | ||
cy.visit(`/dirigeants/487444697`); | ||
cy.contains( | ||
'Ces informations proviennent du RNE et sont issues d‘une comparaison entre les données issues de l’INPI et celles d’Infogreffe' | ||
).should('be.visible'); | ||
cy.contains( | ||
'BCRH & ASSOCIES - SOCIETE A RESPONSABILITE LIMITEE A ASSOCIE UNIQUE - 784 824 153 (incohérence)' | ||
).should('be.visible'); | ||
cy.contains( | ||
'David, Jean-Claude POUYANNE, né(e) en octobre 1965 (incohérence)' | ||
).should('be.visible'); | ||
}); | ||
}); | ||
describe('Dirigeants non-diffusible ', () => { | ||
it('No dirigeant', () => { | ||
cy.visit(`/dirigeants/908595879`); | ||
cy.contains('▪︎ ▪︎ ▪︎ information non-diffusible ▪︎ ▪︎ ▪︎').should( | ||
'be.visible' | ||
); | ||
cy.contains('Données privées').should('be.visible'); | ||
}); | ||
it('[LOGGED] Dirigeants appear', () => { | ||
cy.login(); | ||
cy.visit(`/dirigeants/908595879`); | ||
cy.contains('Dirigeant(s)').should('be.visible'); | ||
cy.contains( | ||
'Cette entreprise possède 1 dirigeant enregistré au Registre National des Entreprises (RNE) tenu par l’INPI.' | ||
).should('be.visible'); | ||
}); | ||
}); |
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,22 @@ | ||
describe('Documents ESSOR ENERGIES (SOLARSUD)', () => { | ||
it('Bouton agent connect sur les données protégées', () => { | ||
cy.visit('/documents/487444697'); | ||
cy.contains('Réservé aux agents publics').should('be.visible'); | ||
cy.contains('button', 'ProConnect').should('be.visible'); | ||
}); | ||
|
||
it('[LOGGED] Should display documents', () => { | ||
cy.login(); | ||
cy.visit('/documents/487444697'); | ||
// Conformité | ||
cy.contains('Conformité').should('be.visible'); | ||
cy.contains('DGFiP : conforme').should('be.visible'); | ||
cy.contains('URSSAF : conforme').should('be.visible'); | ||
cy.contains('MSA : conforme').should('be.visible'); | ||
// Carte professionnelle travaux publics | ||
cy.contains('Carte professionnelle travaux publics').should('be.visible'); | ||
cy.contains( | ||
'Cette entreprise possède une carte professionnelle d’entrepreneur de travaux publics,' | ||
).should('be.visible'); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
cypress/e2e/bilans-financiers.cy.js → cypress/e2e/pages/donnees-financieres.cy.js
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,10 @@ | ||
describe('Élus VILLE DE PARIS', () => { | ||
it('Should display élus', () => { | ||
cy.visit(`/elus/217500016`); | ||
cy.contains('Élus').should('be.visible'); | ||
cy.contains( | ||
'Cette collectivité possède 164 élus enregistrés au Répertoire National des Élus :' | ||
).should('be.visible'); | ||
cy.contains('Anne HIDALGO').should('be.visible'); | ||
}); | ||
}); |
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,13 @@ | ||
describe('Établissement scolaire', () => { | ||
it('Should display service public and Établissement scolaire section', () => { | ||
cy.visit('/entreprise/198100125'); | ||
cy.contains('Service public'); | ||
cy.contains('Établissements scolaires'); | ||
}); | ||
it("Should display info from annuaire de l'éducation nationale", () => { | ||
cy.visit('/etablissements-scolaires/198100125'); | ||
cy.contains('Annuaire de l’Education Nationale'); | ||
cy.contains('N° UAI'); | ||
cy.contains('0810012Y'); // UAI | ||
}); | ||
}); |
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,58 @@ | ||
describe('Fiche résumé DANONE', () => { | ||
it('Should display basic infos', () => { | ||
cy.visit(`/entreprise/danone-552032534`); | ||
cy.contains( | ||
"Sa forme juridique est SA à conseil d'administration (s.a.i.)." | ||
).should('be.visible'); | ||
cy.contains('Informations légales de DANONE').should('be.visible'); | ||
cy.contains( | ||
'Son siège social est domicilié au 17 BOULEVARD HAUSSMANN 75009 PARIS.' | ||
).should('be.visible'); | ||
// TVA number | ||
cy.contains('N° TVA Intracommunautaire').should('be.visible'); | ||
cy.contains('FR12 345 678 901').should('be.visible'); | ||
// EORI number | ||
cy.contains('N° EORI').should('be.visible'); | ||
cy.contains('FR 123 456 789 0').should('be.visible'); | ||
// Effectifs | ||
cy.contains('Effectif salarié').should('be.visible'); | ||
cy.contains('1 000 à 1 999 salariés, en 2022').should('be.visible'); | ||
}); | ||
it('[LOGGED] Should display basic infos', () => { | ||
cy.login(); | ||
cy.visit(`/entreprise/danone-552032534`); | ||
// Effectifs | ||
cy.contains('Effectif salarié').should('be.visible'); | ||
cy.contains('1 000 à 1 999 salariés, en 2022').should('be.visible'); | ||
// Résumé pour les agents publics | ||
cy.contains('Résumé pour les agents publics').should('be.visible'); | ||
cy.contains('Documents juridiques').should('be.visible'); | ||
cy.contains('Consulter les Actes et les Statuts constitutifs').should( | ||
'be.visible' | ||
); | ||
}); | ||
}); | ||
|
||
describe('Entreprises non-diffusibles', () => { | ||
it('Should be non diffusible', () => { | ||
cy.visit(`/entreprise/300025764`); | ||
cy.contains('ne sont pas publiquement').should('have.length', 1); | ||
}); | ||
|
||
it('Should be diffusible', () => { | ||
cy.visit(`/entreprise/880878145`); | ||
cy.contains('ne sont pas publiquement').should('have.length', 0); | ||
}); | ||
}); | ||
|
||
describe('TVA number special cases', () => { | ||
it('TVA Non-assujettie', () => { | ||
cy.visit(`/entreprise/883010316`).then(() => { | ||
cy.contains('Pas de n° TVA valide'); | ||
}); | ||
cy.visit(`/entreprise/423208180`).then(() => { | ||
cy.contains('Pas de n° TVA valide connu'); | ||
cy.url().should('include', '/definitions/tva-intracommunautaire'); | ||
}); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
cypress/e2e/certifications.cy.js → ...ess/e2e/pages/labels-et-certificats.cy.js
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
{ | ||
"data": { | ||
"document_url": "https://storage.entreprise.api.gouv.fr/siade/1569139162-b99824d9c764aae19a862a0af-carte_professionnelle_fntp.pdf", | ||
"expires_in": 7889238 | ||
}, | ||
"links": {}, | ||
"meta": {} | ||
} |
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,10 @@ | ||
{ | ||
"data": { | ||
"document_url": "https://storage.entreprise.api.gouv.fr/siade/1569139162-b99824d9c764aae19a862a0af-attestation_fiscale_dgfip.pdf", | ||
"document_url_expires_in": 86400, | ||
"date_delivrance_attestation": "2023-04-11", | ||
"date_periode_analysee": "2023-03-31" | ||
}, | ||
"links": {}, | ||
"meta": {} | ||
} |
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,7 @@ | ||
{ | ||
"data": { | ||
"status": "up_to_date" | ||
}, | ||
"links": {}, | ||
"meta": {} | ||
} |
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,16 @@ | ||
{ | ||
"data": { | ||
"entity_status": { | ||
"code": "ok", | ||
"libelle": "Attestation délivrée par l'Urssaf", | ||
"description": "La délivrance de l'attestation de vigilance a été refusée par l'Urssaf car l'entité n'est pas à jour de ses cotisations sociales." | ||
}, | ||
"date_debut_validite": "2022-12-03", | ||
"date_fin_validite": "2023-06-30", | ||
"code_securite": "GB1QWERTYJJEX1O", | ||
"document_url": "https://storage.entreprise.api.gouv.fr/siade/1569139162-b99824d9c764aae19a862a0af-attestation_vigilance_acoss.pdf", | ||
"document_url_expires_in": 86400 | ||
}, | ||
"links": {}, | ||
"meta": {} | ||
} |
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,31 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"data": { | ||
"numero_identification": "784824153", | ||
"type": "personne_morale", | ||
"fonction": "COMMISSAIRE AUX COMPTES SUPPLEANT", | ||
"nom": "Henri", | ||
"prenom": "Martin", | ||
"date_naissance": "1965-01-27", | ||
"date_naissance_timestamp": -155523600, | ||
"lieu_naissance": "ROUBAIX", | ||
"pays_naissance": "FRANCE", | ||
"code_pays_naissance": "FR", | ||
"nationalite": "FRANCAISE", | ||
"code_nationalite": "FR", | ||
"raison_sociale": "BCRH & ASSOCIES - SOCIETE A RESPONSABILITE LIMITEE A ASSOCIE UNIQUE", | ||
"code_greffe": "9201", | ||
"libelle_greffe": "NANTERRE" | ||
}, | ||
"links": {}, | ||
"meta": {} | ||
} | ||
], | ||
"meta": { | ||
"personnes_physiques_count": 10, | ||
"personnes_morales_count": 2, | ||
"count": 12 | ||
}, | ||
"links": {} | ||
} |
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,16 @@ | ||
{ | ||
"ess_france": "2023-11-20", | ||
"rge": "2025-01-01", | ||
"uai": "2025-01-01", | ||
"collectivite_territoriale": "2024-10-31", | ||
"collectivite_territoriale_elus": "2024-10-31", | ||
"sirene": "2024-12-31", | ||
"egapro": "2024-12-26", | ||
"agence_bio": "2025-01-01", | ||
"entrepreneur_spectacle": "2024-12-31", | ||
"finess": "2024-11-12", | ||
"bilan_financier": "2024-12-20", | ||
"organisme_formation": "2025-01-01", | ||
"convention_collective": "2024-12-23", | ||
"rne": "2024-12-31" | ||
} |
7 changes: 7 additions & 0 deletions
7
cypress/mocks/handlers/carte-professionnelle-travaux-publics.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,7 @@ | ||
import { HttpResponse, HttpResponseResolver } from 'msw'; | ||
import carteProfessionnelleTravauxPublics from '../../fixtures/carte-professionnelle-travaux-publics.json'; | ||
|
||
export const carteProfessionnelleTravauxPublicsHandler: HttpResponseResolver = | ||
({ request }) => { | ||
return HttpResponse.json(carteProfessionnelleTravauxPublics); | ||
}; |
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,16 @@ | ||
import { HttpResponse, HttpResponseResolver } from 'msw'; | ||
import conformiteDgfip from '../../fixtures/conformite-dgfip.json'; | ||
import conformiteMsa from '../../fixtures/conformite-msa.json'; | ||
import conformiteUrssaf from '../../fixtures/conformite-urssaf.json'; | ||
|
||
export const conformiteHandler: HttpResponseResolver = ({ request }) => { | ||
let response = {}; | ||
if (request.url.match('dgfip')) { | ||
response = conformiteDgfip; | ||
} else if (request.url.match('msa')) { | ||
response = conformiteMsa; | ||
} else if (request.url.match('urssaf')) { | ||
response = conformiteUrssaf; | ||
} | ||
return HttpResponse.json(response); | ||
}; |
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,6 @@ | ||
import { HttpResponse, HttpResponseResolver } from 'msw'; | ||
import mandatairesRcs from '../../fixtures/mandataires-rcs.json'; | ||
|
||
export const mandatairesRcsHandler: HttpResponseResolver = ({ request }) => { | ||
return HttpResponse.json(mandatairesRcs); | ||
}; |
7 changes: 7 additions & 0 deletions
7
cypress/mocks/handlers/recherche-entreprises-last-modified.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,7 @@ | ||
import { HttpResponse, HttpResponseResolver } from 'msw'; | ||
import rechercheEntrepriseLastModified from '../../fixtures/recherche-entreprise-last-modified.json'; | ||
|
||
export const rechercheEntrepriseLastModifiedHandler: HttpResponseResolver = | ||
async ({ request }) => { | ||
return HttpResponse.json(rechercheEntrepriseLastModified); | ||
}; |
Oops, something went wrong.