Skip to content

Commit

Permalink
test: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 22, 2022
1 parent f3bc84e commit fcfe9bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/composables/useLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export function useLink (props) {
)

const navigate = e => {
const route = resolvedRoute.value.route
const href = resolvedRoute.value.route
if (guardEvent(e)) {
return props.replace
? router.replace(route.value)
: router.push(route.value)
? router.replace(href)
: router.push(href)
}
return Promise.resolve()
}
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/specs/composables.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ module.exports = {
browser
.url('http://localhost:8080/composables/')
.waitForElementVisible('#app', 1000)
.assert.containsText('.view', 'Home')

.assert.containsText('.view', 'Home')
.assert.containsText('#nested-active', '/composables/nested: false, false')
.click('li:nth-child(3) a')
.assert.containsText('.view', 'NestedEmpty')
.assert.containsText('#nested-active', '/composables/nested: true, true')
.click('li:nth-child(4) a')
.assert.containsText('.view', 'NestedA')
.assert.containsText('#nested-active', '/composables/nested: true, false')
.click('#nested-active')
.assert.containsText('.view', 'NestedEmpty')
.assert.containsText('#nested-active', '/composables/nested: true, true')

.end()
Expand Down

0 comments on commit fcfe9bf

Please sign in to comment.