it.each() on onboarding tests

This commit is contained in:
Rodel Calasagsag 2021-07-01 14:25:43 +08:00
parent 7934c9505b
commit c0b33e4909
2 changed files with 16 additions and 10 deletions

View File

@ -37,11 +37,14 @@ const runOnboardingFlowTest = () => {
await withRestApi.deleteAllShippingZones();
});
it('can reset to default settings', async () => {
await withRestApi.resetSettingsGroupToDefault('general');
await withRestApi.resetSettingsGroupToDefault('products');
await withRestApi.resetSettingsGroupToDefault('tax');
});
it.each(['general', 'products', 'tax'])(
'can reset to default settings',
async (settingsGroup) => {
await withRestApi.resetSettingsGroupToDefault(
settingsGroup
);
}
);
}
it('can start and complete onboarding when visiting the site for the first time.', async () => {

View File

@ -33,11 +33,14 @@ const runOnboardingFlowTest = () => {
await withRestApi.deleteAllShippingZones();
});
it('can reset to default settings', async () => {
await withRestApi.resetSettingsGroupToDefault('general');
await withRestApi.resetSettingsGroupToDefault('products');
await withRestApi.resetSettingsGroupToDefault('tax');
});
it.each(['general', 'products', 'tax'])(
'can reset to default settings',
async (settingsGroup) => {
await withRestApi.resetSettingsGroupToDefault(
settingsGroup
);
}
);
}
it('can start and complete onboarding when visiting the site for the first time.', async () => {