Skip to content

Commit 8f036df

Browse files
committed
test: fix tests
1 parent 5c329b2 commit 8f036df

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test-e2e/limit/daily-time.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('Daily time limit', () => {
4646
const descEl = shadow?.shadowRoot?.querySelector('#app .el-descriptions:not([style*="display: none"])')
4747
const trs = descEl?.querySelectorAll('tr')
4848
const name = trs?.[0]?.querySelector('td:nth-child(2)')?.textContent
49-
const timeStr = trs?.[2]?.querySelector('td:nth-child(2) .el-tag--danger')?.textContent
49+
const timeStr = trs?.[3]?.querySelector('td:nth-child(2) .el-tag--danger')?.textContent
5050
return { name, time: parseInt(timeStr?.replace('s', '').trim() ?? '0') }
5151
})
5252
expect(name).toEqual(demoRule.name)

test-e2e/limit/daily-visit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('Daily time limit', () => {
4242
const descEl = shadow!.shadowRoot!.querySelector('#app .el-descriptions:not([style*="display: none"])')
4343
const trs = descEl!.querySelectorAll('tr')
4444
const name = trs[0].querySelector('td:nth-child(2)')!.textContent
45-
const count = trs[2].querySelector('td:nth-child(2) .el-tag--danger')!.textContent
45+
const count = trs[3].querySelector('td:nth-child(2) .el-tag--danger')!.textContent
4646
return { name, count }
4747
})
4848

0 commit comments

Comments
 (0)