# EC1-285 - Resend store as new store
>PRD: https://docs.google.com/document/d/1wBa-QHesIRWivaJHW4bo21bFapABLqBy2JPQ62U1lzU/edit
>JIRA Ticket: https://sinbadkp.atlassian.net/browse/EC1-285?atlOrigin=eyJpIjoiZjk0ZmQ4OTRmMjczNDk5NGJmZTRjMDdkNDcwZjA2YmEiLCJwIjoiaiJ9
# API Testing
## Test Scenarios
#### Test Scenario 1
```gherkin
Scenario: As an Admin, I want to resend store
Given the user has logged in as Admin in SSC
When the user input correct supplierId
And the user input correct storeId
And the user hit the resend-stores endpoint
Then store resent to supplier
```
#### Test Scenario 2
```gherkin
Scenario: As an Admin, I should get error message for resend a store with non-existent Supplier
Given the user has logged in as Admin in SSC
When the user input non-existent supplierId
And the user input storeId
And the user hit the resend-stores endpoint
Then show error message
```
#### Test Scenario 3
```gherkin
Scenario: As an Admin, I shouldn get error message for resend non-existent store
Given the user has logged in as Admin in SSC
When the user input supplierId
And the user input non-existent storeId
And the user hit the resend-stores endpoint
Then show error message
```
#### Test Scenario 4
```gherkin
Scenario: As an Admin, I should get error message with blank fields body request
Given the user has logged in as Admin in SSC
When the user input balnk supplierId
And the user input blank storeId
And the user hit the resend-stores endpoint
Then show error message
```
#### Test Scenario 5
```gherkin
Scenario: As an Admin, I should get warning message with wrong store(s) when resending multiple stores
Given the user has logged in as Admin in SSC
And storeId <C> is non-existent
When the user input supplierId
And the user input multiple storeId along with storeId <C>
And the user hit the resend-stores endpoint
Then show warning message
```
#### Test Scenario 6
```gherkin
Scenario: As an Admin, I should get success message with correct body req for resend single store
Given the user has logged in as Admin in SSC
When the user input correct supplierId
And the user input correct storeId
And the user hit the resend-stores endpoint
Then show success response message
```
#### Test Scenario 7
```gherkin
Scenario: As an Admin, I should get success message with correct body req for resend multiple stores
Given the user has logged in as Admin in SSC
When the user input correct supplierId
And the user input correct multiple storeId
And the user hit the resend-stores endpoint
Then show success response message
```
#### Test Scenario 8
```gherkin
Scenario: As an Admin, I should be able to see changed stores.store_code after resend store
Given the user has logged in as Admin in SSC
And store <A> has store_code <storeCode>
And the user has resent store <A>
When the user hit get supplier-store endpoint for store <A>
Then show response data for store <A>
And show store <A>'s store_code updated to <storeCode>-R1
```
#### Test Scenario 9
```gherkin
Scenario: As an Admin, I should be able to see incremental changed stores.store_code after resend store the second time
Given the user has logged in as Admin in SSC
And store <A> has been resent once
And store <A> store_code now is <storeCode>-R1
When the user input correct supplierId
And the user input store <A> storeId
And the user hit endpoint resend-stores
Then show successful resend store response
And store <A> store_code updated to <storeCode>-R2
```
#### Test Scenario 10
```gherkin
Scenario: As an Admin, I should be able to see changed supplier_stores.external_id after resend store
Given the user has logged in as Admin in SSC
And the user has resent store <A>
When the user hit get supplier-stores for store <A>
Then show data response for store <A>
And show updated store <A> external_id
```
# Functional Testing
## Test Scenarios
#### Test Scenario 1
```gherkin
Scenario: As an Admin, I should be able to see 'Resend' option
Given the user has logged in to SSC
And the user is on Store List Page
When the user clicks 'Action' icon button for a store
Then show 'Resend' option
```
#### Test Scenario 2
```gherkin
Scenario: As an Admin, I want to resend a store
Given the user has logged in to SSC
And the user is on Store List Page
When the user clicks 'Resend' action menu for store <A>
And the user clicks 'Confirm'
Then resend store <A>
```
#### Test Scenario 3
```gherkin
Scenario: As an Admin, I should be able to get success resend notification
Given the user has logged in to SSC
And the user is on Store list page
When the user has resent store <A>
Then show success resend notification
```
#### Test Scenario 4
```gherkin
Scenario: As an Admin, I should be able to see changed data for resent store
Given the user has logged in to SSC
And store <A> has successfully resent
When the user clicks store <A> detail page
Then show updated store <A>'s store_code
And show updated store <A>'s store supplier ID
```
#### Test Scenario 5
```gherkin
Scenario: As an Admin, I should be able to see 'Verified' status for resent store
Given the user has logged in to SSC
And store <A> has successfully resent
And store <A> hasn't get response data from Supplier
When the user clicks Store List Page
Then show store <A>'s status as 'Verified'
```
#### Test Scenario 6
```gherkin
Scenario: As an Admin, I should be able to see updated store status from Supplier's response
Given the user has logged in to SSC
And store <A> has successfully resent
When store <A> got the response data from Supplier
And the user clicks Store List Page
Then show store <A>'s status based on response data from Supplier
```
#### Test Scenario 7
```gherkin
Scenario: As an Admin, I should be able to see Action button when picking multiple stores
Given the user has logged in to SSC
And the user is on Store List Page
When the user clicks multiple stores checkbox
Then show 'Action' button on top menu page
```
#### Test Scenario 8
```gherkin
Scenario: As an Admin, I should be able to see Resend Menu in Action button
Given the user has logged in to SSC
And the user is on Store List Page
And the user has chosen multiple stores
When the user clicks 'Action' button
Then show 'Resend' as dropdown menu
```
#### Test Scenario 9
```gherkin
Scenario: As an Admin, I should be able to see Bulk Resend Confrimation Page
Given the user has logged in to SSC
And the user is on Store List Page
And the user has chosen multiple stores
When the user clicks 'Action' button
And the user clicks 'Resend'
Then show Bulk Resend Confirmation Page
```
#### Test Scenario 10
```gherkin
Scenario: As an Admin, I want to bulk resend stores
Given the user has logged in to SSC
And the user has chosen multiple stores
And the user is on Bulk Resend Confirmation Page
When the user clicks 'Submit'
Then the chosen stores resent
```
#### Test Scenario 11
```gherkin
Scenario: As an Admin, I should be able to see updated Reject Reason
Given the user has logged in to SSC
And store <A> has successfully resent
And store <A> got response data 'Rejected' from Supplier
When
Then
```
###### tags: `Sprint 22` `Ecommerce 1` `SSC`