Skip to content

Commit fcfe9bf

Browse files
committed
test: fixes
1 parent f3bc84e commit fcfe9bf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/composables/useLink.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ export function useLink (props) {
9494
)
9595

9696
const navigate = e => {
97-
const route = resolvedRoute.value.route
97+
const href = resolvedRoute.value.route
9898
if (guardEvent(e)) {
9999
return props.replace
100-
? router.replace(route.value)
101-
: router.push(route.value)
100+
? router.replace(href)
101+
: router.push(href)
102102
}
103103
return Promise.resolve()
104104
}

test/e2e/specs/composables.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@ module.exports = {
3030
browser
3131
.url('http://localhost:8080/composables/')
3232
.waitForElementVisible('#app', 1000)
33-
.assert.containsText('.view', 'Home')
3433

34+
.assert.containsText('.view', 'Home')
3535
.assert.containsText('#nested-active', '/composables/nested: false, false')
3636
.click('li:nth-child(3) a')
37+
.assert.containsText('.view', 'NestedEmpty')
3738
.assert.containsText('#nested-active', '/composables/nested: true, true')
3839
.click('li:nth-child(4) a')
40+
.assert.containsText('.view', 'NestedA')
3941
.assert.containsText('#nested-active', '/composables/nested: true, false')
4042
.click('#nested-active')
43+
.assert.containsText('.view', 'NestedEmpty')
4144
.assert.containsText('#nested-active', '/composables/nested: true, true')
4245

4346
.end()

0 commit comments

Comments
 (0)