-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare camapign for C23_WMDE_Desktop_04
- text changes in both banners - based on desktop DE 03 - custom amount form page is removed from both banners, link leads back to mainpage - fix feature tests https://phabricator.wikimedia.org/T344423
- Loading branch information
Showing
11 changed files
with
161 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<KeenSliderSlide :is-current="currentSlide === 0"> | ||
<p class="headline"> | ||
<InfoIcon fill="#990a00"/> <strong> An alle, die Wikipedia in Deutschland nutzen </strong> | ||
</p> | ||
<p> | ||
Vielleicht kommen wir gerade ungelegen, aber dennoch: Klicken Sie jetzt bitte nicht weg! | ||
Am heutigen {{ currentDayName }}, den {{ currentDate }}, bitten wir Sie bescheiden, die Unabhängigkeit von Wikipedia zu unterstützen. | ||
</p> | ||
</KeenSliderSlide> | ||
<KeenSliderSlide :is-current="currentSlide === 1"> | ||
<p> | ||
<span class="wmde-banner-text-animated-highlight">Millionen Menschen nutzen Wikipedia, aber 99 % spenden | ||
nicht – sie übergehen diesen Aufruf.</span> | ||
Die meisten Menschen spenden, weil sie Wikipedia nützlich finden. | ||
</p> | ||
</KeenSliderSlide> | ||
<KeenSliderSlide :is-current="currentSlide === 2"> | ||
<p> | ||
Die durchschnittliche Spende beträgt 22,25 €, doch bereits 5 € helfen uns weiter. Hat Wikipedia Ihnen in | ||
diesem Jahr Wissen im Wert einer Tasse Kaffee geschenkt? | ||
</p> | ||
</KeenSliderSlide> | ||
<KeenSliderSlide :is-current="currentSlide === 3"> | ||
<p> | ||
Dann entscheiden Sie sich, eine der seltenen Ausnahmen zu sein, und geben Sie etwas zurück. Vielen Dank! | ||
</p> | ||
</KeenSliderSlide> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent'; | ||
import { computed, inject } from 'vue'; | ||
import InfoIcon from '@src/components/Icons/InfoIcon.vue'; | ||
import KeenSliderSlide from '@src/components/Slider/KeenSliderSlide.vue'; | ||
interface Props { | ||
currentSlide: number | ||
} | ||
defineProps<Props>(); | ||
const { currentDayName }: DynamicContent = inject( 'dynamicCampaignText' ); | ||
const currentDate = computed( () => { | ||
return new Intl.DateTimeFormat( 'de-DE', { | ||
day: '2-digit', | ||
month: 'long' | ||
} ).format( new Date() ); | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div class="wmde-banner-message"> | ||
<div> | ||
<p> | ||
<InfoIcon fill="#990a00"/> | ||
<strong> An alle, die Wikipedia in Deutschland nutzen </strong> | ||
</p> | ||
<p> | ||
Vielleicht kommen wir gerade ungelegen, aber dennoch: Klicken Sie jetzt bitte nicht weg! Am | ||
heutigen {{ currentDayName }}, den {{ currentDate }}, bitten wir Sie bescheiden, die Unabhängigkeit von Wikipedia zu | ||
unterstützen. <span class="wmde-banner-text-animated-highlight">Millionen Menschen nutzen Wikipedia, | ||
aber 99 % spenden nicht – sie übergehen diesen Aufruf.</span> Die meisten Menschen spenden, weil sie | ||
Wikipedia nützlich finden. Die durchschnittliche Spende beträgt 22,25 €, doch bereits 5 € helfen uns | ||
weiter. Hat Wikipedia Ihnen in diesem Jahr Wissen im Wert einer Tasse Kaffee geschenkt? Dann entscheiden | ||
Sie sich, eine der seltenen Ausnahmen zu sein, und geben Sie etwas zurück. Vielen Dank! | ||
</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, inject } from 'vue'; | ||
import { DynamicContent } from '@src/utils/DynamicContent/DynamicContent'; | ||
import InfoIcon from '@src/components/Icons/InfoIcon.vue'; | ||
const { currentDayName }: DynamicContent = inject( 'dynamicCampaignText' ); | ||
const currentDate = computed( () => { | ||
return new Intl.DateTimeFormat( 'de-DE', { | ||
day: '2-digit', | ||
month: 'long' | ||
} ).format( new Date() ); | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { VueWrapper } from '@vue/test-utils'; | ||
import { | ||
expectMainDonationFormGoesToPageOnSubmit, | ||
expectMainDonationFormSubmits, | ||
submitMainDonationForm | ||
} from '@test/features/forms/subForms/MainDonationForm'; | ||
import { | ||
expectUpgradeToYearlyFormGoesToPageOnLinkClick, | ||
expectUpgradeToYearlyFormSubmits | ||
} from '@test/features/forms/subForms/UpgradeToYearlyForm'; | ||
import { Intervals } from '@src/utils/FormItemsBuilder/fields/Intervals'; | ||
import { PaymentMethods } from '@src/utils/FormItemsBuilder/fields/PaymentMethods'; | ||
|
||
enum Pages { | ||
MainDonation = 1, | ||
UpgradeToYearly = 2 | ||
} | ||
|
||
export const donationFormFeatures: Record<string, ( wrapper: VueWrapper<any> ) => Promise<any>> = { | ||
expectMainDonationFormSubmitsWhenSofortIsSelected: ( wrapper: VueWrapper<any> ) => expectMainDonationFormSubmits( | ||
wrapper, | ||
Intervals.ONCE, | ||
PaymentMethods.SOFORT | ||
), | ||
expectMainDonationFormSubmitsWhenYearlyIsSelected: ( wrapper: VueWrapper<any> ) => expectMainDonationFormSubmits( | ||
wrapper, | ||
Intervals.YEARLY, | ||
PaymentMethods.PAYPAL | ||
), | ||
expectMainDonationFormGoesToUpgrade: ( wrapper: VueWrapper<any> ) => expectMainDonationFormGoesToPageOnSubmit( wrapper, | ||
Pages.UpgradeToYearly, | ||
Intervals.ONCE, | ||
PaymentMethods.PAYPAL | ||
), | ||
expectUpgradeToYearlyFormSubmitsUpgrade: async ( wrapper: VueWrapper<any> ) => { | ||
await submitMainDonationForm( wrapper, Intervals.ONCE, '5', PaymentMethods.PAYPAL ); | ||
await expectUpgradeToYearlyFormSubmits( wrapper, 'yes' ); | ||
}, | ||
expectUpgradeToYearlyFormSubmitsDontUpgrade: async ( wrapper: VueWrapper<any> ) => { | ||
await submitMainDonationForm( wrapper, Intervals.ONCE, '5', PaymentMethods.PAYPAL ); | ||
await expectUpgradeToYearlyFormSubmits( wrapper, 'no' ); | ||
}, | ||
expectUpgradeToYearlyFormGoesToMainDonation: async ( wrapper: VueWrapper<any> ) => { | ||
await submitMainDonationForm( wrapper, Intervals.ONCE, '5', PaymentMethods.PAYPAL ); | ||
await expectUpgradeToYearlyFormGoesToPageOnLinkClick( wrapper, Pages.MainDonation ); | ||
} | ||
}; |