Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests - Update name of catalog Menu link in BO #16156

Merged
merged 1 commit into from Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -39,7 +39,7 @@ describe('Filter And Quick Edit Categories', async () => {
loginCommon.loginBO();
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
await this.pageObjects.boBasePage.closeSfToolBar();
Expand Down
Expand Up @@ -51,7 +51,7 @@ describe('Create, Read, Update and Delete Category', async () => {
loginCommon.loginBO();
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
await this.pageObjects.boBasePage.closeSfToolBar();
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('Create, Read, Update and Delete Category', async () => {
describe('View Category Created', async () => {
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
const pageTitle = await this.pageObjects.categoriesPage.getPageTitle();
Expand Down Expand Up @@ -209,7 +209,7 @@ describe('Create, Read, Update and Delete Category', async () => {
describe('Update Category created', async () => {
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
const pageTitle = await this.pageObjects.categoriesPage.getPageTitle();
Expand Down Expand Up @@ -274,7 +274,7 @@ describe('Create, Read, Update and Delete Category', async () => {
describe('Delete Category', async () => {
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
const pageTitle = await this.pageObjects.categoriesPage.getPageTitle();
Expand Down
Expand Up @@ -45,7 +45,7 @@ describe('Create Categories, Then disable / Enable and Delete with Bulk actions'
loginCommon.loginBO();
it('should go to "Catalog>Categories" page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.categoriesLink,
);
await this.pageObjects.boBasePage.closeSfToolBar();
Expand Down
Expand Up @@ -41,7 +41,7 @@ describe('Filter in Products Page', async () => {
loginCommon.loginBO();
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
Expand Down
Expand Up @@ -50,7 +50,7 @@ describe('Create, read, update and delete Standard product in BO', async () => {
loginCommon.loginBO();
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);
await this.pageObjects.boBasePage.closeSfToolBar();
Expand Down
Expand Up @@ -50,7 +50,7 @@ describe('Create, read, update and delete Standard product with combinations in
loginCommon.loginBO();
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);
await this.pageObjects.boBasePage.closeSfToolBar();
Expand Down
Expand Up @@ -46,7 +46,7 @@ describe('Create Standard product in BO and Delete it with DropDown Menu', async
loginCommon.loginBO();
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
Expand All @@ -66,7 +66,7 @@ describe('Create Standard product in BO and Delete it with DropDown Menu', async
await expect(createProductMessage).to.equal(this.pageObjects.addProductPage.settingUpdatedMessage);
});
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.productsParentLink,
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
await expect(pageTitle).to.contains(this.pageObjects.productsPage.pageTitle);
Expand Down
Expand Up @@ -51,7 +51,7 @@ describe('Create Standard product in BO and Delete it with Bulk Actions', async
loginCommon.loginBO();
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(
this.pageObjects.boBasePage.productsParentLink,
this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink,
);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
Expand All @@ -71,7 +71,7 @@ describe('Create Standard product in BO and Delete it with Bulk Actions', async
await expect(createProductMessage).to.equal(this.pageObjects.addProductPage.settingUpdatedMessage);
});
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.productsParentLink,
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
await expect(pageTitle).to.contains(this.pageObjects.productsPage.pageTitle);
Expand All @@ -82,7 +82,7 @@ describe('Create Standard product in BO and Delete it with Bulk Actions', async
await expect(createProductMessage).to.equal(this.pageObjects.addProductPage.settingUpdatedMessage);
});
it('should go to Products page', async function () {
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.productsParentLink,
await this.pageObjects.boBasePage.goToSubMenu(this.pageObjects.boBasePage.catalogParentLink,
this.pageObjects.boBasePage.productsLink);
const pageTitle = await this.pageObjects.productsPage.getPageTitle();
await expect(pageTitle).to.contains(this.pageObjects.productsPage.pageTitle);
Expand Down
7 changes: 5 additions & 2 deletions tests/puppeteer/pages/BO/BObasePage.js
Expand Up @@ -25,11 +25,14 @@ module.exports = class BOBasePage extends CommonPage {
this.ordersParentLink = 'li#subtab-AdminParentOrders';
this.ordersLink = '#subtab-AdminOrders';

this.productsParentLink = 'li#subtab-AdminCatalog';
// Catalog
this.catalogParentLink = 'li#subtab-AdminCatalog';
// Products
this.productsLink = '#subtab-AdminProducts';

// Categories
this.categoriesLink = '#subtab-AdminCategories';

// Customers
this.customersParentLink = 'li#subtab-AdminParentCustomer';
this.customersLink = '#subtab-AdminCustomers';

Expand Down