Skip to content

Commit e199f79

Browse files
author
sgauruseu
committed
update failed ui-tests issue #8821
1 parent 852c27e commit e199f79

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

testing/libs/app_const.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ module.exports = Object.freeze({
208208
CONTROLLER_NAME: {
209209
DEFAULT: 'default',
210210
MAIN_REGION: 'main region',
211+
APP_CONTENT_TYPES_PAGE: 'Page',
211212
},
212213
LAYOUT_NAME: {
213214
COL_3: '3-col',
@@ -221,7 +222,7 @@ module.exports = Object.freeze({
221222
},
222223
PART_NAME: {
223224
CITY_CREATION: 'City Creation',
224-
CITIES_LIST: 'Cities List',
225+
CONTENT_TYPES_CITIES_DISTANCE_FACET: 'Cities Distance Facet',
225226
PART_WITH_ERROR: 'part-with-error',
226227
},
227228
PCV_MENU_ITEM: {
@@ -232,7 +233,7 @@ module.exports = Object.freeze({
232233
SELECT_PARENT: 'Select parent',
233234
RESET: 'Reset',
234235
INSPECT: 'Inspect',
235-
FRAGMENT:'Fragment',
236+
FRAGMENT: 'Fragment',
236237
DUPLICATE: 'Duplicate',
237238
LAYOUT: 'Layout',
238239
},
@@ -344,7 +345,7 @@ module.exports = Object.freeze({
344345
IMG_SELECTOR_0_0: 'imageselector0_0',
345346
IMG_SELECTOR_0_1: 'imageselector0_1',
346347
IMG_SELECTOR_1_1: 'imageselector1_1',
347-
IMG_SEL_TOGGLE_HIDDEN:'image-sel-toggle-hidden',
348+
IMG_SEL_TOGGLE_HIDDEN: 'image-sel-toggle-hidden',
348349
IMG_SELECTOR_2_4: 'imageselector2_4',
349350
DOUBLE_MIN_MAX: 'double_max',
350351
DOUBLE_DEFAULT_2_4: 'double2_4_def',

testing/specs/call.app.controller.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Call the `Application controller` specification', function () {
1515
it(`GIVEN application with page controller is installed WHEN getting the URL that ending without slash THEN expected header should be loaded`,
1616
async () => {
1717
let page = new Page();
18-
await studioUtils.getBrowser().url("http://127.0.0.1:8080/webapp/com.enonic.xp.ui_testing.contenttypes");
18+
await studioUtils.getBrowser().url("http://127.0.0.1:8080/webapp/com.enonic.uitest.contenttypes");
1919
await studioUtils.saveScreenshot("app_controller_test1");
2020
//Expected header should be loaded:
2121
await page.waitForElementDisplayed("//h1[text()='My controller test page']", appConst.mediumTimeout);
@@ -25,7 +25,7 @@ describe('Call the `Application controller` specification', function () {
2525
it(`GIVEN application with page controller is installed WHEN getting the URL that ending with slash THEN expected header should be loaded`,
2626
async () => {
2727
let page = new Page();
28-
await studioUtils.getBrowser().url("http://127.0.0.1:8080/webapp/com.enonic.xp.ui_testing.contenttypes/");
28+
await studioUtils.getBrowser().url("http://127.0.0.1:8080/webapp/com.enonic.uitest.contenttypes/");
2929
await studioUtils.saveScreenshot("app_controller_test2");
3030
await page.waitForElementDisplayed("//h1[text()='My controller test page']", appConst.mediumTimeout);
3131
});

testing/specs/page-editor/insert.part.in.layout.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ describe('insert.part.in.layout.spec - test for parts in a layout', function ()
4646
// 3. Insert the first part(valid):
4747
await pageComponentsWizardStepForm.openMenu(appConst.LAYOUT_REGION.LEFT);
4848
await pageComponentsWizardStepForm.selectMenuItem(['Insert', 'Part']);
49-
await liveFormPanel.selectPartByDisplayName(appConst.PART_NAME.CITIES_LIST);
49+
await liveFormPanel.selectPartByDisplayName(appConst.PART_NAME.CONTENT_TYPES_CITIES_DISTANCE_FACET);
5050
// 4. Click on the part in LiveView:
51-
await liveFormPanel.clickOnPartComponentByName(appConst.PART_NAME.CITIES_LIST);
51+
await liveFormPanel.clickOnPartComponentByName('Cities distances');
5252
await liveFormPanel.pause(1000);
53-
await liveFormPanel.clickOnPartComponentByName(appConst.PART_NAME.CITIES_LIST);
53+
await liveFormPanel.clickOnPartComponentByName('Cities distances');
5454
await liveFormPanel.pause(1000);
5555
await studioUtils.saveScreenshot('part_clicked_valid');
5656
await liveFormPanel.switchToParentFrame();
5757
// 5. Verify that red icon is not displayed in the PCV:
58-
let isInvalid = await pageComponentsWizardStepForm.isComponentItemInvalid(appConst.PART_NAME.CITIES_LIST);
58+
let isInvalid = await pageComponentsWizardStepForm.isComponentItemInvalid(appConst.PART_NAME.CONTENT_TYPES_CITIES_DISTANCE_FACET);
5959
assert.ok(isInvalid === false, 'The part should be valid');
6060
// 6. Insert the second part(invalid):
6161
await pageComponentsWizardStepForm.openMenu(appConst.LAYOUT_REGION.CENTER);

testing/specs/page-editor/null.layout.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('null.layout.spec - test for layout-controller that returns null ', fun
2626
it(`Preconditions: new site should be created`,
2727
async () => {
2828
let displayName = contentBuilder.generateRandomName('site');
29-
SITE = contentBuilder.buildSite(displayName, 'description', [appConst.TEST_APPS_NAME.APP_CONTENT_TYPES], CONTROLLER_NAME);
29+
SITE = contentBuilder.buildSite(displayName, 'description', [appConst.TEST_APPS_NAME.APP_CONTENT_TYPES, appConst.TEST_APPS_NAME.MY_FIRST_APP], CONTROLLER_NAME);
3030
await studioUtils.doAddSite(SITE);
3131
});
3232

@@ -67,9 +67,9 @@ describe('null.layout.spec - test for layout-controller that returns null ', fun
6767
// 3. Insert a part with config:
6868
await pageComponentView.openMenu('main');
6969
await pageComponentView.selectMenuItem(['Insert', 'Part']);
70-
await liveFormPanel.selectPartByDisplayName('Cities List');
70+
await liveFormPanel.selectPartByDisplayName('City list');
7171
await contentWizard.switchToMainFrame();
72-
await pageComponentView.openMenu('Cities List');
72+
await pageComponentView.openMenu('City list');
7373
// 4. Click on 'Save as Fragment' menu item. (Save the part as fragment)
7474
await pageComponentView.clickOnMenuItem(appConst.COMPONENT_VIEW_MENU_ITEMS.SAVE_AS_FRAGMENT);
7575
await contentWizard.waitForNotificationMessage();

0 commit comments

Comments
 (0)