-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
487 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {describe, it, expect, beforeEach} from 'vitest'; | ||
import {mount} from '@vue/test-utils'; | ||
import {useAppStateStore} from '@/stores/appState'; | ||
import StatsView from '@/views/StatsView.vue'; | ||
|
||
describe('StatsView', () => { | ||
beforeEach(() => { | ||
const appStateStore = useAppStateStore(); | ||
appStateStore.disableCharts = true; | ||
}); | ||
|
||
it('mounts', () => { | ||
const wrapper = mount(StatsView); | ||
expect(wrapper.html()).toMatchSnapshot(); | ||
}); | ||
}); |
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
113 changes: 113 additions & 0 deletions
113
src/components/__tests__/__snapshots__/StatsView.spec.ts.snap
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 |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`StatsView > mounts 1`] = ` | ||
"<div data-v-ff4a98e6="" data-v-a19ac338="" class="v-card v-theme--customLight v-card--density-default v-card--rounded v-card--variant-elevated" style="background-color: rgba(255, 255, 255, 0.75);"> | ||
<!----> | ||
<div class="v-card__loader"> | ||
<div class="v-progress-linear v-theme--customLight v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100"> | ||
<!----> | ||
<div class="v-progress-linear__background"></div> | ||
<div class="v-progress-linear__buffer" style="width: 0%;"></div> | ||
<transition-stub name="fade-transition" appear="false" persisted="false" css="true"> | ||
<div class="v-progress-linear__indeterminate"> | ||
<div class="v-progress-linear__indeterminate long"></div> | ||
<div class="v-progress-linear__indeterminate short"></div> | ||
</div> | ||
</transition-stub> | ||
<!----> | ||
</div> | ||
</div> | ||
<!----> | ||
<!----> | ||
<div data-v-ff4a98e6="" class="v-card-title d-print-none"> | ||
<h1 data-v-ff4a98e6="" class="text-h4">Statistics</h1> | ||
</div> | ||
<div data-v-ff4a98e6="" class="v-card-text"> | ||
<p data-v-ff4a98e6="" class="d-flex align-center d-print-none mb-4"><i data-v-ff4a98e6="" class="v-icon notranslate v-theme--customLight v-icon--size-default" aria-hidden="true"><svg class="v-icon__svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true"> | ||
<path d="M13 9H11V7H13V9M13 17H11V11H13V17M5 3H19C20.1 3 21 3.89 21 5V19C21 19.53 20.79 20.04 20.41 20.41C20.04 20.79 19.53 21 19 21H5C4.47 21 3.96 20.79 3.59 20.41C3.21 20.04 3 19.53 3 19V5C3 3.89 3.89 3 5 3M19 19V5H5V19H19Z"></path> | ||
</svg></i><span data-v-ff4a98e6="" class="ml-4">The statistics are updated automatically as you add and complete trainings.</span></p> | ||
<div data-v-a19ac338="" class="v-row justify-center" wrap=""> | ||
<div data-v-a19ac338="" class="v-col stats__chart"> | ||
<!--v-if--> | ||
<table class="d-sr-only" id="activity-chart-table"> | ||
<caption>Training activities</caption> | ||
<thead> | ||
<tr> | ||
<!--v-if--> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr></tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div data-v-a19ac338="" class="v-col stats__chart"> | ||
<!--v-if--> | ||
<table class="d-sr-only" id="intensity-chart-table"> | ||
<caption>Intensity of trainings</caption> | ||
<thead> | ||
<tr> | ||
<!--v-if--> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr></tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div data-v-a19ac338="" class="v-col stats__chart"> | ||
<!--v-if--> | ||
<table class="d-sr-only" id="rating-chart-table"> | ||
<caption>Ratings</caption> | ||
<thead> | ||
<tr> | ||
<!--v-if--> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr></tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div data-v-a19ac338="" class="v-row"> | ||
<div data-v-a19ac338="" class="v-col stats__wide-chart"> | ||
<!--v-if--> | ||
<table class="d-sr-only" id="weekly-trainings-chart-table"> | ||
<caption>Weekly trainings</caption> | ||
<thead> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<th>Total trainings</th> | ||
</tr> | ||
<tr> | ||
<th>Completed trainings</th> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div data-v-a19ac338="" class="v-row"> | ||
<div data-v-a19ac338="" class="v-col stats__wide-chart"> | ||
<!--v-if--> | ||
<table class="d-sr-only" id="weekly-summary-chart-table"> | ||
<caption>Weekly summary</caption> | ||
<thead> | ||
<tr> | ||
<td></td> | ||
</tr> | ||
</thead> | ||
<tbody></tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
<!--v-if--> | ||
<!----> | ||
<!----><span class="v-card__underlay"></span> | ||
</div>" | ||
`; |
Oops, something went wrong.