Description
Changes proposed in this Pull Request
Fixes pbNhbs-mt-p2
.
- Add a new
NewYear2021SaleBanner
component to the pricing page header on jetpack.com.
- Conditionally render the sale banner only if the
newpack
query parameter is set or if the browser time is currently between Jan 1 00:00:00 UTC and Jan 18 23:59:59 UTC.
Testing instructions
Same instructions as with the previous PR #47531 (copied and updated here for easy access):
- Checkout this pull request and start Calypso Green.
- In your Calypso Green test environment, visit
<host>/pricing
.
- Verify that no New Year 2021 sale banner is displayed on the page.
- Add
?newpack
to the query string your browser’s address bar and reload the page (ex: http://jetpack.cloud.localhost:3000/pricing?newpack
).
- Verify that the New Year 2021 sale banner is now visible.
- Remove
?newpack
from your browser’s address bar and reload the page. The banner should disappear.
- Change your computer’s system time to any date and time between 2021-01-01 00:00:00 UTC and 2021-01-18 23:59:59 UTC (on Mac: Apple menu > System Preferences > Date & Time).
- Reload the page. Verify that the sale banner re-appears.
- Verify that the banner resizes to fit both mobile and desktop layouts. The mobile banner is more vertically laid out, whereas the desktop banner is wider with a horizontal layout.
- Verify that the following alt text is present on the banner image: “New Year 2021 sale! Save 40% at checkout with code NEWPACK through January 18”
Reference screenshots
Banner not visible
Banner visible
Unfortunately, no screenshots were provided by the developer.