Skip to content

Commit

Permalink
(PC-30722)[PRO] feat: remove *_new_nav@* users.
Browse files Browse the repository at this point in the history
Those are not required any longer since the new portal is the default.
  • Loading branch information
xordoquy committed Sep 4, 2024
1 parent 8aa9d67 commit 6df1c02
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ def create_offerer_without_bank_accounts() -> None:
name="1 - [CB] Structure sans coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_without_bank_accounts, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_without_bank_accounts, user__email="[email protected]"
)
venue = offerers_factories.VenueFactory(managingOfferer=offerer_without_bank_accounts, pricing_point="self")
offer = offers_factories.OfferFactory(venue=venue)
offers_factories.StockFactory(offer=offer)
Expand All @@ -42,9 +39,6 @@ def create_offerer_with_various_bank_accounts_state() -> None:
offerers_factories.UserOffererFactory(
offerer=offerer_with_various_bank_accounts_status, user__email="[email protected]"
)
offerers_factories.UserOffererFactory(
offerer=offerer_with_various_bank_accounts_status, user__email="[email protected]"
)
finance_factories.BankAccountFactory(
status=finance_models.BankAccountApplicationStatus.ACCEPTED, offerer=offerer_with_various_bank_accounts_status
)
Expand Down Expand Up @@ -75,9 +69,6 @@ def create_offerer_with_all_his_venue_linked() -> None:
name="1 - [CB] Structure avec tous ses lieux liés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_all_venues_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_all_venues_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_all_venues_linked, pricing_point="self"
)
Expand All @@ -98,9 +89,6 @@ def create_offerer_at_least_one_venue_linked() -> None:
name="1 - [CB] Structure avec un de ses lieux non rattachés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_one_venue_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_one_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_one_venue_linked, pricing_point="self"
)
Expand All @@ -120,9 +108,6 @@ def create_offerer_with_none_venue_linked() -> None:
name="1 - [CB] Structure avec aucun de ses lieux liés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_none_venue_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_none_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_none_venue_linked, pricing_point="self"
)
Expand All @@ -142,9 +127,6 @@ def create_offerer_with_all_his_venue_linked_to_one_bank_account() -> None:
name="1 - [CB] Structure avec deux coordonnées bancaires dont tous les lieux sont liés à l’une d’entre elles."
)
offerers_factories.UserOffererFactory(offerer=offerer_with_all_venues_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_all_venues_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_all_venues_linked, pricing_point="self"
)
Expand All @@ -168,9 +150,6 @@ def create_offerer_with_only_one_venue_linked() -> None:
offerers_factories.UserOffererFactory(
offerer=offerer_with_only_one_venue_linked, user__email="[email protected]"
)
offerers_factories.UserOffererFactory(
offerer=offerer_with_only_one_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_only_one_venue_linked, pricing_point="self"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ def create_users_offerers() -> list[offerers_models.Offerer]:
offerer__siren="444608442",
offerer__allowedOnAdage=True,
)
offerers_factories.UserOffererFactory(
user__email="[email protected]",
offerer=user_offerer.offerer,
)
offerers.append(user_offerer.offerer)
user_offerer = offerers_factories.UserOffererFactory(
user__email="[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_free_invoice() -> None:
logger.info("create_free_invoice")
offerer = offerers_factories.OffererFactory(name="0 - Structure avec compte bancaire et justificatif à 0€")
bank_account = finance_factories.BankAccountFactory(offerer=offerer)
offerers_factories.UserOffererFactory(offerer=offerer, user__email="activation_new_nav@example.com")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="activation@example.com")
pricing_point = offerers_factories.VenueFactory(
name="Point de valorisation pour justificatifs à 0€",
managingOfferer=offerer,
Expand Down Expand Up @@ -86,7 +86,6 @@ def create_specific_invoice() -> None:
offerer = offerers_factories.OffererFactory(name="0 - Structure avec justificatif et compte bancaire")
bank_account = finance_factories.BankAccountFactory(offerer=offerer)
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
venue = offerers_factories.VenueFactory(
name="Lieu avec justificatif",
managingOfferer=offerer,
Expand Down Expand Up @@ -212,7 +211,6 @@ def create_specific_cashflow_batch_without_invoice() -> None:
logger.info("create_specific_cashflow_batch_without_invoice")
offerer = offerers_factories.OffererFactory(name="0 - Structure avec justificatif copié")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
venue = offerers_factories.VenueFactory(
name="Lieu avec justificatif copié",
managingOfferer=offerer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def create_e2e_pro_users(offerers_by_name: dict) -> dict[str, User]:
users_by_name["pro retention"] = pro_retention
users_by_name["pro retention structures"] = pro_retention_structures
users_by_name["pro pro adage eligible"] = pro_adage_eligible
pro_new_nav_state = users_factories.ProFactory(email="activation_new_nav@example.com")
eac_new_nav_state = users_factories.ProFactory(email="eac_2_lieu_new_nav@example.com")
pro_new_nav_state = users_factories.ProFactory(email="activation@example.com")
eac_new_nav_state = users_factories.ProFactory(email="eac_2_lieu@example.com")

repository.save(*users_by_name.values(), pro_new_nav_state, eac_new_nav_state)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ def create_offerer_without_bank_accounts() -> None:
name="1 - [CB] Structure sans coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_without_bank_accounts, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_without_bank_accounts, user__email="[email protected]"
)
venue = offerers_factories.VenueFactory(managingOfferer=offerer_without_bank_accounts, pricing_point="self")
offer = offers_factories.OfferFactory(venue=venue)
offers_factories.StockFactory(offer=offer)
Expand All @@ -42,9 +39,6 @@ def create_offerer_with_various_bank_accounts_state() -> None:
offerers_factories.UserOffererFactory(
offerer=offerer_with_various_bank_accounts_status, user__email="[email protected]"
)
offerers_factories.UserOffererFactory(
offerer=offerer_with_various_bank_accounts_status, user__email="[email protected]"
)
finance_factories.BankAccountFactory(
status=finance_models.BankAccountApplicationStatus.ACCEPTED, offerer=offerer_with_various_bank_accounts_status
)
Expand Down Expand Up @@ -75,9 +69,6 @@ def create_offerer_with_all_his_venue_linked() -> None:
name="1 - [CB] Structure avec tous ses lieux liés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_all_venues_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_all_venues_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_all_venues_linked, pricing_point="self"
)
Expand All @@ -98,9 +89,6 @@ def create_offerer_at_least_one_venue_linked() -> None:
name="1 - [CB] Structure avec un de ses lieux non rattachés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_one_venue_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_one_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_one_venue_linked, pricing_point="self"
)
Expand All @@ -120,9 +108,6 @@ def create_offerer_with_none_venue_linked() -> None:
name="1 - [CB] Structure avec aucun de ses lieux liés à des coordonnées bancaires"
)
offerers_factories.UserOffererFactory(offerer=offerer_with_none_venue_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_none_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_none_venue_linked, pricing_point="self"
)
Expand All @@ -142,9 +127,6 @@ def create_offerer_with_all_his_venue_linked_to_one_bank_account() -> None:
name="1 - [CB] Structure avec deux coordonnées bancaires dont tous les lieux sont liés à l’une d’entre elles."
)
offerers_factories.UserOffererFactory(offerer=offerer_with_all_venues_linked, user__email="[email protected]")
offerers_factories.UserOffererFactory(
offerer=offerer_with_all_venues_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_all_venues_linked, pricing_point="self"
)
Expand All @@ -168,9 +150,6 @@ def create_offerer_with_only_one_venue_linked() -> None:
offerers_factories.UserOffererFactory(
offerer=offerer_with_only_one_venue_linked, user__email="[email protected]"
)
offerers_factories.UserOffererFactory(
offerer=offerer_with_only_one_venue_linked, user__email="[email protected]"
)
first_venue_with_non_free_offer = offerers_factories.VenueFactory(
managingOfferer=offerer_with_only_one_venue_linked, pricing_point="self"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ def create_users_offerers() -> list[offerers_models.Offerer]:
offerer__siren="444608442",
offerer__allowedOnAdage=True,
)
offerers_factories.UserOffererFactory(
user__email="[email protected]",
offerer=user_offerer.offerer,
)
offerers.append(user_offerer.offerer)
user_offerer = offerers_factories.UserOffererFactory(
user__email="[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_free_invoice() -> None:
logger.info("create_free_invoice")
offerer = offerers_factories.OffererFactory(name="0 - Structure avec compte bancaire et justificatif à 0€")
bank_account = finance_factories.BankAccountFactory(offerer=offerer)
offerers_factories.UserOffererFactory(offerer=offerer, user__email="activation_new_nav@example.com")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="activation@example.com")
pricing_point = offerers_factories.VenueFactory(
name="Point de valorisation pour justificatifs à 0€",
managingOfferer=offerer,
Expand Down Expand Up @@ -86,7 +86,6 @@ def create_specific_invoice() -> None:
offerer = offerers_factories.OffererFactory(name="0 - Structure avec justificatif et compte bancaire")
bank_account = finance_factories.BankAccountFactory(offerer=offerer)
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
venue = offerers_factories.VenueFactory(
name="Lieu avec justificatif",
managingOfferer=offerer,
Expand Down Expand Up @@ -212,7 +211,6 @@ def create_specific_cashflow_batch_without_invoice() -> None:
logger.info("create_specific_cashflow_batch_without_invoice")
offerer = offerers_factories.OffererFactory(name="0 - Structure avec justificatif copié")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
offerers_factories.UserOffererFactory(offerer=offerer, user__email="[email protected]")
venue = offerers_factories.VenueFactory(
name="Lieu avec justificatif copié",
managingOfferer=offerer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def create_industrial_pro_users(offerers_by_name: dict) -> dict[str, User]:
users_by_name["pro retention"] = pro_retention
users_by_name["pro retention structures"] = pro_retention_structures
users_by_name["pro pro adage eligible"] = pro_adage_eligible
pro_new_nav_state = users_factories.ProFactory(email="activation_new_nav@example.com")
eac_new_nav_state = users_factories.ProFactory(email="eac_2_lieu_new_nav@example.com")
pro_new_nav_state = users_factories.ProFactory(email="activation@example.com")
eac_new_nav_state = users_factories.ProFactory(email="eac_2_lieu@example.com")

repository.save(*users_by_name.values(), pro_new_nav_state, eac_new_nav_state)

Expand Down
4 changes: 2 additions & 2 deletions pro/cypress/e2e/step-definitions/commonSteps.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Given('I am logged in with account 1', () => {

Given('I am logged in with account 2', () => {
cy.login({
email: 'activation_new_nav@example.com',
email: 'activation@example.com',
password: 'user@AZERTY123',
})
cy.findAllByTestId('spinner').should('not.exist')
})

Given('I am logged in with account 2 and no cookie selection', () => {
cy.login({
email: 'activation_new_nav@example.com',
email: 'activation@example.com',
password: 'user@AZERTY123',
refusePopupCookies: false,
})
Expand Down

0 comments on commit 6df1c02

Please sign in to comment.