Skip to content

Commit

Permalink
fix(admin): do not show AAPNotVisibleInSearchResultNotice alert if us…
Browse files Browse the repository at this point in the history
…e is a maisonMere manager.
  • Loading branch information
agarbe committed Oct 7, 2024
1 parent 2a24f76 commit 2d42bba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/reva-admin-react/cypress/e2e/notice/top-notice.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ context("When the funding alert feature is activated", () => {
cy.get('[data-test="new-cgu-notice"]').should("not.exist");
});

it("display a not-visible notice when head agency is closed", function () {
it("should not display a not-visible notice when head agency is closed", function () {
interceptCandidacies({
fermePourAbsenceOuConges: true,
isCguAccepted: true,
Expand All @@ -81,7 +81,7 @@ context("When the funding alert feature is activated", () => {
cy.wait("@getOrganismForAAPVisibilityCheck");

cy.get('[data-test="funding-alert-notice"]').should("not.exist");
cy.get('[data-test="not-visible-alert-notice"]').should("exist");
cy.get('[data-test="not-visible-alert-notice"]').should("not.exist");
cy.get('[data-test="new-cgu-notice"]').should("not.exist");
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const LayoutNotice = () => {
!maisonMereCgu?.isLatestVersion;

const canSeeAAPNotVisibleInSearchResultNotice =
authenticated && isOrganism && !isVisibleInSearchResults;
authenticated &&
!isGestionnaireMaisonMereAAP &&
isOrganism &&
!isVisibleInSearchResults;

const canSeeNoticeAlertFundingLimit =
isFeaturNoticeAlertFundingLimitActive && isOrganism;
Expand Down

0 comments on commit 2d42bba

Please sign in to comment.