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

Fix tests errors in nightly 18-09-20 #21056

Merged
merged 2 commits into from Sep 18, 2020
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
1 change: 1 addition & 0 deletions tests/UI/campaigns/data/faker/store.js
Expand Up @@ -15,6 +15,7 @@ module.exports = class Store {
this.phone = storeToCreate.phone || faker.phone.phoneNumber('01########');
this.fax = storeToCreate.fax || faker.phone.phoneNumber('01########');

this.registrationNumber = storeToCreate.registrationNumber || faker.finance.account();
this.email = storeToCreate.email || faker.internet.email();
this.note = storeToCreate.note || faker.lorem.sentence();

Expand Down
18 changes: 0 additions & 18 deletions tests/UI/campaigns/data/faker/storeContact.js

This file was deleted.

Expand Up @@ -13,7 +13,7 @@ const storesPage = require('@pages/BO/shopParameters/stores');
const foHomePage = require('@pages/FO/home');

// Import data
const StoreContactFaker = require('@data/faker/storeContact');
const StoreFaker = require('@data/faker/store');
const {stores} = require('@data/demo/stores');

// Import test context
Expand All @@ -28,7 +28,7 @@ const {expect} = require('chai');
let browserContext;
let page;

const storesContactToCreate = new StoreContactFaker();
const storesContactToCreate = new StoreFaker();

describe('Configure contact details', async () => {
// before and after functions
Expand Down Expand Up @@ -73,7 +73,7 @@ describe('Configure contact details', async () => {
await testContext.addContextItem(this, 'testIdentifier', 'configureContactDetails', baseContext);

const textResult = await storesPage.setContactDetails(page, storesContactToCreate);
await expect(textResult).to.contains(storesPage.successfulUpdateMessage);
await expect(textResult).to.contains(storesPage.contactFormSuccessfulUpdateMessage);
});

it('should view my shop', async function () {
Expand Down Expand Up @@ -117,6 +117,6 @@ describe('Configure contact details', async () => {
await testContext.addContextItem(this, 'testIdentifier', 'backToDefaultInformation', baseContext);

const textResult = await storesPage.setContactDetails(page, stores.contact);
await expect(textResult).to.contains(storesPage.successfulUpdateMessage);
await expect(textResult).to.contains(storesPage.contactFormSuccessfulUpdateMessage);
});
});
3 changes: 0 additions & 3 deletions tests/UI/pages/BO/design/imageSettings/index.js
Expand Up @@ -179,9 +179,6 @@ class ImageSettings extends BOBasePage {
throw new Error(`Column ${columnName} was not found`);
}

if (columnName === 'width' || columnName === 'height') {
return this.getNumberFromText(page, columnSelector);
}
return this.getTextContent(page, columnSelector);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/UI/pages/BO/shopParameters/stores/index.js
Expand Up @@ -6,7 +6,7 @@ class Stores extends BOBasePage {
super();

this.pageTitle = 'Stores •';
this.successfulUpdateMessage = 'The settings have been successfully updated.';
this.contactFormSuccessfulUpdateMessage = 'The settings have been successfully updated.';

this.alertSuccessBlockParagraph = '.alert-success';

Expand Down