From 01110bcd5280814d4271b5f92b24fea750d82f45 Mon Sep 17 00:00:00 2001 From: Corinna Hillebrand Date: Tue, 17 Sep 2024 13:59:34 +0200 Subject: [PATCH] Rename SinglePageDonationForm back to DonationForm - there is only 1 donation form for the donation page supported currently, so it can keep the basic name https://phabricator.wikimedia.org/T368525 --- .../pages/{SinglePageDonationForm.vue => DonationForm.vue} | 2 +- src/pages/donation_form.ts | 2 +- ...{SinglePageDonationForm.spec.ts => DonationForm.spec.ts} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/components/pages/{SinglePageDonationForm.vue => DonationForm.vue} (98%) rename tests/unit/components/pages/donation_form/single_page_form/{SinglePageDonationForm.spec.ts => DonationForm.spec.ts} (91%) diff --git a/src/components/pages/SinglePageDonationForm.vue b/src/components/pages/DonationForm.vue similarity index 98% rename from src/components/pages/SinglePageDonationForm.vue rename to src/components/pages/DonationForm.vue index 600b008eb..0d9e6a63f 100644 --- a/src/components/pages/SinglePageDonationForm.vue +++ b/src/components/pages/DonationForm.vue @@ -58,7 +58,7 @@ import PersonalDataSectionDonationReceipt from '@src/components/pages/donation_form/singlePageFormSections/PersonalDataSectionDonationReceipt.vue'; defineOptions( { - name: 'SinglePageDonationForm', + name: 'DonationForm', } ); interface Props { diff --git a/src/pages/donation_form.ts b/src/pages/donation_form.ts index f2f9b71ba..086899400 100644 --- a/src/pages/donation_form.ts +++ b/src/pages/donation_form.ts @@ -17,7 +17,7 @@ import { createInitialBankDataValues, createInitialDonationAddressValues, create import { createTrackFormErrorsPlugin } from '@src/store/track_form_errors_plugin'; import App from '@src/components/App.vue'; -import DonationForm from '@src/components/pages/SinglePageDonationForm.vue'; +import DonationForm from '@src/components/pages/DonationForm.vue'; import { ApiCityAutocompleteResource } from '@src/api/CityAutocompleteResource'; import { createFeatureFetcher } from '@src/util/FeatureFetcher'; import { ApiStreetAutocompleteResource } from '@src/api/StreetAutocompleteResource'; diff --git a/tests/unit/components/pages/donation_form/single_page_form/SinglePageDonationForm.spec.ts b/tests/unit/components/pages/donation_form/single_page_form/DonationForm.spec.ts similarity index 91% rename from tests/unit/components/pages/donation_form/single_page_form/SinglePageDonationForm.spec.ts rename to tests/unit/components/pages/donation_form/single_page_form/DonationForm.spec.ts index 7a6f4506b..c7530158c 100644 --- a/tests/unit/components/pages/donation_form/single_page_form/SinglePageDonationForm.spec.ts +++ b/tests/unit/components/pages/donation_form/single_page_form/DonationForm.spec.ts @@ -1,5 +1,5 @@ import { mount, VueWrapper } from '@vue/test-utils'; -import SinglePageDonationForm from '@src/components/pages/SinglePageDonationForm.vue'; +import DonationForm from '@src/components/pages/DonationForm.vue'; import countries from '@src/../tests/data/countries'; import { AddressValidation } from '@src/view_models/Validation'; import { createFeatureToggle } from '@src/util/createFeatureToggle'; @@ -16,14 +16,14 @@ declare global { } } -describe( 'SinglePageDonationForm.vue', () => { +describe( 'DonationForm.vue', () => { beforeEach( () => { global.window.scrollTo = jest.fn(); } ); const getWrapper = ( store: Store = createStore() ): { wrapper: VueWrapper, store: Store } => { - const wrapper = mount( SinglePageDonationForm, { + const wrapper = mount( DonationForm, { props: { assetsPath: '', paymentAmounts: [ 5 ],