refactor(variant-selection): update variant options retrieval to use catalog item's variants and enhance response structure
This commit is contained in:
@@ -342,7 +342,10 @@ class CatalogItemDetailControllerTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('data.valid', true)
|
||||
->assertJsonPath('data.resolved_variant', null)
|
||||
->assertJsonMissingPath('data.variants')
|
||||
->assertJsonCount(3, 'data.variants')
|
||||
->assertJsonPath('data.variants.0.id', $first->id)
|
||||
->assertJsonPath('data.variants.0.values.sector.value', 'A')
|
||||
->assertJsonPath('data.variants.0.values.seat.value', '1')
|
||||
->assertJsonCount(2, 'data.selectors')
|
||||
->assertJsonPath('data.selectors.0.key', 'sector')
|
||||
->assertJsonCount(2, 'data.selectors.0.options')
|
||||
|
||||
Reference in New Issue
Block a user