Merge pull request #1213 from Safelite/feature/richardson/INSR-9520
INSR-9520
This commit is contained in:
commit
7acf3da77d
3 changed files with 8 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ module.exports = {
|
|||
'!src/helpers/unit-test-helper.js'
|
||||
// END
|
||||
], // ! means exclude from coverage.
|
||||
setupFilesAfterEnv: ['<rootDir>/src/helpers/unit-test-setup-helper.js'],
|
||||
testMatch: ['**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'],
|
||||
coverageThreshold: {
|
||||
// global: {
|
||||
|
|
|
|||
4
src/helpers/unit-test-setup-helper.js
Normal file
4
src/helpers/unit-test-setup-helper.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
beforeEach(() => {
|
||||
// Your shared logic here
|
||||
document.body.innerHTML = '<div id="app"></div>';
|
||||
});
|
||||
|
|
@ -2,6 +2,9 @@ import showIssLoadingModal from '@/helpers/loading-modal-helper';
|
|||
|
||||
export default {
|
||||
mounted() {
|
||||
// The router scroll behavior happens before transitioning to the new page, so we need to manually scroll to top here
|
||||
// to ensure that we are at the top of the page when the new page is loaded.
|
||||
document.getElementById("app").scrollTop = 0;
|
||||
showIssLoadingModal(false);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue