insomnia/packages/insomnia-smoke-test/modules/onboarding.js
Opender Singh a7784d4160
Fix & add smoke tests (#3136)
* chore: refactor

* chore: fix one test

* chore: fix all tests

* chore: fix all existing tests

* chore: add prompting tests

* chore: ignore flaky test for now
2021-03-04 09:00:56 +13:00

27 lines
671 B
JavaScript

const analyticsMessageShown = async app => {
await app.client.waitUntilTextExists(
'.onboarding__content__body p strong',
'Share Usage Analytics with Kong Inc',
);
};
const clickDontShare = async app => {
await app.client
.$('.onboarding__content__body')
.then(e => e.$(`button=Don't share usage analytics`))
.then(e => e.click());
};
const clickSkipImport = async app => {
await app.client
.$('.onboarding__content__body')
.then(e => e.$(`button=Skip`))
.then(e => e.click());
};
export const skipOnboardingFlow = async app => {
await analyticsMessageShown(app);
await clickDontShare(app);
await clickSkipImport(app);
};