Skip to content

Commit

Permalink
Add spaces in test
Browse files Browse the repository at this point in the history
  • Loading branch information
boubkerbribri committed Dec 31, 2019
1 parent f79497a commit f30623f
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -101,13 +101,15 @@ describe('Create different products and delete them from monitoring page', async
},
},
];

tests.forEach((test) => {
describe(`Create product ${test.args.productType} in BO`, async () => {
it('should go to catalog > products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);

await this.pageObjects.boBasePage.closeSfToolBar();
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
await expect(pageTitle).to.contains(this.pageObjects.productsPage.pageTitle);
Expand All @@ -124,6 +126,7 @@ describe('Create different products and delete them from monitoring page', async
test.args.productToCreate,
test.args.enabled,
);

await expect(createProductMessage).to.equal(this.pageObjects.addProductPage.settingUpdatedMessage);
});
});
Expand All @@ -134,11 +137,14 @@ describe('Create different products and delete them from monitoring page', async
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.monitoringLink,
);

const pageTitle = await this.pageObjects.monitoringPage.getPageTitle();
await expect(pageTitle).to.contains(this.pageObjects.monitoringPage.pageTitle);

numberOfProductsIngrid = await this.pageObjects.monitoringPage.resetAndGetNumberOfLines(
test.args.gridName,
);

await expect(numberOfProductsIngrid).to.be.at.least(1);
});

Expand All @@ -149,11 +155,13 @@ describe('Create different products and delete them from monitoring page', async
'name',
test.args.productToCreate.name,
);

const textColumn = await this.pageObjects.monitoringPage.getTextColumnFromTable(
test.args.gridName,
1,
'name',
);

await expect(textColumn).to.contains(test.args.productToCreate.name);
});

Expand All @@ -171,11 +179,13 @@ describe('Create different products and delete them from monitoring page', async
'name',
test.args.productToCreate.name,
);

const textColumn = await this.pageObjects.monitoringPage.getTextColumnFromTable(
test.args.gridName,
1,
'name',
);

await expect(textColumn).to.contains(test.args.productToCreate.name);
});

Expand Down

0 comments on commit f30623f

Please sign in to comment.