-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: replace integration page size test with unit tests
- Loading branch information
Showing
17 changed files
with
167 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,13 @@ | ||
import { mapMutations, mapState } from 'vuex' | ||
import { mapMutations } from 'vuex' | ||
|
||
export default { | ||
computed: { | ||
...mapState('Files', ['filesPageLimit']), | ||
|
||
$_filesListPagination_targetRoute() { | ||
return { name: this.$route.name, query: this.$route.query, params: this.$route.params } | ||
}, | ||
|
||
$_filesListPagination_pageItemsLimit: { | ||
get() { | ||
return this.filesPageLimit | ||
}, | ||
|
||
set(value) { | ||
this.SET_FILES_PAGE_LIMIT(value) | ||
this.$_filesListPagination_updateQuery(value) | ||
} | ||
} | ||
}, | ||
|
||
watch: { | ||
$route: { | ||
handler(route) { | ||
if (Object.prototype.hasOwnProperty.call(route.query, 'items-limit')) { | ||
this.SET_FILES_PAGE_LIMIT(route.query['items-limit']) | ||
|
||
return | ||
} | ||
|
||
this.$_filesListPagination_updateQuery() | ||
}, | ||
immediate: true | ||
} | ||
}, | ||
|
||
methods: { | ||
...mapMutations('Files', ['UPDATE_CURRENT_PAGE', 'SET_FILES_PAGE_LIMIT']), | ||
...mapMutations('Files', ['UPDATE_CURRENT_PAGE']), | ||
|
||
$_filesListPagination_updateCurrentPage() { | ||
const page = this.$route.params.page || 1 | ||
|
||
this.UPDATE_CURRENT_PAGE(page) | ||
}, | ||
|
||
$_filesListPagination_updateQuery(limit = this.$_filesListPagination_pageItemsLimit) { | ||
const query = { ...this.$route.query, 'items-limit': limit } | ||
|
||
this.SET_FILES_PAGE_LIMIT(limit) | ||
this.$router.replace({ query }).catch(() => {}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
packages/web-app-files/tests/unit/components/AppBar/AppBar.spec.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.