Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmholtz Centre for Environmental Research – UFZ
IT
RDM
BioMe
tmd
frontend
Commits
8e27d1a1
Commit
8e27d1a1
authored
3 years ago
by
Moustafa Banqusli
Browse files
Options
Downloads
Patches
Plain Diff
#373
test diagrams error message
parent
f163f8c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!444
Develop into Master
,
!352
Resolve "3 Diagramme für Funde hinzufügen"
Pipeline
#421643
passed
3 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/components/shared/sharedFilter/FilterHistoryDiagramCard.vue
+2
-2
2 additions, 2 deletions
...mponents/shared/sharedFilter/FilterHistoryDiagramCard.vue
app/tests/unit/FilterHistoryDiagramCard.spec.ts
+49
-0
49 additions, 0 deletions
app/tests/unit/FilterHistoryDiagramCard.spec.ts
with
51 additions
and
2 deletions
app/src/components/shared/sharedFilter/FilterHistoryDiagramCard.vue
+
2
−
2
View file @
8e27d1a1
...
...
@@ -2,7 +2,7 @@
<v-row>
<v-col
cols=
"12"
>
<v-card>
<v-card-title>
<v-card-title
data-testid=
"CardTitle"
>
{{
title
}}
</v-card-title>
...
...
@@ -14,7 +14,7 @@
{{
$t
(
"
sharedTable.selectedAreaDiagram
"
)
}}
</div>
<v-container
class=
"justify-center"
fluid
>
<v-alert
v-show=
"showFailAlert"
dismissible
transition=
"fade-transition"
type=
"error"
>
<v-alert
v-show=
"showFailAlert"
dismissible
transition=
"fade-transition"
data-testid=
"ErrorMessage"
type=
"error"
>
{{
errorMessage
}}
</v-alert>
</v-container>
...
...
This diff is collapsed.
Click to expand it.
app/tests/unit/FilterHistoryDiagramCard.spec.ts
0 → 100644
+
49
−
0
View file @
8e27d1a1
import
{
expect
}
from
"
chai
"
;
import
{
Locales
}
from
"
@/i18n/locales
"
;
import
{
createLocalVue
,
mount
}
from
"
@vue/test-utils
"
;
import
{
setupI18n
}
from
"
@/plugins/i18n
"
;
import
vuetify
from
"
@/plugins/vuetify
"
;
import
VueRouter
from
"
vue-router
"
;
import
FilterHistoryDiagramsCard
from
"
@/components/shared/sharedFilter/FilterHistoryDiagramCard.vue
"
;
declare
const
global
:
any
;
describe
(
"
FilterHistoryDiagramsCard.vue
"
,
()
=>
{
global
.
requestAnimationFrame
=
(
cb
:
any
)
=>
cb
();
let
wrapper
:
any
=
null
;
beforeEach
(()
=>
{
const
localVue
=
createLocalVue
();
localVue
.
use
(
VueRouter
);
const
router
=
new
VueRouter
();
const
i18n
=
setupI18n
(
localVue
);
i18n
.
locale
=
Locales
.
DE
;
wrapper
=
mount
(
FilterHistoryDiagramsCard
,
{
i18n
,
localVue
,
vuetify
,
router
,
stubs
:
[
"
VegaLite
"
],
mocks
:
{
$auth
:
{
isAuthenticated
:
true
,
},
},
propsData
:
{
title
:
"
InspectionCount
"
,
errorMessage
:
"
Error
"
,
showFailAlert
:
true
,
},
});
});
afterEach
(()
=>
{
wrapper
=
null
;
});
it
(
"
FilterHistoryDiagramCard should show error messages and card-title
"
,
()
=>
{
expect
(
wrapper
.
find
(
"
[data-testid='CardTitle']
"
).
exists
()).
to
.
equal
(
true
);
expect
(
wrapper
.
find
(
"
[data-testid='ErrorMessage']
"
).
exists
()).
to
.
equal
(
true
);
expect
(
wrapper
.
vm
.
$props
.
errorMessage
).
to
.
equal
(
"
Error
"
);
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment