-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] website_sale_product_attribute_value_filter_existing: Migration…
… to 17.0
- Loading branch information
Showing
2 changed files
with
43 additions
and
50 deletions.
There are no files selected for viewing
73 changes: 35 additions & 38 deletions
73
...r_existing/static/src/js/website_sale_product_attribute_value_filter_existing_tour.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,40 @@ | ||
/** @odoo-module **/ | ||
|
||
import tour from "web_tour.tour"; | ||
import {registry} from "@web/core/registry"; | ||
|
||
tour.register( | ||
"website_sale_product_attribute_value_filter_existing", | ||
{ | ||
registry | ||
.category("web_tour.tours") | ||
.add("website_sale_product_attribute_value_filter_existing", { | ||
test: true, | ||
url: "/shop", | ||
}, | ||
// No product has the yellow colour attribute defined. | ||
// When enter to "/shop" the attribute "test yellow" should not appear in the list of filters by attribute. | ||
[ | ||
// For the following steps it is checked that the attribute "test yellow" is | ||
// not present in the list but the attributes "test red", "test blue" and | ||
// "test green" must be present. | ||
{ | ||
content: | ||
"Search a product. Ensure 'test red', 'test blue' and 'test green' attributes are present while 'Test yellow' is not.", | ||
trigger: "form input[name=search]", | ||
run: "text desk", | ||
extra_trigger: | ||
".js_attributes:not(:contains('Test yellow')):has(label:contains('Test red')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test blue')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test green'))", | ||
}, | ||
{ | ||
content: | ||
"Submit search button. Ensure 'test red', 'test blue' and 'test green' attributes are present while 'Test yellow' is not.", | ||
trigger: 'form:has(input[name="search"]) .oe_search_button', | ||
extra_trigger: | ||
".js_attributes:not(:contains('Test yellow')):has(label:contains('Test red')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test blue')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test green'))", | ||
}, | ||
// After searching, the attributes "test red" and "test green" must be present. | ||
// "Test yelow" should not be present as it is not used in any product and | ||
// "test blue" should not be present as it is not used in the products shown. | ||
{ | ||
content: | ||
"Go to /shop after the search. Ensure 'test red' and 'test green' attributes are present while 'Test yellow' and 'test blue' are not.", | ||
trigger: "a[href='/shop']", | ||
extra_trigger: | ||
".js_attributes:not(:contains('Test blue'), :contains('Test yellow')):has(label:contains('Test green')), .js_attributes:not(:contains('Test blue'), :contains('Test yellow')):has(label:contains('Test red'))", | ||
}, | ||
] | ||
); | ||
steps: () => [ | ||
// No product has the yellow colour attribute defined. | ||
// When enter to "/shop" the attribute "test yellow" should not appear in the list of filters by attribute. | ||
// For the following steps it is checked that the attribute "test yellow" is | ||
// not present in the list but the attributes "test red", "test blue" and | ||
// "test green" must be present. | ||
{ | ||
content: | ||
"Ensure 'test red', 'test blue' and 'test green' attributes are present while 'Test yellow' is not.", | ||
trigger: "body", | ||
extra_trigger: | ||
".js_attributes:not(:contains('Test yellow')):has(label:contains('Test red')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test blue')), .js_attributes:not(:contains('Test yellow')):has(label:contains('Test green'))", | ||
}, | ||
{ | ||
content: "Selecting the 'test green' attribute.", | ||
trigger: | ||
".form-check:has(label:contains('Test green')) input[type='checkbox']", | ||
run: "click", | ||
}, | ||
// After selecting, the attributes "test red" and "test green" must be present. | ||
// "Test yellow" should not be present as it is not used in any product and | ||
// "test blue" should not be present as it is not used in the products shown. | ||
{ | ||
content: | ||
"Ensure 'test red' and 'test green' attributes are present while 'Test yellow' and 'test blue' are not.", | ||
trigger: "body", | ||
extra_trigger: | ||
".js_attributes:not(:contains('Test blue')):not(:contains('Test yellow')):has(label:contains('Test green')), .js_attributes:not(:contains('Test blue')):not(:contains('Test yellow')):has(label:contains('Test red'))", | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters