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
f25d5b15
Unverified
Commit
f25d5b15
authored
1 year ago
by
Nemanja Glumac
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[E2E] Fix segment flake (#34329)
* Fix the flakes for metrics as well
parent
8224e5b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/test/scenarios/admin/datamodel/metrics.cy.spec.js
+1
-12
1 addition, 12 deletions
e2e/test/scenarios/admin/datamodel/metrics.cy.spec.js
e2e/test/scenarios/admin/datamodel/segments.cy.spec.js
+11
-27
11 additions, 27 deletions
e2e/test/scenarios/admin/datamodel/segments.cy.spec.js
with
12 additions
and
39 deletions
e2e/test/scenarios/admin/datamodel/metrics.cy.spec.js
+
1
−
12
View file @
f25d5b15
...
...
@@ -323,17 +323,6 @@ describe("scenarios > admin > datamodel > metrics", () => {
});
});
// Ugly hack to prevent failures that started after https://github.com/metabase/metabase/pull/24682 has been merged.
// For unknon reasons, popover doesn't open with expanded list of all Sample Database tables. Rather. it shows
// Sample Database (collapsed) only. We need to click on it to expand it.
// This conditional mechanism prevents failures even if that popover opens expanded in the future.
function
selectTable
(
tableName
)
{
cy
.
findByText
(
"
Select a table
"
).
click
();
cy
.
get
(
"
.List-section
"
).
then
(
$list
=>
{
if
(
$list
.
length
!==
5
)
{
cy
.
findByText
(
"
Sample Database
"
).
click
();
}
cy
.
findByText
(
tableName
).
click
();
});
popover
().
findByText
(
tableName
).
click
();
}
This diff is collapsed.
Click to expand it.
e2e/test/scenarios/admin/datamodel/segments.cy.spec.js
+
11
−
27
View file @
f25d5b15
...
...
@@ -20,41 +20,25 @@ describe("scenarios > admin > datamodel > segments", () => {
});
describe
(
"
with no segments
"
,
()
=>
{
it
(
"
should
show no segments in UI
"
,
()
=>
{
it
(
"
should
have 'Custom expression' in a filter list (metabase#13069)
"
,
()
=>
{
cy
.
visit
(
"
/admin/datamodel/segments
"
);
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
Segments
"
).
click
();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
cy
.
log
(
"
should initially show no segments in UI
"
);
cy
.
get
(
"
main
"
).
findByText
(
"
Create segments to add them to the Filter dropdown in the query builder
"
,
);
});
it
(
"
should have 'Custom expression' in a filter list (metabase#13069)
"
,
()
=>
{
cy
.
visit
(
"
/admin/datamodel/segments
"
);
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
New segment
"
).
click
();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
Select a table
"
).
click
();
cy
.
button
(
"
New segment
"
).
click
();
// Ugly hack to prevent failures that started after https://github.com/metabase/metabase/pull/24682 has been merged.
// For unknon reasons, popover doesn't open with expanded list of all Sample Database tables. Rather. it shows
// Sample Database (collapsed) only. We need to click on it to expand it.
// This conditional mechanism prevents failures even if that popover opens expanded in the future.
cy
.
get
(
"
.List-section
"
).
then
(
$list
=>
{
if
(
$list
.
length
!==
5
)
{
cy
.
findByText
(
"
Sample Database
"
).
click
();
}
cy
.
findByText
(
"
Orders
"
).
click
();
});
cy
.
get
(
"
.GuiBuilder
"
).
findByText
(
"
Select a table
"
).
click
();
popover
().
findByText
(
"
Orders
"
).
click
();
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
Add filters to narrow your answer
"
).
click
();
cy
.
get
(
"
.GuiBuilder
"
)
.
findByText
(
"
Add filters to narrow your answer
"
)
.
click
();
cy
.
log
(
"
Fails in v0.36.0 and v0.36.3. It exists in v0.35.4
"
);
popover
().
within
(()
=>
{
cy
.
findByText
(
"
Custom Expression
"
);
});
popover
().
findByText
(
"
Custom Expression
"
);
});
it
(
"
should show no segments
"
,
()
=>
{
...
...
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