Skip to content

Commit

Permalink
Fix tests breaking due to new columns
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 committed Sep 21, 2023
1 parent 2380be6 commit 274569f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions extension/src/test/fixtures/expShow/base/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const nestedParamsFile = join('nested', 'params.yaml')

export const dataColumnOrder: string[] = [
'id',
'branch',
'commit',
'Created',
'metrics:summary.json:accuracy',
'metrics:summary.json:loss',
Expand Down
5 changes: 3 additions & 2 deletions extension/src/test/suite/experiments/columns/tree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ suite('Experiments Columns Tree Test Suite', () => {

const firstColumns = []
const otherColumns = []
const defaultColumns = ['id', 'branch', 'commit']
for (const column of columnsOrder) {
if (column === 'id') {
if (defaultColumns.includes(column)) {
continue
}
if (
Expand Down Expand Up @@ -410,7 +411,7 @@ suite('Experiments Columns Tree Test Suite', () => {
])

expect(columnsModel.getColumnOrder()).to.deep.equal([
'id',
...defaultColumns,
...firstColumns,
...otherColumns
])
Expand Down
10 changes: 8 additions & 2 deletions extension/src/test/suite/experiments/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,12 @@ suite('Experiments Test Suite', () => {
})
await messageSent

const [id, firstColumn] = messageSpy.lastCall.args[0].columnOrder
const [id, branch, commit, firstColumn] =
messageSpy.lastCall.args[0].columnOrder

expect(id).to.equal('id')
expect(commit).to.equal('commit')
expect(branch).to.equal('branch')
expect(firstColumn).to.equal(movedColumn)
}).timeout(WEBVIEW_TEST_TIMEOUT)

Expand Down Expand Up @@ -1126,8 +1129,11 @@ suite('Experiments Test Suite', () => {

expect(paramsYamlColumns).to.be.greaterThan(6)

const [id, ...columns] = messageSpy.lastCall.args[0].columnOrder
const [id, branch, commit, ...columns] =
messageSpy.lastCall.args[0].columnOrder
expect(id).to.equal('id')
expect(branch).to.equal('branch')
expect(commit).to.equal('commit')

let params = 0
let other = 0
Expand Down

0 comments on commit 274569f

Please sign in to comment.