-
Notifications
You must be signed in to change notification settings - Fork 6
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
FRW-6354 Fixed Edit Category page so that any store can be assigned to a category. #958
base: master
Are you sure you want to change the base?
FRW-6354 Fixed Edit Category page so that any store can be assigned to a category. #958
Conversation
robot - files - is it about tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for all 5 applications and not only for suite.
resources/common/common_zed.robot
Outdated
@@ -16,7 +16,7 @@ ${zed_variant_search_field_locator} xpath=//*[@id='product-variant-table_fil | |||
${zed_processing_block_locator} xpath=//div[contains(@id,'processing')][contains(@class,'dataTables_processing')] | |||
${zed_merchants_dropdown_locator} xpath=//select[@name='id-merchant'] | |||
${zed_attribute_access_denied_header} xpath=//div[@class='wrapper wrapper-content']//div[@class='flash-messages']//following-sibling::h1 | |||
|
|||
${zed_category_save_button} xpath=//button[contains(@class,'safe-submit')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this locator is specific to Edit Category page, but locators in this file are general for many pages in Zed.
In this case please create a new zed_edit_category_page.robot
file in https://github.com/spryker/robotframework-suite-tests/tree/master/resources/pages/zed and move it there
@@ -54,6 +54,8 @@ Zed: create new Store: | |||
END | |||
END | |||
Click ${zed_store_save_button} | |||
wait until element is visible ${zed_success_flash_message} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait until element is visible ${zed_success_flash_message} | |
Wait Until Element Is Visible ${zed_success_flash_message} |
@@ -296,6 +297,7 @@ Dynamic_multistore | |||
Zed: login on Zed with provided credentials: ${zed_admin_email} | |||
Zed: assigned store to cms block: ${random_str_store}_${random_str_store} customer-registration_token--html | |||
Zed: assigned store to cms block: ${random_str_store}_${random_str_store} customer-registration_token--text | |||
Zed: assign store to category: ${random_str_store} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You assign a category to the newly created store, but there is no assertion that this new Category is available on the newly created store.
So for this case you need to
- Assign category to store in Zed
- Trigger P&S as in CI env we don't have Jenkins. Trigger can be done by
Trigger multistore p&s
keyword (see above in this test) - Check that the category is available in the store, to which it was assigned. Here I advice you to check through the API call and not though the UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I'm not sure this is within the scope of the ticket (https://spryker.atlassian.net/browse/FRW-6354). The adjustment was only concerning the UI, and I'd rather not widen the scope to include the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree.
Previously it was not possible to assign category to a newly created store, so we didn't know if it works at all.
The score of the bug ticket is not just to fix the UI but also to check that category is available for the customers after store assignment.
Imagine if UI in the back-office is fixed but the category is still not accessible on the storefront/API - what is the value of this fix in such case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, will update accordingly
@@ -296,6 +297,7 @@ Dynamic_multistore | |||
Zed: login on Zed with provided credentials: ${zed_admin_email} | |||
Zed: assigned store to cms block: ${random_str_store}_${random_str_store} customer-registration_token--html | |||
Zed: assigned store to cms block: ${random_str_store}_${random_str_store} customer-registration_token--text | |||
Zed: assign store to category: ${random_str_store} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You assign a category to the newly created store, but there is no assertion that this new Category is available on the newly created store.
So for this case you need to
- Assign category to store in Zed
- Trigger P&S as in CI env we don't have Jenkins. Trigger can be done by
Trigger multistore p&s
keyword (see above in this test) - Check that the category is available in the store, to which it was assigned. Here I advice you to check through the API call and not though the UI
[Arguments] ${store} | ||
Zed: go to second navigation item level: Catalog Category | ||
Zed: click Action Button in a table for row that contains: cables Edit | ||
Click xpath=//body/ul[@class='dropdown-menu']/li/a[contains(.,'Edit')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xpath=//body/ul[@class='dropdown-menu']/li/a[contains(.,'Edit')]
looks like a static locator. Don't hardcode it right in the keyword. Please move it to a separate page that describes elements of this page and use a variable in your keyword
Zed: click Action Button in a table for row that contains: cables Edit | ||
Click xpath=//body/ul[@class='dropdown-menu']/li/a[contains(.,'Edit')] | ||
Set Browser Timeout ${browser_timeout} | ||
Wait Until Element Is Visible xpath=//select[@id="category_store_relation_id_stores"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, don't hardcode static locators in keywords. Thanks
Zed: assign store to category: | ||
[Arguments] ${store} | ||
Zed: go to second navigation item level: Catalog Category | ||
Zed: click Action Button in a table for row that contains: cables Edit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cables
is hardcoded inside the keyword.
- add new argument to this keywrod so it accepts the category and store as a variable
- create new variable in all these 5 files with a values of categories that you'd like to edit within your tests. In these files we store environment specific data, as suite, b2b and b2c demodata is different. Use newly created variable in the test file to pass the value of the category to edit
- https://github.com/spryker/robotframework-suite-tests/blob/master/resources/environments/environments_ui_b2b.json
- https://github.com/spryker/robotframework-suite-tests/blob/master/resources/environments/environments_ui_b2c.json
- https://github.com/spryker/robotframework-suite-tests/blob/master/resources/environments/environments_ui_mp_b2b.json
- https://github.com/spryker/robotframework-suite-tests/blob/master/resources/environments/environments_ui_mp_b2c.json
- https://github.com/spryker/robotframework-suite-tests/blob/master/resources/environments/environments_ui_suite.json
Developer(s): @aleksandr-velikanov
Ticket: https://spryker.atlassian.net/browse/FRW-6354
Change log
Improvements
Zed: assign store to category
step.Dynamic_multistore
test