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
887b34c5
Unverified
Commit
887b34c5
authored
2 years ago
by
Nemanja Glumac
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Repro #27768: CC dashboard filter appears disconnected (#27791)
parent
1e97b53c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/test/metabase/scenarios/dashboard-filters/reproductions/27768-cc-filter-appears-disconnected.cy.spec.js
+73
-0
73 additions, 0 deletions
...oductions/27768-cc-filter-appears-disconnected.cy.spec.js
with
73 additions
and
0 deletions
frontend/test/metabase/scenarios/dashboard-filters/reproductions/27768-cc-filter-appears-disconnected.cy.spec.js
0 → 100644
+
73
−
0
View file @
887b34c5
import
{
restore
,
popover
,
visitDashboard
,
editDashboard
,
saveDashboard
,
filterWidget
,
}
from
"
__support__/e2e/helpers
"
;
import
{
SAMPLE_DATABASE
}
from
"
__support__/e2e/cypress_sample_database
"
;
const
{
PRODUCTS_ID
,
PRODUCTS
}
=
SAMPLE_DATABASE
;
const
questionDetails
=
{
name
:
"
27768
"
,
query
:
{
"
source-table
"
:
PRODUCTS_ID
,
limit
:
5
,
expressions
:
{
CCategory
:
[
"
field
"
,
PRODUCTS
.
CATEGORY
,
null
]
},
},
};
const
filter
=
{
name
:
"
Cat
"
,
slug
:
"
cat
"
,
id
:
"
b3b436dd
"
,
type
:
"
string/=
"
,
sectionId
:
"
string
"
,
};
describe
.
skip
(
"
issue 27768
"
,
()
=>
{
beforeEach
(()
=>
{
restore
();
cy
.
signInAsAdmin
();
cy
.
createQuestionAndDashboard
({
questionDetails
}).
then
(
({
body
:
{
dashboard_id
}
})
=>
{
cy
.
request
(
"
PUT
"
,
`/api/dashboard/
${
dashboard_id
}
`
,
{
parameters
:
[
filter
],
});
visitDashboard
(
dashboard_id
,
{
queryParams
:
{
cat
:
"
Gizmo
"
}
});
},
);
});
it
(
"
filter connected to custom column should visually indicate it is connected (metabase#27768)
"
,
()
=>
{
// We need to manually connect the filter to the custom column using the UI,
// but when we fix the issue, it should be safe to do this via API
editDashboard
();
getFilterOptions
(
filter
.
name
);
cy
.
findByText
(
"
Select…
"
).
click
();
popover
().
contains
(
"
CCategory
"
).
click
();
saveDashboard
();
filterWidget
().
click
();
cy
.
findByPlaceholderText
(
"
Enter some text
"
).
type
(
"
Gizmo
"
).
blur
();
cy
.
button
(
"
Add filter
"
).
click
();
cy
.
findAllByText
(
"
Doohickey
"
).
should
(
"
not.exist
"
);
// Make sure the filter is still connected to the custom column
editDashboard
();
getFilterOptions
(
filter
.
name
);
cy
.
findByText
(
"
Select…
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
"
Column to filter on
"
).
parent
().
contains
(
"
Product.CCategory
"
);
});
});
function
getFilterOptions
(
filterName
)
{
cy
.
findByText
(
filterName
).
find
(
"
.Icon-gear
"
).
click
();
}
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