Skip to content

Commit

Permalink
wip: update condition
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierJp committed Jun 26, 2024
1 parent 27d5cf4 commit 0a21766
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions cypress/e2e/espace-agent.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ describe(
it('Connexion', () => {
cy.visit(`/lp/agent-public`);
cy.contains('button', 'AgentConnect').click();
cy.origin('https://fca.integ01.dev-agentconnect.fr', () => {
cy.origin('fca.integ01.dev-agentconnect.fr', () => {
cy.get('input[type="email"]').clear().type('[email protected]');

cy.contains('button', 'Se connecter').click();
});

cy.origin('https://app-sandbox.moncomptepro.beta.gouv.fr', () => {
cy.origin('app-sandbox.moncomptepro.beta.gouv.fr', () => {
cy.contains('Renseignez votre mot de passe');
cy.get('input[type="password"]').type('[email protected]');
cy.contains('button', 'S’identifier').click();
Expand Down
6 changes: 3 additions & 3 deletions utils/helpers/is-super-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const superAgents = new SuperAgentsList();

export const checkIsSuperAgent = async (agentMail: string) => {
const isTestAccount =
(agentMail === '[email protected]' ||
agentMail === '[email protected]') &&
process.env.NODE_ENV !== 'production';
agentMail === '[email protected]' &&
(process.env.NODE_ENV !== 'production' ||
process.env.NEXT_PUBLIC_END2END_MOCKING === 'enabled');

if (isTestAccount) {
return true;
Expand Down

0 comments on commit 0a21766

Please sign in to comment.