# EC1-342 - Create Enpoint for Verification Page (Check Promo) > https://sinbadkp.atlassian.net/browse/EC1-342 ## Test Scenarios #### Test Scenario 1 ```gherkin Scenario: As an Admin, I want to hit check promo endpoint Given the user has logged in as Admin When the user input storeId correctly And the user input cartId correctly And the user input catalogues object correctly And the user hit check-promo endpoint Then the user successfully check promo And show success response data ``` #### Test Scenario 2 ```gherkin Scenario: As an Admin, I should get error mesasge due to hit check promo endpoint with wrong storeId Given the user has logged in as Admin When the user input wrong storeId And the user input cartId correctly And the user input catalogues object correctly And the user hit check-promo endpoint Then the user failed to check promo And show failed response data ``` #### Test Scenario 3 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with non-existent storeId Given the user has logged in as Admin When the user input non-existent storeId And the user input cartId correctly And the user input catalogues object correctly And the user hit check-promo endpoint Then the user failed to check promo And show failed response data ``` #### Test Scenario 4 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with wrong cartId Given the user has logged in as Admin When the user input storeId correclty And the user input wrong cartId And the user input catalogues object correctly And the user hit check-promo endpoint Then the user failed to check promo And show failed response data ``` #### Test Scenario 5 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with non-existent cartId Given the user has logged in as Admin When the user input storeId correclty And the user input non-existent cartId And the user input catalogues object correctly And the user hit check-promo endpoint Then the user failed to check promo And show failed response data ``` #### Test Scenario 6 ```gherkin Scenario: As an Admin, I should be able to hit check promo without voucher object Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user doesn't input voucher object And the user hit check-promo endpoint Then the user successfully check promo And show success response data with blank voucher object ``` #### Test Scenario 7 ```gherkin Scenario: As an Admin, I want to hit check promo with voucher object Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input voucher object And the user hit check-promo endpoint Then the user successfully check promo And show success response data with voucher object ``` #### Test Scenario 8 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo with wrong voucherId Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input wrong voucherId And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 9 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo with non-existent voucherId Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input non-existent voucherId And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 10 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with wrong voucherName Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input wrong voucherName And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 11 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with non-existent voucherName Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input non-existent voucherName And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 12 ```gherkin Scenario: As an Admin, I should get error message due to hit check promo endpoint with wrong voucher value field Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input catalogues object correctly And the user input wrong voucher.value And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 13 ```gherkin Scenario: As an Admin, I should get error message due to wrong catalogue.Id Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input wrong catalogues.Id And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 14 ```gherkin Scenario: As an Admin, I should get error message due to non-existent catalogue.Id Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input non-existent catalogues.Id And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 15 ```gherkin Scenario: As an Admin, I should get error message due to wrong catalogue.qty Given the user has logged in as Admin When the user input storeId correclty And the user input cartId correctly And the user input wrong catalogues.qty And the user hit check-promo endpoint Then the user failed check promo And show failed response data ``` #### Test Scenario 16 ```gherkin Scenario: As an Admin, I should be able to see promo SKU in `PromoSKU` field Given the user has logged in as Admin And SKU <A> is related to promo <A> And the user has added SKU <A> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show response data with `promoSKU` field showing promo <A> data ``` #### Test Scenario 17 ```gherkin Scenario: As an Admin, I should be able to see non-promo SKU in `notPromoSKU` field Given the user has logged in as Admin And SKU <A> is related to promo <A> And SKU <B> is not related to any promo And the user has added SKU <A> & <B> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show response data with `promoSKU` field showing SKU <A> with promo <A> data And show response data with `notPromoSKU` field showing SKU <B> ``` #### Test Scenario 18 ```gherkin Scenario: As an Admin, I should be able to see bonus SKU in `bonusSKU` field Given the user has logged in as Admin And SKU <A> is related to promo <A> And promo <A> has SKU based bonus get SKU <B> And the user has added SKU <A> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show `bonusSKU` field with SKU <B> data ``` #### Test Scenario 19 ```gherkin Scenario: As an Admin, I should be able to blank bonus SKU field for sku with non-sku promo Given the user has logged in as Admin And SKU <A> is related to promo <A> And promo <A> is not SKU based bonus promo And the user has added SKU <A> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show `bonusSKU` field with blank object ``` #### Test Scenario 20 ```gherkin Scenario: As an Admin, I should be able to blank promoSKU field for cart with sku non-promo Given the user has logged in as Admin And SKU <A> is not related to any promo And the user has added SKU <A> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show `promoSKU` field with blank object ``` #### Test Scenario 21 ```gherkin Scenario: As an Admin, I should be able to blank notPromoSKU field for cart with sku promo Given the user has logged in as Admin And SKU <A> is related to promo <A> And promo <A> has SKU based bonus get SKU <B> And the user has added SKU <A> to cart When the user input storeId correclty And the user input cartId correctly And the user input catalogues.qty And the user hit check-promo endpoint Then the user successfully check promo And show `notPromoSKU` field with blank object ``` ###### tags: `Sprint 23` `Red` `White` `Ecommerce 1`