# EC1-405 - New API for Add Catalogue Segmentation ## Test Scenarios #### Test Scenario 1 ```gherkin Scenario Outline: As an Admin, I shouldn't be able to add catalogue segmentation with blank objects Given the user has logged in as Admin When the user input blank for <objectField> And the user hit post catalogue-segmentation endpoint Then show error message Examples: | objectField | | ----------- | | name | | warehouseId | ``` #### Test Scenario 2 ```gherkin Scenario Outline: As an Admin, I shouldn't be able to add catalogue segmentation with wrong value objects Given the user has logged in as Admin When the user input <wrongValue> for <objectField> And the user hit post catalogue-segmentation endpoint Then show error message Examples: | objectField | wrongValue | | ----------- | ---------- | | warehouseId | alphabet | | typeId | alphabet | | groupId | alphabet | | channelId | alphabet | | clusterId | alphabet | | catalogueId | alphabet | ``` #### Test Scenario 3 ```gherkin Scenario Outline: As an Admin, I shouldn't be able to add catalogue segmentation with non-existent value object Given the user has logged in as Admin When the user input non-existent value for <objectField> And the user hit post catalogue-segmentation endpoint Then show error message Examples: | objectField | | ----------- | | warehouseId | | typeId | | groupId | | channelId | | clusterId | | catalogueId | ``` #### Test Scenario 4 ```gherkin Scenario: As an Admin, I shouldn't be able to add catalogue segmentation using warehouseId from other supplier Given the user has logged in as Admin And warehouseId <A> is for supplier <B> And user logged in as supplier <A> When the user input warehouseId <A> And the user hit post catalogue-segmentation endpoint Then show error message ``` #### Test Scenario 5 ```gherkin Scenario: As an Admin, I shouldn't be able to add catalogue segmentation using existing segmentation type Given the user has logged in as Admin And warehouseId <A> is for supplier <B> And user logged in as supplier <A> When the user input warehouseId <A> And the user hit post catalogue-segmentation endpoint Then show error message ``` ###### tags: `Sprint 24` `Ecommerce 1` `SSC`