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
7136c342
Unverified
Commit
7136c342
authored
3 years ago
by
Nemanja Glumac
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Refactor pulse specs (#18603)
parent
497f433d
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
frontend/test/metabase/scenarios/collections/collections.cy.spec.js
+0
-61
0 additions, 61 deletions
...est/metabase/scenarios/collections/collections.cy.spec.js
frontend/test/metabase/scenarios/sharing/pulse.cy.spec.js
+6
-18
6 additions, 18 deletions
frontend/test/metabase/scenarios/sharing/pulse.cy.spec.js
with
6 additions
and
79 deletions
frontend/test/metabase/scenarios/collections/collections.cy.spec.js
+
0
−
61
View file @
7136c342
import
_
from
"
underscore
"
;
import
{
restore
,
setupLocalHostEmail
,
modal
,
popover
,
openOrdersTable
,
...
...
@@ -29,7 +28,6 @@ const [admin, collection, sub_collection] = [
},
];
const
pulse_name
=
"
Test pulse
"
;
const
dashboard_name
=
"
Test Dashboard
"
;
describe
(
"
scenarios > collection_defaults
"
,
()
=>
{
...
...
@@ -179,29 +177,6 @@ describe("scenarios > collection_defaults", () => {
});
});
// [quarantine]: cannot run tests that rely on email setup in CI (yet)
describe
.
skip
(
"
a new pulse
"
,
()
=>
{
it
(
"
should be in the root collection
"
,
()
=>
{
// Configure email
cy
.
visit
(
"
/admin/settings/email
"
);
setupLocalHostEmail
();
// Make new pulse
createPulse
();
// Check for pulse in root collection
cy
.
visit
(
"
/collection/root
"
);
cy
.
findByText
(
"
My personal collection
"
).
then
(()
=>
{
cy
.
icon
(
"
pulse
"
);
});
// cy.request("/api/pulse").then((response) => {
// // *** Should the value here really be nll or should it be "root"?
// expect(response.body[0].collection_id).to.have.value(null);
// });
});
});
describe
(
"
a new dashboard
"
,
()
=>
{
it
(
"
should be in the root collection
"
,
()
=>
{
// Make new dashboard and check collection name
...
...
@@ -219,24 +194,6 @@ describe("scenarios > collection_defaults", () => {
cy
.
signInAsNormalUser
();
});
// [quarantine]: cannot run tests that rely on email setup in CI (yet)
describe
.
skip
(
"
a new pulse
"
,
()
=>
{
beforeEach
(()
=>
{
cy
.
visit
(
"
/admin/settings/email
"
);
setupLocalHostEmail
();
});
it
(
"
should be in the root collection
"
,
()
=>
{
// Make new pulse
createPulse
();
// Check for pulse in root collection
cy
.
visit
(
"
/collection/root
"
);
cy
.
findByText
(
"
My personal collection
"
);
cy
.
icon
(
"
pulse
"
);
});
});
describe
(
"
a new dashboard
"
,
()
=>
{
it
(
"
should be in the root collection
"
,
()
=>
{
// Make new dashboard and check collection name
...
...
@@ -609,24 +566,6 @@ describe("scenarios > collection_defaults", () => {
});
});
function
createPulse
()
{
cy
.
visit
(
"
/pulse/create
"
);
cy
.
findByPlaceholderText
(
"
Important metrics
"
).
type
(
pulse_name
);
cy
.
findByText
(
"
Select a question
"
).
click
();
cy
.
findByText
(
"
Orders
"
).
click
();
cy
.
findByPlaceholderText
(
"
Enter email addresses you'd like this data to go to
"
,
)
.
click
()
.
clear
();
cy
.
contains
(
"
Bobby
"
).
click
();
cy
.
findByText
(
"
To:
"
).
click
();
cy
.
findByText
(
"
Robert Tableton
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
"
Bobby Tables
"
);
cy
.
findByText
(
"
Create pulse
"
).
click
();
}
function
openEllipsisMenuFor
(
item
)
{
cy
.
findByText
(
item
)
.
closest
(
"
tr
"
)
...
...
This diff is collapsed.
Click to expand it.
frontend/test/metabase/scenarios/sharing/pulse.cy.spec.js
+
6
−
18
View file @
7136c342
import
{
restore
}
from
"
__support__/e2e/cypress
"
;
const
MOCK_PULSE_FORM_INPUT
=
{
channels
:
{
email
:
{
type
:
"
email
"
,
name
:
"
Email
"
,
allows_recipients
:
true
,
configured
:
true
,
recipients
:
[
"
user
"
,
"
email
"
],
schedules
:
[
"
daily
"
,
"
weekly
"
,
"
monthly
"
],
},
},
};
import
{
restore
,
setupSMTP
}
from
"
__support__/e2e/cypress
"
;
describe
(
"
scenarios > pulse
"
,
()
=>
{
beforeEach
(()
=>
{
restore
();
cy
.
signInAsAdmin
();
setupSMTP
();
});
it
(
"
should be able get to the new pulse page from the nav bar
"
,
()
=>
{
cy
.
visit
(
"
/
"
);
...
...
@@ -28,9 +17,6 @@ describe("scenarios > pulse", () => {
});
it
(
"
should create a new pulse
"
,
()
=>
{
cy
.
server
();
cy
.
route
(
"
GET
"
,
"
/api/pulse/form_input
"
,
MOCK_PULSE_FORM_INPUT
);
cy
.
visit
(
"
/pulse/create
"
);
cy
.
findByPlaceholderText
(
"
Important metrics
"
)
...
...
@@ -39,6 +25,7 @@ describe("scenarios > pulse", () => {
cy
.
contains
(
"
Select a question
"
).
click
();
cy
.
contains
(
"
Orders, Count
"
).
click
();
cy
.
findByPlaceholderText
(
"
Enter user names or email addresses
"
)
.
type
(
"
bobby@example.test
"
)
.
blur
();
...
...
@@ -46,9 +33,10 @@ describe("scenarios > pulse", () => {
// pulse card preview
cy
.
contains
(
"
18,760
"
);
cy
.
contains
(
"
Create pulse
"
).
click
();
cy
.
button
(
"
Create pulse
"
).
click
();
cy
.
url
().
should
(
"
match
"
,
/
\/
collection
\/
root$/
);
cy
.
contains
(
"
pulse title
"
);
});
...
...
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