test(frontend): align admin usage typing with upstream model
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -39,6 +39,7 @@ const DataTableStub = {
|
||||
template: `
|
||||
<div>
|
||||
<div v-for="row in data" :key="row.request_id">
|
||||
<slot name="cell-model" :row="row" :value="row.model" />
|
||||
<slot name="cell-cost" :row="row" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,4 +109,42 @@ describe('admin UsageTable tooltip', () => {
|
||||
expect(text).toContain('$30.0000 / 1M tokens')
|
||||
expect(text).toContain('$0.069568')
|
||||
})
|
||||
|
||||
it('shows requested and upstream models separately for admin rows', () => {
|
||||
const row = {
|
||||
request_id: 'req-admin-model-1',
|
||||
model: 'claude-sonnet-4',
|
||||
upstream_model: 'claude-sonnet-4-20250514',
|
||||
actual_cost: 0,
|
||||
total_cost: 0,
|
||||
account_rate_multiplier: 1,
|
||||
rate_multiplier: 1,
|
||||
input_cost: 0,
|
||||
output_cost: 0,
|
||||
cache_creation_cost: 0,
|
||||
cache_read_cost: 0,
|
||||
input_tokens: 0,
|
||||
output_tokens: 0,
|
||||
}
|
||||
|
||||
const wrapper = mount(UsageTable, {
|
||||
props: {
|
||||
data: [row],
|
||||
loading: false,
|
||||
columns: [],
|
||||
},
|
||||
global: {
|
||||
stubs: {
|
||||
DataTable: DataTableStub,
|
||||
EmptyState: true,
|
||||
Icon: true,
|
||||
Teleport: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const text = wrapper.text()
|
||||
expect(text).toContain('claude-sonnet-4')
|
||||
expect(text).toContain('claude-sonnet-4-20250514')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user