---
# System prepended metadata

title: E1AM-264 - Resend Order Mechanism
tags: [Ecommerce 1, Admin Panel, Sprint 21]

---

# E1AM-264 - Resend Order Mechanism

> As a Sinbad Admin, I want to resend order, and the order previous will be soft deleted in database.

## Test Scenarios
#### Test Scenario 1
```gherkin
Scenario: As an Admin, I should be able to see 'Resend Order' button
    Given the user has logged in to Admin Panel
        And the user is on OMS Page
        And order <A> rejected by supplier
    When the user clicks order <A> details
    Then the user redirects to order <A> Detail Page
        And show clickable 'Resend Order' button
```

#### Test Scenario 2
```gherkin
Scenario: As an Admin, I shouldn't be able to see 'Resend Order' button if order is valid
    Given the user has logged in to Admin Panel
        And the user is on OMS Page
        And order <A> accepted by supplier
    When the user clicks order <A> details
    Then the user redirects to order <A> Detail Page
        And doesn't show 'Resend Order' button
```

#### Test Scenario 3
```gherkin
Scenario: As an Admin, I want to resend order
    Given the user has logged in to Admin Panel
        And order <A> rejected by supplier
        And the user is on order <A> detail Page
    When the user clicks 'Resend Order' button
    Then send order <A> data
        And generate new order_id for order <A>
        And soft-delete old order <A> data
```

#### Test Scenario 4
```gherkin
Scenario: As an Admin, I should be able to see changed order data after resend order
    Given the user has logged in to Admin Panel
        And order <A> rejected by supplier
        And the user is on OMS Page
        And the user has re-sent order <A>
    When the user clicks order <A>
    Then show order <A> data
        And show new order_id for order <A>
```

#### Test Scenario 5
```gherkin
Scenario: As an Admin, I shouldn't be able to see 'Resend Order' button after resend order
    Given the user has logged in to Admin Panel
        And order <A> rejected by supplier
        And the user is on OMS Page
        And the user has re-sent order <A>
    When the user clicks order <A>
    Then show order <A> data
        And show new order_id for order <A>
        And doesn't show 'Resend Order' button
```

#### Test Scenario 6
```gherkin
Scenario: As an Admin, I should be able to see data re-sent to Supplier through log_api DB
    Given the user has logged in to Admin Panel
        And order <A> rejected by supplier
        And the user is on OMS Page
        And the user has re-sent order <A>
    When the user check log_api in DB
    Then show log for re-sent order in DB to supplier
```

###### tags: `Sprint 21` `Ecommerce 1` `Admin Panel`