Web:Tests: close process when tests done

This commit is contained in:
Timofey Boyko 2021-12-22 18:45:53 +08:00
parent 868332bb83
commit b63d7d02f4
2 changed files with 15 additions and 15 deletions

View File

@ -7,17 +7,17 @@ const cultures = config.web.cultures.split(',');
const isModel = !!process.env.MODEL;
const featureName = isModel ? `Files translation(model) ` : `Files translation tests`;
Feature(featureName, { timeout: 90 });
for (const culture of cultures) {
const featureName = isModel ? `Files translation(model) ${culture}` : `${culture}`;
Feature(featureName);
Before(async ({ I }) => {
I.mockData();
changeCulture(culture);
});
Scenario(`Main page tests ${culture}`, ({ I }) => {
Scenario(`Main page test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.mainPage.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.root, 'empty');
@ -41,7 +41,7 @@ for (const culture of cultures) {
});
});
Scenario(`Profile menu tests ${culture}`, ({ I }) => {
Scenario(`Profile menu test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.profileMenu.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.root, 'empty');
@ -66,7 +66,7 @@ for (const culture of cultures) {
});
});
Scenario(`Main button tests ${culture}`, ({ I }) => {
Scenario(`Main button test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.mainButton.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.root, 'empty');
@ -93,7 +93,7 @@ for (const culture of cultures) {
});
});
Scenario(`Table settings tests ${culture}`, ({ I }) => {
Scenario(`Table settings test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.tableSettings.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.root, 'empty');

View File

@ -7,17 +7,17 @@ const cultures = config.web.cultures.split(',');
const isModel = !!process.env.MODEL;
const featureName = isModel ? `People translation(model) ` : `People translation tests`;
Feature(featureName, { timeout: 90 });
for (const culture of cultures) {
const featureName = isModel ? `People translation(model)` : `${culture}`;
Feature(featureName);
Before(async ({ I }) => {
I.mockData();
changeCulture(culture);
});
Scenario(`Main page tests ${culture}`, ({ I }) => {
Scenario(`Main page test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.mainPage.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.filter, 'many');
@ -38,7 +38,7 @@ for (const culture of cultures) {
});
});
Scenario(`Main button tests ${culture}`, ({ I }) => {
Scenario(`Main button test ${culture}`, { timeout: 30 }, ({ I }) => {
const isExсeption = ignoringCultures.mainButton.indexOf(culture) != -1;
I.mockEndpoint(Endpoints.filter, 'many');
@ -64,7 +64,7 @@ for (const culture of cultures) {
});
});
Scenario(`Table settings tests ${culture}`, async ({ I }) => {
Scenario(`Table settings test ${culture}`, { timeout: 30 }, async ({ I }) => {
const isExсeption = ignoringCultures.tableSettings.indexOf(culture) != -1;
await I.mockEndpoint(Endpoints.filter, 'many');