From 42f040975d09f69739932b683c5163ca45e78d14 Mon Sep 17 00:00:00 2001 From: lana-k Date: Sat, 6 Jan 2024 11:23:23 +0100 Subject: [PATCH] #115 tests --- .../Tab/RunResult/Record/RowNavigator.vue | 9 +- .../Tabs/Tab/RunResult/Record/index.vue | 3 +- .../Tabs/Tab/RunResult/ValueViewer.vue | 2 + .../Main/Workspace/Tabs/Tab/RunResult.spec.js | 159 -------- .../Tabs/Tab/RunResult/Record.spec.js | 116 ++++++ .../Tabs/Tab/RunResult/RunResult.spec.js | 348 ++++++++++++++++++ .../Tabs/Tab/RunResult/ValueViewer.spec.js | 44 +++ 7 files changed, 518 insertions(+), 163 deletions(-) delete mode 100644 tests/views/Main/Workspace/Tabs/Tab/RunResult.spec.js create mode 100644 tests/views/Main/Workspace/Tabs/Tab/RunResult/Record.spec.js create mode 100644 tests/views/Main/Workspace/Tabs/Tab/RunResult/RunResult.spec.js create mode 100644 tests/views/Main/Workspace/Tabs/Tab/RunResult/ValueViewer.spec.js diff --git a/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/RowNavigator.vue b/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/RowNavigator.vue index 9cbe4c1..239d261 100644 --- a/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/RowNavigator.vue +++ b/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/RowNavigator.vue @@ -4,6 +4,7 @@ :disabled="value === 0" tooltip="First row" tooltip-position="top-left" + class="first" @click="$emit('input', 0)" > @@ -12,6 +13,7 @@ :disabled="value === 0" tooltip="Previous row" tooltip-position="top-left" + class="prev" @click="$emit('input', value - 1)" > @@ -20,7 +22,7 @@ :disabled="value === total - 1" tooltip="Next row" tooltip-position="top-left" - class="next-last" + class="next" @click="$emit('input', value + 1)" > @@ -29,7 +31,7 @@ :disabled="value === total - 1" tooltip="Last row" tooltip-position="top-left" - class="next-last" + class="last" @click="$emit('input', total - 1)" > @@ -60,7 +62,8 @@ export default { display: flex; } -.record-navigator .next-last { +.record-navigator .next, +.record-navigator .last { transform: rotate(180deg); } diff --git a/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/index.vue b/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/index.vue index 95c3faa..111afb3 100644 --- a/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/index.vue +++ b/src/views/Main/Workspace/Tabs/Tab/RunResult/Record/index.vue @@ -79,7 +79,8 @@ export default { } }, watch: { - currentRowIndex () { + async currentRowIndex () { + await this.$nextTick() if (this.selectedCellElement) { const previouslySelected = this.selectedCellElement this.selectCell(null) diff --git a/src/views/Main/Workspace/Tabs/Tab/RunResult/ValueViewer.vue b/src/views/Main/Workspace/Tabs/Tab/RunResult/ValueViewer.vue index fb5dd8f..74f2c56 100644 --- a/src/views/Main/Workspace/Tabs/Tab/RunResult/ValueViewer.vue +++ b/src/views/Main/Workspace/Tabs/Tab/RunResult/ValueViewer.vue @@ -6,6 +6,7 @@ :key="format.value" type="button" :aria-selected="currentFormat === format.value" + :class="format.value" @click="currentFormat = format.value" > {{ format.text }} @@ -13,6 +14,7 @@