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
3dfc0373
Unverified
Commit
3dfc0373
authored
2 years ago
by
Nemanja Glumac
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add repro for #21559 [ci skip] (#21595)
parent
6088e23c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/metabase/scenarios/sharing/reproductions/21559-subscription-bar-sent-as-scalar.cy.spec.js
+80
-0
80 additions, 0 deletions
...ductions/21559-subscription-bar-sent-as-scalar.cy.spec.js
with
80 additions
and
0 deletions
frontend/test/metabase/scenarios/sharing/reproductions/21559-subscription-bar-sent-as-scalar.cy.spec.js
0 → 100644
+
80
−
0
View file @
3dfc0373
import
{
restore
,
visitDashboard
,
editDashboard
,
saveDashboard
,
setupSMTP
,
}
from
"
__support__/e2e/cypress
"
;
import
{
USERS
}
from
"
__support__/e2e/cypress_data
"
;
import
{
SAMPLE_DATABASE
}
from
"
__support__/e2e/cypress_sample_database
"
;
const
{
admin
}
=
USERS
;
const
{
ORDERS
,
ORDERS_ID
,
PRODUCTS
,
PRODUCTS_ID
}
=
SAMPLE_DATABASE
;
const
q1Details
=
{
name
:
"
21559-1
"
,
query
:
{
"
source-table
"
:
ORDERS_ID
,
aggregation
:
[[
"
avg
"
,
[
"
field
"
,
ORDERS
.
TOTAL
,
null
]]],
},
display
:
"
scalar
"
,
};
const
q2Details
=
{
name
:
"
21559-2
"
,
query
:
{
"
source-table
"
:
PRODUCTS_ID
,
aggregation
:
[[
"
avg
"
,
[
"
field
"
,
PRODUCTS
.
PRICE
,
null
]]],
},
display
:
"
scalar
"
,
};
describe
.
skip
(
"
issue 21559
"
,
()
=>
{
beforeEach
(()
=>
{
cy
.
intercept
(
"
POST
"
,
"
/api/pulse/test
"
).
as
(
"
emailSent
"
);
restore
();
cy
.
signInAsAdmin
();
setupSMTP
();
cy
.
createQuestionAndDashboard
({
questionDetails
:
q1Details
,
}).
then
(({
body
:
{
dashboard_id
}
})
=>
{
cy
.
createQuestion
(
q2Details
);
visitDashboard
(
dashboard_id
);
editDashboard
();
});
});
it
(
"
should respect dashboard card visualization (metabase#21559)
"
,
()
=>
{
cy
.
findByTestId
(
"
add-series-button
"
).
click
({
force
:
true
});
cy
.
findByText
(
q2Details
.
name
).
click
();
cy
.
get
(
"
.AddSeriesModal
"
).
within
(()
=>
{
cy
.
findByText
(
"
Done
"
).
click
();
});
// Make sure visualization changed to bars
cy
.
get
(
"
.bar
"
).
should
(
"
have.length
"
,
2
);
saveDashboard
();
cy
.
icon
(
"
subscription
"
).
click
();
cy
.
findByText
(
"
Email it
"
).
click
();
cy
.
findByPlaceholderText
(
"
Enter user names or email addresses
"
)
.
click
()
.
type
(
`
${
admin
.
first_name
}
${
admin
.
last_name
}
{enter}`
)
.
blur
();
// blur is needed to close the popover
cy
.
findByText
(
"
Send email now
"
).
click
();
cy
.
wait
(
"
@emailSent
"
);
cy
.
request
(
"
GET
"
,
"
http://localhost:80/email
"
).
then
(({
body
})
=>
{
expect
(
body
[
0
].
html
).
to
.
include
(
"
img
"
);
// Bar chart is sent as img (inline attachment)
expect
(
body
[
0
].
html
).
not
.
to
.
include
(
"
80.52
"
);
// Scalar displays its value in HTML
});
});
});
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