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
fee88346
Unverified
Commit
fee88346
authored
4 years ago
by
Nemanja Glumac
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
#15725 Repro: Summarize on saved question drops user defined metric (#15747)
* Add repro for 15725 * Test both repro steps scenarios
parent
7007d6b7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/metabase/scenarios/question/nested.cy.spec.js
+63
-0
63 additions, 0 deletions
frontend/test/metabase/scenarios/question/nested.cy.spec.js
with
63 additions
and
0 deletions
frontend/test/metabase/scenarios/question/nested.cy.spec.js
+
63
−
0
View file @
fee88346
...
...
@@ -527,6 +527,69 @@ describe("scenarios > question > nested", () => {
cy
.
get
(
"
.ScalarValue
"
).
findByText
(
value
);
}
});
describe
.
skip
(
"
should not remove user defined metric when summarizing based on saved question (metabase#15725)
"
,
()
=>
{
beforeEach
(()
=>
{
cy
.
intercept
(
"
POST
"
,
"
/api/dataset
"
).
as
(
"
dataset
"
);
cy
.
createNativeQuestion
({
name
:
"
15725
"
,
native
:
{
query
:
"
select 'A' as cat, 5 as val
"
},
});
// Window object gets recreated for every `cy.visit`
// See: https://stackoverflow.com/a/65218352/8815185
cy
.
visit
(
"
/question/new
"
,
{
onBeforeLoad
(
win
)
{
cy
.
spy
(
win
.
console
,
"
warn
"
).
as
(
"
consoleWarn
"
);
},
});
cy
.
findByText
(
"
Custom question
"
).
click
();
cy
.
findByText
(
"
Saved Questions
"
).
click
();
cy
.
findByText
(
"
15725
"
).
click
();
cy
.
findByText
(
"
Pick the metric you want to see
"
).
click
();
cy
.
findByText
(
"
Count of rows
"
).
click
();
});
it
(
"
Count of rows AND Sum of VAL by CAT (metabase#15725-1)
"
,
()
=>
{
cy
.
icon
(
"
add
"
)
.
last
()
.
click
();
cy
.
findByText
(
/^Sum of/
).
click
();
cy
.
findByText
(
"
VAL
"
).
click
();
cy
.
findByText
(
"
Sum of VAL
"
);
cy
.
findByText
(
"
Pick a column to group by
"
).
click
();
cy
.
findByText
(
"
CAT
"
).
click
();
cy
.
findByText
(
"
Visualize
"
).
click
();
cy
.
get
(
"
@consoleWarn
"
).
should
(
"
not.be.calledWith
"
,
"
Removing invalid MBQL clause
"
,
);
cy
.
findByText
(
"
Sum of VAL
"
);
});
it
(
"
Count of rows by CAT + add sum of VAL later from the sidebar (metabase#15725-2)
"
,
()
=>
{
cy
.
findByText
(
"
Pick a column to group by
"
).
click
();
cy
.
findByText
(
"
CAT
"
).
click
();
cy
.
findByText
(
"
Visualize
"
).
click
();
cy
.
wait
(
"
@dataset
"
);
cy
.
findAllByRole
(
"
button
"
)
.
contains
(
"
Summarize
"
)
.
click
();
cy
.
findByText
(
"
Add a metric
"
).
click
();
cy
.
findByText
(
/^Sum of/
).
click
();
popover
()
.
findByText
(
"
VAL
"
)
.
click
();
cy
.
wait
(
"
@dataset
"
).
then
(
xhr
=>
{
expect
(
xhr
.
response
.
body
.
error
).
not
.
to
.
exist
;
});
cy
.
get
(
"
@consoleWarn
"
).
should
(
"
not.be.calledWith
"
,
"
Removing invalid MBQL clause
"
,
);
});
});
});
function
ordersJoinProducts
(
name
)
{
...
...
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