Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
Engineering Digital Service
Metabase
Commits
a2d90053
Unverified
Commit
a2d90053
authored
7 years ago
by
Kyle Doherty
Browse files
Options
Downloads
Patches
Plain Diff
add field x-ray test
parent
48b684fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/xray/xray.integ.spec.js
+28
-5
28 additions, 5 deletions
frontend/test/xray/xray.integ.spec.js
with
28 additions
and
5 deletions
frontend/test/xray/xray.integ.spec.js
+
28
−
5
View file @
a2d90053
...
...
@@ -8,16 +8,24 @@ import {
}
from
"
__support__/enzyme_utils
"
import
{
mount
}
from
"
enzyme
"
;
import
{
CardApi
,
SegmentApi
,
SettingsApi
}
from
"
metabase/services
"
;
import
{
CardApi
,
SegmentApi
,
SettingsApi
}
from
"
metabase/services
"
;
import
{
delay
}
from
"
metabase/lib/promise
"
;
import
{
FETCH_XRAY
,
LOAD_XRAY
}
from
"
metabase/xray/xray
"
;
import
FieldXray
from
"
metabase/xray/containers/FieldXray
"
;
import
TableXRay
from
"
metabase/xray/containers/TableXRay
"
;
import
SegmentXRay
from
"
metabase/xray/containers/SegmentXRay
"
;
import
CardXRay
from
"
metabase/xray/containers/CardXRay
"
;
import
CostSelect
from
"
metabase/xray/components/CostSelect
"
;
import
Constituent
from
"
metabase/xray/components/Constituent
"
;
import
SegmentXRay
from
"
metabase/xray/containers/SegmentXRay
"
;
import
Question
from
"
metabase-lib/lib/Question
"
;
import
CardXRay
from
"
metabase/xray/containers/CardXRay
"
;
import
*
as
Urls
from
"
metabase/lib/urls
"
;
import
{
INITIALIZE_QB
,
QUERY_COMPLETED
}
from
"
metabase/query_builder/actions
"
;
import
ActionsWidget
from
"
metabase/query_builder/components/ActionsWidget
"
;
...
...
@@ -72,8 +80,8 @@ describe("xray integration tests", () => {
await
SettingsApi
.
put
({
key
:
'
enable-xrays
'
},
true
)
})
describe
(
"
for
table xray
"
,
async
()
=>
{
it
(
"
should render the table xray page without errors
"
,
async
()
=>
{
describe
(
"
table x
-
ray
s
"
,
async
()
=>
{
it
(
"
should render the table x
-
ray page without errors
"
,
async
()
=>
{
const
store
=
await
createTestStore
()
store
.
pushPath
(
`/xray/table/1/approximate`
);
...
...
@@ -88,6 +96,21 @@ describe("xray integration tests", () => {
})
})
describe
(
"
field x-rays
"
,
async
()
=>
{
it
(
"
should render the field x-ray page without errors
"
,
async
()
=>
{
const
store
=
await
createTestStore
()
store
.
pushPath
(
`/xray/field/1/approximate`
);
const
app
=
mount
(
store
.
getAppContainer
());
await
store
.
waitForActions
(
FETCH_XRAY
,
LOAD_XRAY
,
{
timeout
:
20000
})
const
fieldXRay
=
app
.
find
(
FieldXray
)
expect
(
fieldXRay
.
length
).
toBe
(
1
)
expect
(
fieldXRay
.
find
(
CostSelect
).
length
).
toBe
(
1
)
})
})
// NOTE Atte Keinänen 8/24/17: I wanted to test both QB action widget xray action and the card/segment xray pages
// in the same tests so that we see that end-to-end user experience matches our expectations
...
...
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