2021-03-03 20:00:56 +00:00
|
|
|
const analyticsMessageShown = async app => {
|
2020-08-24 22:49:29 +00:00
|
|
|
await app.client.waitUntilTextExists(
|
2021-02-25 20:39:59 +00:00
|
|
|
'.onboarding__content__body p strong',
|
|
|
|
'Share Usage Analytics with Kong Inc',
|
2020-08-24 22:49:29 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2021-03-03 20:00:56 +00:00
|
|
|
const clickDontShare = async app => {
|
2020-08-24 22:49:29 +00:00
|
|
|
await app.client
|
|
|
|
.$('.onboarding__content__body')
|
2021-05-19 11:49:48 +00:00
|
|
|
.then(e => e.$('button=Don\'t share usage analytics'))
|
2020-08-24 22:49:29 +00:00
|
|
|
.then(e => e.click());
|
|
|
|
};
|
|
|
|
|
2021-03-03 20:00:56 +00:00
|
|
|
const clickSkipImport = async app => {
|
2020-08-24 22:49:29 +00:00
|
|
|
await app.client
|
|
|
|
.$('.onboarding__content__body')
|
2021-05-19 11:49:48 +00:00
|
|
|
.then(e => e.$('button=Skip'))
|
2020-08-24 22:49:29 +00:00
|
|
|
.then(e => e.click());
|
|
|
|
};
|
2021-03-03 20:00:56 +00:00
|
|
|
|
|
|
|
export const skipOnboardingFlow = async app => {
|
|
|
|
await analyticsMessageShown(app);
|
|
|
|
await clickDontShare(app);
|
|
|
|
await clickSkipImport(app);
|
|
|
|
};
|