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
8eb105c7
Unverified
Commit
8eb105c7
authored
4 months ago
by
Aleksandr Lesnenko
Committed by
GitHub
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
update subscription checkboxes (#49805)
* update subscription checkboxes * update spec
parent
db0f9119
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/test/scenarios/sharing/subscriptions.cy.spec.js
+2
-1
2 additions, 1 deletion
e2e/test/scenarios/sharing/subscriptions.cy.spec.js
frontend/src/metabase/sharing/components/EmailAttachmentPicker.jsx
+7
-16
7 additions, 16 deletions
...src/metabase/sharing/components/EmailAttachmentPicker.jsx
with
9 additions
and
17 deletions
e2e/test/scenarios/sharing/subscriptions.cy.spec.js
+
2
−
1
View file @
8eb105c7
...
...
@@ -332,7 +332,8 @@ describe("scenarios > dashboard > subscriptions", () => {
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
Questions to attach
"
);
cy
.
findAllByRole
(
"
listitem
"
)
.
contains
(
"
Orders
"
)
// yields the whole <li> element
.
contains
(
"
Orders
"
)
.
closest
(
"
li
"
)
.
within
(()
=>
{
cy
.
findByRole
(
"
checkbox
"
).
should
(
"
be.checked
"
);
});
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/sharing/components/EmailAttachmentPicker.jsx
+
7
−
16
View file @
8eb105c7
...
...
@@ -5,11 +5,9 @@ import { t } from "ttag";
import
_
from
"
underscore
"
;
import
{
ExportSettingsWidget
}
from
"
metabase/common/components/ExportSettingsWidget
"
;
import
{
StackedCheckBox
}
from
"
metabase/components/StackedCheckBox
"
;
import
CheckBox
from
"
metabase/core/components/CheckBox
"
;
import
Toggle
from
"
metabase/core/components/Toggle
"
;
import
CS
from
"
metabase/css/core/index.css
"
;
import
{
Box
,
Group
,
Icon
,
Text
}
from
"
metabase/ui
"
;
import
{
Box
,
Checkbox
,
Group
,
Icon
,
Text
}
from
"
metabase/ui
"
;
export
default
class
EmailAttachmentPicker
extends
Component
{
DEFAULT_ATTACHMENT_TYPE
=
"
csv
"
;
...
...
@@ -269,7 +267,6 @@ export default class EmailAttachmentPicker extends Component {
</
Box
>
<
div
className
=
{
cx
(
CS
.
textBold
,
CS
.
pt1
,
CS
.
pb2
,
CS
.
flex
,
...
...
@@ -288,7 +285,8 @@ export default class EmailAttachmentPicker extends Component {
CS
.
borderBottom
,
)
}
>
<
StackedCheckBox
<
Checkbox
variant
=
"stacked"
label
=
{
t
`Questions to attach`
}
checked
=
{
this
.
areAllSelected
(
cards
,
selectedCardIds
)
}
indeterminate
=
{
this
.
areOnlySomeSelected
(
...
...
@@ -299,22 +297,15 @@ export default class EmailAttachmentPicker extends Component {
/>
</
li
>
{
cards
.
map
(
card
=>
(
<
li
key
=
{
card
.
id
}
className
=
{
cx
(
CS
.
pb2
,
CS
.
flex
,
CS
.
alignCenter
,
CS
.
cursorPointer
,
)
}
>
<
CheckBox
<
li
key
=
{
card
.
id
}
>
<
Checkbox
mb
=
"1rem"
mr
=
"0.5rem"
checked
=
{
selectedCardIds
.
has
(
card
.
id
)
}
label
=
{
card
.
name
}
onChange
=
{
()
=>
{
this
.
onToggleCard
(
card
);
}
}
className
=
{
CS
.
mr1
}
/>
</
li
>
))
}
...
...
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