[PriceHistory][Scenarios] Add catalog promotion cases

This commit is contained in:
Rafikooo 2023-03-10 12:29:49 +01:00
parent 668bd90d8b
commit 33a7407986
No known key found for this signature in database
GPG key ID: 4A26D8327BC2442B
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,29 @@
@managing_catalog_promotions
Feature: Seeing the price history of a product variant after changes to catalog promotions
In order to be aware of historical variant prices
As an Administrator
I want to browse the catalog price history of a specific variant
Background:
Given the store operates on a single channel in "United States"
And the store has a "Wyborowa Vodka" configurable product
And there is a catalog promotion "Winter sale" with priority 1 that reduces price by "50%" and applies on "Wyborowa Vodka" product
And there is a catalog promotion "Christmas sale" with priority 2 that reduces price by fixed "$5.00" in the "United States" channel and applies on "Wyborowa Vodka" product
And the product "Wyborowa Vodka" has a "Wyborowa Vodka Exquisite" variant priced at "$40.00" and originally priced at "$15.00"
And the product "Wyborowa Vodka" has a "Wyborowa Vodka Lemon" variant priced at "$10.00"
And there is an exclusive catalog promotion "Extra sale" with priority 10 that reduces price by "10%" and applies on "Wyborowa Vodka Lemon" variant
And I am logged in as an administrator
@api @ui
Scenario: Seeing the catalog price history of a variant with many catalog promotions
And I go to the price history of a variant with code "WYBOROWA_VODKA_EXQUISITE"
Then I should see 2 log entries in the catalog price history
And there should be a log entry on the 1st position with the "$5.00" selling price, "$15.00" original price and datetime of the price change
And there should be a log entry on the 2nd position with the "$40.00" selling price, "$15.00" original price and datetime of the price change
@api @ui
Scenario: Seeing the catalog price history of a variant with one catalog promotion
And I go to the price history of a variant with code "WYBOROWA_VODKA_LEMON"
Then I should see 2 log entries in the catalog price history
And there should be a log entry on the 1st position with the "$9.00" selling price, "$10.00" original price and datetime of the price change
And there should be a log entry on the 2nd position with the "$10.00" selling price, no original price and datetime of the price change

View file

@ -0,0 +1,39 @@
@managing_catalog_promotions
Feature: Seeing the price history of a simple product after changes to catalog promotions
In order to be aware of historical simple product prices
As an Administrator
I want to browse the catalog price history of a simple product
Background:
Given the store operates on a single channel in "United States"
And the store has a product "Wyborowa Vodka" priced at "$100.00" in "United States" channel
And there is disabled catalog promotion named "Winter sale"
And the catalog promotion "Winter sale" is available in "United States"
And it applies on "Wyborowa Vodka" product
And it reduces price by "90%"
And I am logged in as an administrator
@api @ui
Scenario: Seeing the catalog price history of a simple product
Given the "Winter sale" catalog promotion is enabled
When I disable "Winter sale" catalog promotion
And I go to the price history of a variant with code "WYBOROWA_VODKA"
Then I should see 3 log entries in the catalog price history
And there should be a log entry on the 1st position with the "$100.00" selling price, "$100.00" original price and datetime of the price change
And there should be a log entry on the 2nd position with the "$10.00" selling price, "$100.00" original price and datetime of the price change
And there should be a log entry on the 3rd position with the "$100.00" selling price, no original price and datetime of the price change
@api @ui
Scenario: Seeing the catalog price history of a simple product with a price different than an original price
Given "Wyborowa Vodka" variant is originally priced at "$120.00" in "United States" channel
And the "Winter sale" catalog promotion is enabled
And the "Wyborowa Vodka" product is now priced at "$120.00" and originally priced at "$140.00"
When I disable "Winter sale" catalog promotion
And I go to the price history of a variant with code "WYBOROWA_VODKA"
Then I should see 6 log entries in the catalog price history
And there should be a log entry on the 1st position with the "$140.00" selling price, "$140.00" original price and datetime of the price change
And there should be a log entry on the 2nd position with the "$14.00" selling price, "$140.00" original price and datetime of the price change
And there should be a log entry on the 3rd position with the "$120.00" selling price, "$140.00" original price and datetime of the price change
And there should be a log entry on the 4th position with the "$12.00" selling price, "$120.00" original price and datetime of the price change
And there should be a log entry on the 5th position with the "$100.00" selling price, "$120.00" original price and datetime of the price change
And there should be a log entry on the 6th position with the "$100.00" selling price, no original price and datetime of the price change