From fbd9558997d92b66101d3236d7c9357f09ad2853 Mon Sep 17 00:00:00 2001 From: Andrii Semenets Date: Fri, 8 Nov 2024 14:47:05 +0200 Subject: [PATCH] adjust behat to verify ledger table: Scenario: Cashier cancel purchase when rounding of discounts disabled but consumption enabled (#74) --- .../shopping_cart_cashier_consumption.feature | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/behat/shopping_cart_cashier_consumption.feature b/tests/behat/shopping_cart_cashier_consumption.feature index 708d392..4d2923a 100644 --- a/tests/behat/shopping_cart_cashier_consumption.feature +++ b/tests/behat/shopping_cart_cashier_consumption.feature @@ -70,6 +70,33 @@ Feature: Cashier actions in shopping cart with consumption enabled And the field "Cancelation fee" matches value "0" And I press "Save changes" And I should see "23.6" in the "ul.cashier-history-items span.credit_total" "css_element" + ## Verify records in the ledger table. + And I follow "Cash report" + And I wait until the page is ready + And I should see "10.00" in the "#cash_report_table_r6" "css_element" + And I should see "Test item 1" in the "#cash_report_table_r6" "css_element" + And I should see "Cashier (Cash)" in the "#cash_report_table_r6" "css_element" + And I should see "Success" in the "#cash_report_table_r6" "css_element" + And I should see "20.30" in the "#cash_report_table_r5" "css_element" + And I should see "Test item 2" in the "#cash_report_table_r5" "css_element" + And I should see "Cashier (Cash)" in the "#cash_report_table_r5" "css_element" + And I should see "Success" in the "#cash_report_table_r5" "css_element" + And I should see "13.80" in the "#cash_report_table_r4" "css_element" + And I should see "Test item 3" in the "#cash_report_table_r4" "css_element" + And I should see "Cashier (Cash)" in the "#cash_report_table_r4" "css_element" + And I should see "Success" in the "#cash_report_table_r4" "css_element" + And I should see "3.30" in the "#cash_report_table_r3" "css_element" + And I should see "Canceled - Test item 1" in the "#cash_report_table_r3" "css_element" + And I should see "Credits" in the "#cash_report_table_r3" "css_element" + And I should see "Canceled" in the "#cash_report_table_r3" "css_element" + And I should see "20.30" in the "#cash_report_table_r2" "css_element" + And I should see "Canceled - Test item 2" in the "#cash_report_table_r2" "css_element" + And I should see "Credits" in the "#cash_report_table_r2" "css_element" + And I should see "Canceled" in the "#cash_report_table_r2" "css_element" + And I should see "0.00" in the "#cash_report_table_r1" "css_element" + And I should see "Canceled - Test item 3" in the "#cash_report_table_r1" "css_element" + And I should see "Credits" in the "#cash_report_table_r1" "css_element" + And I should see "Canceled" in the "#cash_report_table_r1" "css_element" @javascript Scenario: Cashier cancel purchase when consumption and rounding of discounts enabled