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

Fixing and moving tests design from broken to suite full #13953

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e36e6a9
Moving tests from broken_tests to full
boubkerbribri May 23, 2019
b7ba0ad
update selectors for test design pages
boubkerbribri May 23, 2019
159c95e
Update common scenarios for tests design pages
boubkerbribri May 23, 2019
c486f84
Delete referenced issues (closed)
boubkerbribri May 23, 2019
f4cf0e8
Add welcome module
boubkerbribri May 23, 2019
293d37d
Add scroll before drag and drop
boubkerbribri May 23, 2019
5714dfb
Delete sign in for second time
boubkerbribri May 23, 2019
5be20d4
Update how to select and unselect all element
boubkerbribri May 23, 2019
325aeec
Update scenarios for link widget
boubkerbribri May 24, 2019
7f7e668
Update common scenario for link widget test
boubkerbribri May 24, 2019
1877e14
Delete reference ti issue
boubkerbribri May 24, 2019
64026fd
Moving test from broken_tests to full
boubkerbribri May 24, 2019
b0bd5bd
Remove unused step
boubkerbribri May 24, 2019
d96fdf8
Update step description
boubkerbribri May 24, 2019
20aa1c5
Update steps description
boubkerbribri May 24, 2019
6c7e628
Delete spaces from steps description
boubkerbribri May 24, 2019
bafc873
Refacto to select All Options in Link Widget creation
boubkerbribri Jun 6, 2019
3dbbe13
Merge branch '1.7.6.x' into brokenTest_CategoryPage
boubkerbribri Jun 6, 2019
9bb3e46
Fix merge
boubkerbribri Jun 6, 2019
67e200a
Fix merge for common_client.js
boubkerbribri Jun 6, 2019
85ab7a6
Fix merge Common_client.js
boubkerbribri Jun 6, 2019
a820c35
Fix merge common_client.js
boubkerbribri Jun 6, 2019
3ac8fc8
Fix merge
boubkerbribri Jun 6, 2019
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
36 changes: 24 additions & 12 deletions tests/E2E/test/campaigns/common_scenarios/linkwidget.js
Expand Up @@ -7,29 +7,41 @@ module.exports = {
scenario('Create new "Link Widget" block ', client => {
test('should go to "Design - Link Widget" page', () => client.goToSubtabMenuPage(Menu.Improve.Design.design_menu, Menu.Improve.Design.link_widget_submenu));
test('should click on "New block" button', () => client.waitForExistAndClick(LinkWidget.new_block_button));
test('should set the "Name of the link block"', () => client.waitAndSetValue(LinkWidget.name_of_the_link_block_input, name + " " + date_time));
test('should set the "Name of the link block in english"', () => client.waitAndSetValue(LinkWidget.name_of_the_link_block_input.replace('%lang','1'), name + " " + date_time));
test('should switch input language to french', () => {
return promise
.then(() => client.waitForExistAndClick(LinkWidget.name_of_the_link_block_lang_button))
.then(() => client.waitForVisibleAndClick(LinkWidget.name_of_the_link_block_lang_span.replace('%lang','fr')));
});
test('should set the "Name of the link block in french', () => client.waitAndSetValue(LinkWidget.name_of_the_link_block_input.replace('%lang','2'), name + " " + date_time));
test('should choose the hook "displayFooter"', () => client.waitAndSelectByVisibleText(LinkWidget.hook_select, hook));
test('should select All the "content pages"', () => client.waitForExistAndClick(LinkWidget.select_all_content_page));
test('should select All the "product pages"', () => client.waitForExistAndClick(LinkWidget.select_all_product_page));
test('should select All the "static content"', () => client.waitForExistAndClick(LinkWidget.select_all_static_content));
test('should set "Name" input', () => client.waitAndSetValue(LinkWidget.first_custom_content_name_input, 'Custom Name ' + date_time));
test('should set "URL" input', () => client.waitAndSetValue(LinkWidget.first_custom_content_url_input, 'Custom Url ' + date_time));
test('should click on "Add" button', () => client.waitForExistAndClick(LinkWidget.add_custom_content_button));
test('should select All the "content pages"', async () => await client.selectAllOptionsLinkWidget(LinkWidget.select_all_content_page));
test('should select All the "product pages"', async () => await client.selectAllOptionsLinkWidget(LinkWidget.select_all_product_page));
test('should select All the "static content"', async () => await client.selectAllOptionsLinkWidget(LinkWidget.select_all_static_content));
test('should set "Name" input in french', () => client.waitAndSetValue(LinkWidget.first_custom_content_name_input.replace('%POS','1').replace('%lang','2'), 'Custom Name ' + date_time));
test('should set "URL" input in french', () => client.waitAndSetValue(LinkWidget.first_custom_content_url_input.replace('%POS','1').replace('%lang','2'), 'Custom Url ' + date_time));
test('should switch input language to english', () => {
return promise
.then(() => client.waitForExistAndClick(LinkWidget.custom_content_lang_button.replace('%POS','1')))
.then(() => client.waitForVisibleAndClick(LinkWidget.custom_content_lang_span.replace('%lang','en').replace('%POS','1')));
});
test('should set "Name" input in english', () => client.waitAndSetValue(LinkWidget.first_custom_content_name_input.replace('%POS','1').replace('%lang','1'), 'Custom Name ' + date_time));
test('should set "URL" input in english', () => client.waitAndSetValue(LinkWidget.first_custom_content_url_input.replace('%POS','1').replace('%lang','1'), 'Custom Url ' + date_time));
test('should click on "Add" button', () => client.scrollWaitForExistAndClick(LinkWidget.add_custom_content_button));
test('should check that a new custom content bloc is added successfully', () => {
return promise
.then(() => client.waitForExist(LinkWidget.second_custom_content_name_input))
.then(() => client.waitForExist(LinkWidget.second_custom_content_url_input));
.then(() => client.waitForExist(LinkWidget.first_custom_content_name_input.replace('%POS','2').replace('%lang','1')))
.then(() => client.waitForExist(LinkWidget.first_custom_content_url_input.replace('%POS','2').replace('%lang','1')));
});
test('should click on "save" button', () => client.waitForExistAndClick(LinkWidget.save_button));
test('should verify the redirection to the link widget page', () => client.checkTextValue(LinkWidget.link_widget_configuration_bloc, 'LINK BLOCK CONFIGURATION', 'contain'));
test('should click on "save" button', () => client.scrollWaitForExistAndClick(LinkWidget.save_button));
test('should refresh the page', () => client.refresh());
test('should verify that the new block is displayed', () => client.checkTextValue(LinkWidget.last_widget_name_block.replace('%HOOK', hook), name + " " + date_time));
}, 'common_client');
},
dragAndDropHookBO(name) {
scenario('Change the Widget position ', client => {
test('should change the position of the created block', () => client.dragAndDrop(LinkWidget.last_widget_drag_in_displayFooter_block.replace('%HOOK', name), LinkWidget.first_widget_drag_in_displayFooter_block.replace('%HOOK', name)));
test('should check that the success alert message is well displayed', () => client.waitForExistAndClick(AddProductPage.green_validation_notice));
test('should check that the success alert message is well displayed', () => client.checkTextValue(LinkWidget.success_panel, 'Successful update.'));
test('should refresh the page', () => client.refresh());
test('should check that the new position is saved successfully', () => client.checkTextValue(LinkWidget.second_widget_in_displayFooter_block.replace('%HOOK', name), name + " " + date_time));
}, 'common_client');
Expand Down