---
# System prepended metadata

title: E1AM-227 - Assign salesman in portofolio direct
tags: [Ecommerce 1, Admin Panel, Sprint 21]

---

# E1AM-227 - Assign salesman in portofolio direct

> As a Sinbad Admin, I should be able to assign portofolio type direct, so that I can easily find portfolio direct list

## Test Scenarios
#### Test Scenario 1
```gherkin
Scenario: As an Admin, I want to access SR Assignment Page
    Given the user has logged in to SSC
        And the user is on Homepage
    When the user clicks 'Sales Management'
        And the user clicks 'SR Assignment'
    Then the user redirects to SR Assignment Page
```

#### Test Scenario 2
```gherkin
Scenario: As an Admin, I want to add SR Assignment
    Given the user has logged in to SSC
        And the user is on SR Assignment Page
    When the user clicks 'Add'
    Then the user redirects to 'Add SR Assignment' Page
```

#### Test Scenario 3
```gherkin
Scenario: As an Admin, I shouldn't be able to save with blank mandatory fields
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
    When the user fill mandatory fields with blank
        And the user clicks 'Save' button
    Then show 'Save' button as disabled button
        And the user can't click the 'Save' button
```

#### Test Scenario 4
```gherkin
Scenario: As an Admin, I shouldn't be able to save with no selected portfolios
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
    When the user fill mandatory fields
        And the user doesn't select any portfolios/stores
        And the user clicks 'Save' button
    Then show 'Save' button as disabled button
        And the user can't click the 'Save' button
```

#### Test Scenario 5
```gherkin
Scenario: As an Admin, I should be able to see existing Sales List Option
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
    When the user clicks 'Sales' section
    Then show dropdown list of existing Salesman
```

#### Test Scenario 6
```gherkin
Scenario: As an Admin, I want to select a Sales
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has clicked 'Sales' section
    When the user clicks Salesman <A>
    Then fill 'Sales' section with Salesman <A>
```

#### Test Scenario 7
```gherkin
Scenario: As an Admin, I should be able to see existing Warehouse List Option
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
    When the user clicks 'Warehouse' option
    Then show dropdown list of existing Warehouse
```

#### Test Scenario 8
```gherkin
Scenario: As an Admin, I want to choose a warehouse
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has clicked 'Warehouse' section
    When the user clicks Warehouse <A>
    Then fill 'Warehouse' section with Warehouse <A>
```

#### Test Scenario 9
```gherkin
Scenario: As an Admin, I should be able to see list of portfolios based on selected warehouse
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
    When the user chosee a Warehouse
    Then show list of portfolios based on selected warheouse in 'Portfolio' list section
```

#### Test Scenario 10
```gherkin
Scenario: As an Admin, I want to search for a portfolio
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
    When the user clicks 'Search' bar
        And the user input <A>
    Then show list of portfolios based on search <A> results
```

#### Test Scenario 11
```gherkin
Scenario: As an Admin, I want to access Out of Portfolio Option
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
    When the user clicks 'Out of Portfolio' button
    Then the user redirects to Out of Portfolio List Section
```

#### Test Scenario 12
```gherkin
Scenario: As an Admin, I should be able to see list of existing stores in Out of Portfolio Section
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
    When the user clicks 'Out of Portfolio' button
    Then show list of stores based on warehouse that isn't in any portfolios
```

#### Test Scenario 13
```gherkin
Scenario: As an Admin, I should be able to see 'See Details' button wording on portfolios
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And portfolio <A> already exist with 4 stores inside
    When the user has chosen a Warehouse
    Then show portfolio <A> in 'Portfolio List'
        And show 'See Details' wording on portfolio <A> row
```

#### Test Scenario 14
```gherkin
Scenario: As an Admin, I want access portfolios details
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
        And portfolio <A> already exist with 4 stores inside
    When the user clicks 'See Details' button wording
    Then show pop-up of list stores in portfolio <A>
```

#### Test Scenario 15
```gherkin
Scenario: As an Admin, I want to choose portfolio(s)
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
    When the user choose a portfolio <A>
    Then portfolio <A> listed in 'Your Selection' Section
```

#### Test Scenario 16
```gherkin
Scenario: As an Admin, I want to clear selected portfolios/stores
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
        And the user has chosen portfolio <A>
    When the user clicks 'Clear All' on Your Selection Section
        And the user clicks 'Yes, confirm'
    Then portfolio <A> deleted from 'Your Selection' section
        And show 'Your Selection' section as empty section
```

#### Test Scenario 17
```gherkin
Scenario: As an Admin, I want to save SR Assignment
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen a Sales
        And the user has chosen a Warehouse
        And the user has chosen portfolio <A>
    When the user clicks 'Save' button
    Then the user redirects back to SR Assignment Page
        And show modal successfully add SR Assignment
```

#### Test Scenario 18
```gherkin
Scenario: As an Admin, I should be able to see assigned SR in Portfolio Details Page
    Given the user has logged in to SSC
        And the user is on Portfolio Page
        And portfolio <A> has been assigned to sales <A>
    When the user clicks portfolio <A>
    Then redirects to portfolio <A> details page
        And show sales <A> in 'Sales' section
```

#### Test Scenario 19
```gherkin
Scenario: As a Sales, I should be able to see my area coverage based on WH Coverage from assigned portfolio
    Given the user has logged in to White
        And the user is on Homepage
        And the user has been assigned to portfolio <A>
        And portfolio <A> covered by warehouse <A>
    When the user clicks 'Profile' button
        And the user clicks 'Area Mapping' button
    Then the user redirects to Area Mapping Page
        And show warehouse <A> as the area mapping
```

#### Test Scenario 20
```gherkin
Scenario: As a Sales, I shouldn't be able to create store outside my area coverage
    Given the user has logged in to White
        And the user is on Homepage
        And the user has been assigned to portfolio <A>
        And portfolio <A> covered by warehouse <A>
        And warehouse <A> doesn't cover urban <B>
    When the user clicks 'List Toko' button
        And the user clicks 'Add' button
        And the user fill all the input fields
        And the user input store's urban id to urban <B>
        And the user clicks 'Save'
    Then show modal pop-up for can't create store outside area mapping
        And the user failed to create store
```

#### Test Scenario 21
```gherkin
Scenario: As a Sales, I should be able to automatically assign store created to my portfolio direct
    Given the user has logged in to White
        And the user is on Homepage
        And the user has been assigned to portfolio <A>
        And portfolio <A> covered by warehouse <A>
        And warehouse <A> cover urban <A>
    When the user clicks 'List Toko' button
        And the user clicks 'Add' button
        And the user fill all the input fields
        And the user input store's urban id to urban <A>
        And the user clicks 'Save'
    Then store successfully created
        And the user redirects back to List Toko Page
```

#### Test Scenario 22
```gherkin
Scenario: As an Admin, I want to change the assigned sales on a portfolio
    Given the user has logged in to SSC
        And the user is on Add SR Assignment Page
        And the user has chosen Sales <B>
        And the user has chosen a Warehouse
        And portfolio <A> already assigned to sales <A>
    When the user choose portfolio <A>
        And the user clicks 'Save'
    Then the user redirects back to SR Assignment Page
        And show modal successfully add SR Assignment
        And Portfolio <A> assigned to sales <B>
        And remove sales <A> to the assignee of portfolio <A>
```

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