+
+ Please don't ignore this 1-minute read. This {{ currentDayName }}, {{ currentDate }}, I ask you to reflect + on the number of times you visited Wikipedia in the past year, the value you got from it, and whether you're + able to give €5 back. +
+
+ If you can, please join the 1% of readers who give.
+
+ Wikipedia is different. It's not perfect, but it's not here to make a profit or to push a particular perspective. + It's written by everyone, together. Wikipedia is something we all share, like a library or a public park. +
++ We are passionate about our model because we want everyone to have equal access to quality information + - something that is becoming harder and harder to find online. If Wikipedia has given you €5 worth of + knowledge this year, please give back. There are no small contributions: every edit counts, every donation + counts. Thank you. +
+
+
+ Please don't ignore this 1-minute read. This {{ currentDayName }}, {{ currentDate }}, I ask you to reflect + on the number of times you visited Wikipedia in the past year, the value you got from it, and whether you're able to give €5 back. +
+
+ If you can, please join the 1% of readers who give.
+
+ We want everyone to have equal access to high-quality information – something that is hard to find online. + If Wikipedia has given you €5 worth of knowledge this year, please give back. There are no small contributions: + every edit counts, every donation counts. Thank you. +
+
Please don't ignore this 1-minute read. This {{ currentDayName }}, {{ currentDate }}, I ask you to
reflect on the number of times you visited Wikipedia in the past year, the value you got from it,
- and whether you're able to give 5€ back. If you can, please join the 1% of readers who
- give.
@@ -21,7 +21,7 @@
- If Wikipedia has given you 5€ worth of knowledge this year, please give back. There are no small + If Wikipedia has given you €5 worth of knowledge this year, please give back. There are no small contributions: every edit counts, every donation counts. Thank you.
diff --git a/banners/english/content/BannerTextVar.vue b/banners/english/content/BannerTextVar.vue new file mode 100644 index 000000000..fedbfbe0b --- /dev/null +++ b/banners/english/content/BannerTextVar.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/banners/english/styles/styles_var.scss b/banners/english/styles/styles_var.scss new file mode 100644 index 000000000..610011a9d --- /dev/null +++ b/banners/english/styles/styles_var.scss @@ -0,0 +1,31 @@ +// This is the file where we import the theme-specific component styles +@use 'src/themes/Treedip/variables/breakpoints'; +@use 'src/components/BannerConductor/banner-transition'; +@use 'Banner'; +@use 'MainBanner' with ( + $banner-height: 355px, + $form-width: 300px +); +@use 'src/themes/UseOfFunds/UseOfFunds'; +@use 'src/themes/Treedip/defaults'; +@use 'src/themes/Treedip/ButtonClose/ButtonClose'; +@use 'src/themes/Treedip/ProgressBar/ProgressBar' with ( + $progress-bar-margin: 0 15px +); +@use 'src/themes/Treedip/DonationForm/DonationForm'; +@use 'src/themes/Treedip/DonationForm/MultiStepDonation'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectGroup'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectGroupRadios'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SelectCustomAmountRadio'; +@use 'src/themes/Treedip/DonationForm/SubComponents/SmsBox'; +@use 'src/themes/Treedip/DonationForm/Forms/MainDonationForm'; +@use 'src/themes/Treedip/DonationForm/Forms/UpgradeToYearlyForm'; +@use 'src/themes/Treedip/DonationForm/Forms/CustomAmountForm'; +@use 'src/themes/Treedip/Footer/BannerFooter' with ( + $right-column-width: 300px +); +@use 'src/themes/Treedip/Footer/SelectionInput'; +@use 'src/themes/Treedip/Message/Message'; +@use 'src/themes/Treedip/Slider/KeenSlider'; +@use 'src/themes/Treedip/SoftClose/SoftClose'; +@use 'src/themes/Treedip/AlreadyDonatedModal/AlreadyDonatedModal'; diff --git a/campaign_info.toml b/campaign_info.toml index 8a577fcd8..fab51ea00 100644 --- a/campaign_info.toml +++ b/campaign_info.toml @@ -132,9 +132,9 @@ tracking = "wpde-mob01-231030-var" [english] name = "English Desktop" icon = "desktop" -campaign = "C23_WMDE_Desktop_EN_02_2" +campaign = "C23_WMDE_Desktop_EN_03" description = "VAR has the WMF text" -campaign_tracking = "en02-2-ba-231107" +campaign_tracking = "en03-ba-231120" preview_link = "/wiki/Main_Page?devbanner={{banner}}&banner=B22_WMDE_local_prototype" preview_url = 'https://en.wikipedia.org/wiki/Main_Page?banner={{banner}}&devMode' wrapper_template = "wikipedia_org" @@ -142,13 +142,13 @@ use_of_funds_source = "MediaWiki:WMDE_Fundraising/UseOfFunds_2023_EN" [english.banners.ctrl] filename = "./banners/english/banner_ctrl.ts" -pagename = "B23_WMDE_Desktop_EN_02_2_ctrl" -tracking = "org-en02-2-231107-ctrl" +pagename = "B23_WMDE_Desktop_EN_03_ctrl" +tracking = "org-en03-231120-ctrl" [english.banners.var] filename = "./banners/english/banner_var.ts" -pagename = "B23_WMDE_Desktop_EN_02_2_var" -tracking = "org-en02-2-231107-var" +pagename = "B23_WMDE_Desktop_EN_03_var" +tracking = "org-en03-231120-var" [english.test_matrix] platform = ["edge", "firefox_win10", "chrome_win10", "safari", "firefox_macos", "chrome_macos", "firefox_linux", "chrome_linux"] diff --git a/test/banners/english/components/BannerCtrl.spec.ts b/test/banners/english/components/BannerCtrl.spec.ts index 2b69cc7d6..8849bbea9 100644 --- a/test/banners/english/components/BannerCtrl.spec.ts +++ b/test/banners/english/components/BannerCtrl.spec.ts @@ -8,7 +8,11 @@ import { formItems } from '@test/banners/formItems'; import { CurrencyEn } from '@src/utils/DynamicContent/formatters/CurrencyEn'; import { softCloseFeatures } from '@test/features/SoftCloseDesktop'; import { useOfFundsFeatures } from '@test/features/UseOfFunds'; -import { bannerContentDisplaySwitchFeatures, bannerContentFeatures } from '@test/features/BannerContent'; +import { + bannerContentAnimatedTextFeatures, + bannerContentDisplaySwitchFeatures, + bannerContentFeatures +} from '@test/features/BannerContent'; import { TrackerStub } from '@test/fixtures/TrackerStub'; import { donationFormFeatures } from '@test/features/forms/MainDonation_UpgradeToYearlyLink'; import { useFormModel } from '@src/components/composables/useFormModel'; @@ -75,6 +79,13 @@ describe( 'BannerCtrl.vue', () => { ] )( '%s', async ( testName: string ) => { await bannerContentDisplaySwitchFeatures[ testName ]( getWrapper, 1300 ); } ); + + test.each( [ + [ 'expectShowsAnimatedVisitorsVsDonorsSentenceInMessage' ], + [ 'expectShowsAnimatedVisitorsVsDonorsSentenceInSlideShow' ] + ] )( '%s', async ( testName: string ) => { + await bannerContentAnimatedTextFeatures[ testName ]( getWrapper ); + } ); } ); describe( 'Donation Form Happy Paths', () => { @@ -99,7 +110,9 @@ describe( 'BannerCtrl.vue', () => { [ 'expectEmitsSoftCloseMaybeLaterEvent' ], [ 'expectEmitsSoftCloseTimeOutEvent' ], [ 'expectEmitsBannerContentChangedOnSoftClose' ], - [ 'expectDoesNotShowSoftCloseOnFinalBannerImpression' ] + [ 'expectDoesNotShowSoftCloseOnFinalBannerImpression' ], + [ 'expectShowsCloseIcon' ], + [ 'expectCloseIconEmitsCloseEvent' ] ] )( '%s', async ( testName: string ) => { await softCloseFeatures[ testName ]( getWrapper() ); } ); diff --git a/test/banners/english/components/BannerVar.spec.ts b/test/banners/english/components/BannerVar.spec.ts new file mode 100644 index 000000000..9aaf28188 --- /dev/null +++ b/test/banners/english/components/BannerVar.spec.ts @@ -0,0 +1,130 @@ +import { afterEach, beforeEach, describe, test, vi } from 'vitest'; +import { mount, VueWrapper } from '@vue/test-utils'; +import Banner from '../../../../banners/english/components/BannerVar.vue'; +import { BannerStates } from '@src/components/BannerConductor/StateMachine/BannerStates'; +import { newDynamicContent } from '@test/banners/dynamicCampaignContent'; +import { useOfFundsContent } from '@test/banners/useOfFundsContent'; +import { formItems } from '@test/banners/formItems'; +import { CurrencyEn } from '@src/utils/DynamicContent/formatters/CurrencyEn'; +import { softCloseFeatures } from '@test/features/SoftCloseDesktop'; +import { useOfFundsFeatures } from '@test/features/UseOfFunds'; +import { + bannerContentAnimatedTextFeatures, + bannerContentDisplaySwitchFeatures, + bannerContentFeatures +} from '@test/features/BannerContent'; +import { TrackerStub } from '@test/fixtures/TrackerStub'; +import { donationFormFeatures } from '@test/features/forms/MainDonation_UpgradeToYearlyLink'; +import { useFormModel } from '@src/components/composables/useFormModel'; +import { resetFormModel } from '@test/resetFormModel'; +import { bannerMainFeatures } from '@test/features/MainBanner'; + +const formModel = useFormModel(); +const translator = ( key: string ): string => key; + +describe( 'BannerVar.vue', () => { + + beforeEach( () => { + resetFormModel( formModel ); + vi.useFakeTimers(); + } ); + + afterEach( () => { + vi.restoreAllMocks(); + vi.useRealTimers(); + } ); + + const getWrapper = (): VueWrapper