diff options
author | Phil Hughes <me@iamphill.com> | 2017-10-13 18:01:54 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-10-16 13:29:30 +0300 |
commit | 5f80d04271a15c3065513e6417891f3949c7a530 (patch) | |
tree | 0a8a0cb418c93a6817cec8b04255c6d0f7f25d8d /app | |
parent | b1b91aa0658d81107327884ca56f579cf6146078 (diff) |
Spec updates
Updated as best as possible, a lot of tests still change the store
and never reset the state back which can cause some issues with other
tests.
Diffstat (limited to 'app')
3 files changed, 25 insertions, 26 deletions
diff --git a/app/assets/javascripts/repo/components/repo_file.vue b/app/assets/javascripts/repo/components/repo_file.vue index 6236126fad9..905da9ef43c 100644 --- a/app/assets/javascripts/repo/components/repo_file.vue +++ b/app/assets/javascripts/repo/components/repo_file.vue @@ -58,7 +58,7 @@ </td> <template v-if="!isMini"> - <td class="hidden-sm hidden-xs"> + <td class="commit-message hidden-sm hidden-xs"> <a @click.stop :href="file.lastCommit.url" @@ -67,7 +67,7 @@ </a> </td> - <td class="hidden-xs text-right"> + <td class="commit-update hidden-xs text-right"> <span :title="tooltipTitle(file.lastCommit.updatedAt)"> {{ timeFormated(file.lastCommit.updatedAt) }} </span> diff --git a/app/assets/javascripts/repo/components/repo_loading_file.vue b/app/assets/javascripts/repo/components/repo_loading_file.vue index fb82fb260b6..e2f7d3f5dbb 100644 --- a/app/assets/javascripts/repo/components/repo_loading_file.vue +++ b/app/assets/javascripts/repo/components/repo_loading_file.vue @@ -26,29 +26,28 @@ </div> </div> </td> - - <td - v-if="!isMini" - class="hidden-sm hidden-xs"> - <div class="animation-container"> - <div - v-for="n in 6" - :key="n" - :class="lineOfCode(n)"> + <template v-if="!isMini"> + <td + class="hidden-sm hidden-xs"> + <div class="animation-container"> + <div + v-for="n in 6" + :key="n" + :class="lineOfCode(n)"> + </div> </div> - </div> - </td> + </td> - <td - v-if="!isMini" - class="hidden-xs"> - <div class="animation-container animation-container-small animation-container-right"> - <div - v-for="n in 6" - :key="n" - :class="lineOfCode(n)"> + <td + class="hidden-xs"> + <div class="animation-container animation-container-small animation-container-right"> + <div + v-for="n in 6" + :key="n" + :class="lineOfCode(n)"> + </div> </div> - </div> - </td> + </td> + </template> </tr> </template> diff --git a/app/assets/javascripts/repo/components/repo_sidebar.vue b/app/assets/javascripts/repo/components/repo_sidebar.vue index a8eb92b0186..e7c269cdb57 100644 --- a/app/assets/javascripts/repo/components/repo_sidebar.vue +++ b/app/assets/javascripts/repo/components/repo_sidebar.vue @@ -1,4 +1,5 @@ <script> +import _ from 'underscore'; import Service from '../services/repo_service'; import Helper from '../helpers/repo_helper'; import Store from '../stores/repo_store'; @@ -31,7 +32,7 @@ export default { computed: { flattendFiles() { const map = (arr) => { - if (arr && arr.tree.length === 0) { + if (arr && arr.tree && arr.tree.length === 0) { return []; } @@ -79,13 +80,12 @@ export default { Store.setActiveLine(lineNumber); } else { const openFile = Helper.getFileFromPath(file.url); - file.loading = true; if (openFile) { - file.loading = false; Store.setActiveFiles(openFile); Store.setActiveLine(lineNumber); } else { + file.loading = true; Service.url = file.url; Helper.getContent(file) .then(() => { |