# EC1-352 - Cross Selling promo add / create
> https://sinbadkp.atlassian.net/browse/EC1-352
## Functional Test Scenarios
#### Test Scenario 1
```gherkin
Scenario: As an Admin, I should be able to see 'Cross Selling Promo' option menu
Given the user has logged in as Admin
When the user clicks 'Promo' tab menu
Then show 'Cross Selling Promo' sub-menu
```
#### Test Scenario 2
```gherkin
Scenario: As an Admin, I want to access Cross Selling Promo Page
Given the user has logged in as Admin
When the user clicks 'Promo' tab menu
And the user clicks 'Cross Selling Promo'
Then redirects user to Cross Selling Promo Page
```
#### Test Scenario 3
```gherkin
Scenario: As an Admin, I want to access Add Cross Selling Promo Page
Given the user has logged in as Admin
And the user is on Cross Selling Promo Page
When the user clicks 'Add' button
Then redirects user to Add Cross Selling Promo Page
```
#### Test Scenario 4
```gherkin
Scenario Outline: As an Admin, I shouldn't be able to create with blank mandatory fields
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user input <inputField> with blank
Then show 'Save' button as disabled button
Examples:
| inputField |
| promoAllocation |
| promoSellerID |
| promoName |
| platform |
| activeDate |
| endDate |
| fakturGroup |
| triggerGroup |
| chosenSKU |
| relationGroup |
| conditionBase |
| benefitTypeAmount |
| segmentationField |
```
#### Test Scenario 5
```gherkin
Scenario Outline: As an Admin, I should see error message with wrong format fields
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user input <wrongInput> to <inputField>
And the user clicks 'Save' button
Then the user failed to create Cross Selling Promo
And show error message
Examples:
| wrongInput | inputField |
| ----------- | ----------------- |
| varchar >25 | promoSellerID |
| varchar >25 | promoName |
| alphabet | maxRedemption |
| alphabet | qtyGroup |
| alphabet | orderValueGroup |
| alphabet | qtyBenefit |
| alphabet | orderValueBenefit |
```
#### Test Scenario 6
```gherkin
Scenario: As an Admin, I should be able to see Platform dropdown options
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user clicks 'Platform' field
Then show dropdown options for All, Sinbad Red, and Sinbad White
```
#### Test Scenario 7
```gherkin
Scenario: As an Admin, I should be able to see currency input format in Max Promo Redemption based on Rp
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user choose Max Promo Redemption based on Rp
And the user input value in Max Promo Redemption field
Then show value inputted as currency format (Rp)
```
#### Test Scenario 8
```gherkin
Scenario: As an Admin, I should be able to see Qty field when choosing Qty base
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user choose Qty as base for group 1
Then show Qty field in Group 1 input section
```
#### Test Scenario 9
```gherkin
Scenario: As an Admin, I should be able to see Order Value field when choosing Order Value base
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user choose Order Value as base for group 1
Then show Order Value field in Group 1 input section
```
#### Test Scenario 10
```gherkin
Scenario: As an Admin, I should be able to see Faktur Options dropdown
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user clicks 'Faktur' field
Then show Faktur options list
```
#### Test Scenario 11
```gherkin
Scenario: As an Admin, I should be able to choose SKU in Chosen SKU field
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
When the user clicks 'SKU' field
And the user choose SKU <A>
Then show SKU <A> in Chosen SKU Field
```
#### Test Scenario 12
```gherkin
Scenario: As an Admin, I shouldn't be able to choose more than 4 SKU in 1 Group
Given the user has logged in as Admin
And the user is on Add Cross Selling Promo Page
And the user has chosen 4 SKU in Group 1
When the user choose a SKU
Then the user failed to choose the last SKU
And show warning error message
```
#### Test Scenario 13
```gherkin
Scenario: As an Admin, I shouldn't be able to choose >1 SKU in group 2 if group 1 has chosen 4 SKU(s) (max combined SKU = 5)
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
And the user has chosen 4 SKU in Group 1
When the user clicks 'SKU' in Group 2 Field
And the user choose 2 SKUs
Then the user failed to add SKUs
And show warning error message
```
#### Test Scenario 14
```gherkin
Scenario: As an Admin, I should be able to see Logic options dropdown
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
When the user clicks 'Logic' field
Then show Logic options list
```
#### Test Scenario 15
```gherkin
Scenario: As an Admin, I should be able to choose a Logic option
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
When the user clicks 'Logic' field
And the user clicks 'AND'
Then show 'AND' as value for logic field
```
#### Test Scenario 16
```gherkin
Scenario Outline: As an Admin, I should be able to see field in Benefit section based on Benefit Type
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
When the user clicks <benefitType>
Then show <fieldSection>
Examples:
| benefitType | fieldSection |
| ----------- | -------------------- |
| Qty | bonusSku,bonusQty |
| Rp | orderValue |
| % | rebateValue,maxValue |
```
#### Test Scenario 17
```gherkin
Scenario Outline: As an Admin, I should be able to see field in Segmentation section based on Segmentation Type
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
When the user choose <segmentationType>
Then show <segmentSection>
Examples:
| segmentationType | segmentSection |
| ---------------- | -------------- |
| directStore | directStore |
| otherSegment | otherSegment |
```
#### Test Scenario 18
```gherkin
Scenario: As an Admin, I want to choose a store for direct store segmentation
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
And the user has filled all the fields
When the user clicks 'Direct Store' in Segmentation Section
And the user choose store <A>
Then store <A> chosen as direct store segmentation
```
#### Test Scenario 19
```gherkin
Scenario: As an Admin, I want to choose a warehouse for warehouse segmentation
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
And the user has filled all the fields
When the user clicks 'Other' in Segmentation Section
And the user choose warehouse <A> in warehouse field
Then warehouse <A> chosen as warehouse segmentation segmentation
```
#### Test Scenario 20
```gherkin
Scenario: As an Admin, I want to create a cross selling promo
Given the user has logged in as Admin
And the user is on Add Cross Selling Page
And the user has filled all the fields
When the user clicks 'Save'
Then the user successfully created cross selling promo
And show pop-up notification for success message
```
#### Test Scenario 21
```gherkin
Scenario: As an Admin, I should be able to see changed `is_bundle` field in catalogue DB
Given the user has logged in as Admin
And the user has created cross selling promo <A>
And catalogue <A> if affiliated to cross selling promo <A>
When the user checks DB for catalogues table
Then show catalogue <A>'s `is_bundle` field with `true` value
```
###### tags: `Sprint 23` `SSC` `Ecommerce 1`