qe-fe-automation
Version:
FE test automation framework using cypress
84 lines (70 loc) • 3.17 kB
text/typescript
import { GrowthInterceptApis } from '@growth-lib/api-intercept';
import { LoginSelfSell } from '@support-growth/login-self-sell';
import { SignUp } from '@growth-lib/sign-up';
import { SignupReason } from '@growth-lib/persona';
import { AmplitudeEvents } from '@growth-lib/amplitude-events';
import { FreePricing } from '@growth-lib/free-pricing';
import { PromoBanner } from '@growth-lib/promo-banner';
import { OnboardingGuide } from '@growth-lib/onboarding-guide';
import { GrowthRegistrationUrls } from '@growth-lib/model';
describe('Growth: 250$ promo banner', () => {
let token: string;
beforeEach(() => {
GrowthInterceptApis.interceptApis();
LoginSelfSell.createNewSelfSellLead({
tag: '250-promo-banner-new-signup-fields',
registrationUrl: GrowthRegistrationUrls.marketingHomePage
}).then((login) => {
token = login.token;
});
});
it(
'C13272801: rogue will get the promo banner in sign up, home screen and in pricing page in app',
{ tags: ['@tier1'] },
() => {
SignUp.signupWithSkipAdmin(token, SignupReason.BOOK_TRIP, false);
PromoBanner.verifyBannerAndPopupInHomePage();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
}
);
it('C13272802: t&e admin will get the promo banner in sign up, pricing and home screen', { tags: ['@tier1'] }, () => {
SignUp.signupWithSkipAdminForExperimentalSignUp(token, SignupReason.TRAVEL_AND_EXPENSE_SOLUTION, false);
FreePricing.openAdminClaim();
OnboardingGuide.closeOnboardingGuide();
PromoBanner.verifyBannerAndPopupInHomePage();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
});
it(
'C13272803: travel admin will get the promo banner in sign up, pricing and home screen',
{ tags: ['@tier1'] },
() => {
SignUp.signupWithSkipAdminForExperimentalSignUp(token, SignupReason.TRAVEL_SOLUTION, false);
FreePricing.openAdminClaim();
OnboardingGuide.closeOnboardingGuide();
PromoBanner.verifyBannerAndPopupInHomePage();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
}
);
it('C13272804: bfo will get the promo banner in sign up and in pricing in app', { tags: ['@tier1'] }, () => {
SignUp.signupWithSkipAdminForExperimentalSignUp(token, SignupReason.BOOK_FOR_OTHERS, false);
PromoBanner.BfoClaimAdmin();
PromoBanner.verifyRewardsForBFO();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
});
it(
'C13272805: event organizer will get the promo banner in sign up, pricing and home screen',
{ tags: ['@tier1'] },
() => {
SignUp.signupWithSkipAdminForExperimentalSignUp(token, SignupReason.TEAM_OFFSITE, false);
FreePricing.openAdminClaim();
OnboardingGuide.closeOnboardingGuide();
PromoBanner.verifyBannerAndPopupInHomePage();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
}
);
it('C13489367: t&e admin will get the promo banner in home screen - mobile web', { tags: ['@tier1'] }, () => {
SignUp.signupWithSkipAdminForExperimentalSignUp(token, SignupReason.TRAVEL_AND_EXPENSE_SOLUTION, true);
FreePricing.openAdminClaim();
AmplitudeEvents.expectAmplitudeEventsToBeSent();
});
});