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
95211f53
Unverified
Commit
95211f53
authored
4 years ago
by
Jessica DeWitt
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Repro/unix timestamp filter (#13085)
* repro complete * deleted skip * prettier file
parent
2fb82580
No related branches found
Branches containing commit
No related tags found
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/dashboard/parameters.cy.spec.js
+61
-1
61 additions, 1 deletion
...d/test/metabase/scenarios/dashboard/parameters.cy.spec.js
with
61 additions
and
1 deletion
frontend/test/metabase/scenarios/dashboard/parameters.cy.spec.js
+
61
−
1
View file @
95211f53
import
{
signInAsAdmin
,
modal
,
popover
,
restore
}
from
"
__support__/cypress
"
;
import
{
signInAsAdmin
,
modal
,
popover
,
restore
,
openOrdersTable
,
}
from
"
__support__/cypress
"
;
// NOTE: some overlap with parameters-embedded.cy.spec.js
describe
(
"
scenarios > dashboard > parameters
"
,
()
=>
{
before
(
restore
);
beforeEach
(
signInAsAdmin
);
it
(
"
should search across multiple fields
"
,
()
=>
{
// create a new dashboard
cy
.
visit
(
"
/
"
);
...
...
@@ -63,6 +70,59 @@ describe("scenarios > dashboard > parameters", () => {
.
last
()
.
contains
(
"
4,939
"
);
});
it
(
"
should filter on a UNIX timestamp
"
,
()
=>
{
// Set datatype of Quantity to UNIX Timestamp
cy
.
visit
(
"
/admin/datamodel/database/1/table/2
"
);
cy
.
findByText
(
"
Quantity
"
).
click
();
cy
.
scrollTo
(
"
bottom
"
);
cy
.
findByText
(
"
UNIX Timestamp (Seconds)
"
).
click
();
// Create a question
openOrdersTable
();
cy
.
findByText
(
"
Summarize
"
).
click
();
cy
.
findByText
(
"
Summarize by
"
);
cy
.
findByText
(
"
Done
"
).
click
();
// Add to a dashboard
cy
.
findByText
(
"
Save
"
).
click
();
cy
.
findAllByText
(
"
Save
"
)
.
last
()
.
click
();
cy
.
findByText
(
"
Yes please!
"
).
click
();
cy
.
findByText
(
"
Create a new dashboard
"
).
click
();
cy
.
findByPlaceholderText
(
"
What is the name of your dashboard?
"
).
type
(
"
Test Dashboard
"
,
);
cy
.
findByText
(
"
Create
"
).
click
();
// Add filter
cy
.
get
(
"
.Icon-funnel_add
"
).
click
();
cy
.
findByText
(
"
Time
"
).
click
();
cy
.
findByText
(
"
Relative Date
"
).
click
();
cy
.
findByText
(
"
Select…
"
).
click
();
cy
.
get
(
"
.List-item .cursor-pointer
"
)
.
first
()
.
click
({
force
:
true
});
cy
.
findByText
(
"
Select…
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
"
Select a default value…
"
).
click
();
cy
.
findByText
(
"
Yesterday
"
).
click
();
// Save dashboard
cy
.
findByText
(
"
Done
"
).
click
();
cy
.
findByText
(
"
Save
"
).
click
({
force
:
true
});
cy
.
findByText
(
"
Save
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
"
0
"
);
// Open dashboard from collections
cy
.
visit
(
"
/collection/root
"
);
cy
.
findByText
(
"
Test Dashboard
"
).
click
();
cy
.
findByText
(
"
Relative Date
"
);
cy
.
findByText
(
"
18,760
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
"
0
"
);
});
});
function
selectFilter
(
selection
,
filterName
)
{
...
...
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