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
e3c32cce
Commit
e3c32cce
authored
7 years ago
by
Atte Keinänen
Browse files
Options
Downloads
Patches
Plain Diff
Remove the query builder E2E test that has became obsolete
parent
f0270be7
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/legacy-selenium/query_builder/query_builder.spec.js
+0
-172
0 additions, 172 deletions
.../test/legacy-selenium/query_builder/query_builder.spec.js
with
0 additions
and
172 deletions
frontend/test/legacy-selenium/query_builder/query_builder.spec.js
deleted
100644 → 0
+
0
−
172
View file @
f0270be7
import
{
describeE2E
,
ensureLoggedIn
}
from
"
../support/utils
"
;
import
{
removeCurrentDash
}
from
"
../dashboard/dashboard.utils
"
;
import
{
createDashboardInEmptyState
,
getLatestDashboardUrl
,
incrementDashboardCount
}
from
"
../dashboards/dashboards.utils
"
;
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
60000
;
describeE2E
(
"
query_builder
"
,
()
=>
{
beforeEach
(
async
()
=>
{
await
ensureLoggedIn
(
server
,
driver
,
"
bob@metabase.com
"
,
"
12341234
"
);
});
describe
(
"
tables
"
,
()
=>
{
// TODO Atte Keinänen 6/22/17: Failing test, disabled until converted to use Jest and Enzyme
xit
(
"
should allow users to create pivot tables
"
,
async
()
=>
{
// load the query builder and screenshot blank
await
d
.
get
(
"
/question
"
);
await
d
.
screenshot
(
"
screenshots/qb-initial.png
"
);
// pick the orders table (assumes database is already selected, i.e. there's only 1 database)
await
d
.
select
(
"
#TablePicker .List-item a:contains(Orders)
"
).
wait
().
click
();
await
d
.
select
(
"
:react(AggregationWidget)
"
).
wait
().
click
();
await
d
.
select
(
"
#AggregationPopover .List-item a:contains(Count)
"
).
wait
().
click
();
await
d
.
select
(
"
.Query-section.Query-section-breakout #BreakoutWidget
"
).
wait
().
click
();
await
d
.
select
(
"
#BreakoutPopover .List-section .List-section-header:contains(Product)
"
).
wait
().
click
();
await
d
.
select
(
"
#BreakoutPopover .List-item a:contains(Category)
"
).
wait
().
click
();
await
d
.
select
(
"
.Query-section.Query-section-breakout #BreakoutWidget .AddButton
"
).
wait
().
click
();
await
d
.
select
(
"
#BreakoutPopover .List-item:contains(Created) .Field-extra > a
"
).
wait
().
click
();
await
d
.
select
(
"
#TimeGroupingPopover .List-item a:contains(Year)
"
).
wait
().
click
();
await
d
.
select
(
"
.Button.RunButton
"
).
wait
().
click
();
await
d
.
sleep
(
500
);
await
d
.
select
(
"
.Loading
"
).
waitRemoved
(
20000
);
await
d
.
screenshot
(
"
screenshots/qb-pivot-table.png
"
);
// save question
await
d
.
select
(
"
.Header-buttonSection:first-child
"
).
wait
().
click
();
await
d
.
select
(
"
#SaveQuestionModal input[name='name']
"
).
wait
().
sendKeys
(
"
Pivot Table
"
);
await
d
.
select
(
"
#SaveQuestionModal .Button.Button--primary
"
).
wait
().
click
().
waitRemoved
();
// wait for the modal to be removed
// add to new dashboard
await
d
.
select
(
"
#QuestionSavedModal .Button.Button--primary
"
).
wait
().
click
();
try
{
// this makes the test work wether we have any existing dashboards or not
await
d
.
select
(
"
#AddToDashSelectDashModal h3:contains(Add)
"
).
wait
(
500
).
click
();
}
catch
(
e
)
{
}
await
d
.
select
(
"
#CreateDashboardModal input[name='name']
"
).
wait
().
sendKeys
(
"
Main Dashboard
"
);
await
d
.
select
(
"
#CreateDashboardModal .Button.Button--primary
"
).
wait
().
click
().
waitRemoved
();
// wait for the modal to be removed
incrementDashboardCount
();
await
d
.
waitUrl
(
getLatestDashboardUrl
());
// save dashboard
await
d
.
select
(
"
.EditHeader .Button.Button--primary
"
).
wait
().
click
();
await
d
.
select
(
"
.EditHeader
"
).
waitRemoved
();
await
removeCurrentDash
();
});
});
describe
(
"
charts
"
,
()
=>
{
xit
(
"
should allow users to create line charts
"
,
async
()
=>
{
await
createDashboardInEmptyState
();
await
d
.
get
(
"
/question
"
);
// select orders table
await
d
.
select
(
"
#TablePicker .List-item:first-child>a
"
).
wait
().
click
();
// select filters
await
d
.
select
(
"
.GuiBuilder-filtered-by .Query-section:not(.disabled) a
"
).
wait
().
click
();
await
d
.
select
(
"
#FilterPopover .List-item:first-child>a
"
).
wait
().
click
();
await
d
.
select
(
"
.Button[data-ui-tag='relative-date-shortcut-this-year']
"
).
wait
().
click
();
await
d
.
select
(
"
.Button[data-ui-tag='add-filter']:not(.disabled)
"
).
wait
().
click
();
// select aggregations
await
d
.
select
(
"
#Query-section-aggregation
"
).
wait
().
click
();
await
d
.
select
(
"
#AggregationPopover .List-item:nth-child(2)>a
"
).
wait
().
click
();
// select breakouts
await
d
.
select
(
"
.Query-section.Query-section-breakout>div
"
).
wait
().
click
();
await
d
.
select
(
"
#BreakoutPopover .List-item:first-child .Field-extra>a
"
).
wait
().
click
();
await
d
.
select
(
"
#TimeGroupingPopover .List-item:nth-child(3)>a
"
).
wait
().
click
();
// run query
await
d
.
select
(
"
.Button.RunButton
"
).
wait
().
click
();
await
d
.
select
(
"
#VisualizationTrigger
"
).
wait
().
click
();
// this step occassionally fails without the timeout
await
d
.
sleep
(
500
);
await
d
.
select
(
"
#VisualizationPopover li:nth-child(3)
"
).
wait
().
click
();
await
d
.
screenshot
(
"
screenshots/qb-line-chart.png
"
);
// save question
await
d
.
select
(
"
.Header-buttonSection:first-child
"
).
wait
().
click
();
await
d
.
select
(
"
#SaveQuestionModal input[name='name']
"
).
wait
().
sendKeys
(
"
Line Chart
"
);
await
d
.
select
(
"
#SaveQuestionModal .Button.Button--primary
"
).
wait
().
click
();
// add to existing dashboard
await
d
.
sleep
(
500
);
await
d
.
select
(
"
#QuestionSavedModal .Button.Button--primary
"
).
wait
().
click
();
await
d
.
select
(
"
#AddToDashSelectDashModal .SortableItemList-list li:first-child>a
"
).
wait
().
click
();
// save dashboard
await
d
.
select
(
"
.EditHeader .Button.Button--primary
"
).
wait
().
click
();
await
d
.
select
(
"
.EditHeader
"
).
waitRemoved
();
await
removeCurrentDash
();
});
xit
(
"
should allow users to create bar charts
"
,
async
()
=>
{
await
createDashboardInEmptyState
();
// load line chart
await
d
.
get
(
"
/question/2
"
);
// dismiss saved questions modal
await
d
.
select
(
"
.Modal .Button.Button--primary
"
).
wait
().
click
();
// change breakouts
await
d
.
select
(
"
.View-section-breakout.SelectionModule
"
).
wait
().
click
();
await
d
.
select
(
"
#BreakoutPopover .List-item:first-child .Field-extra>a
"
).
wait
().
click
();
await
d
.
select
(
"
#TimeGroupingPopover .List-item:nth-child(4)>a
"
).
wait
().
click
();
// change visualization
await
d
.
select
(
"
#VisualizationTrigger
"
).
wait
().
click
();
// this step occassionally fails without the timeout
await
d
.
sleep
(
500
);
await
d
.
select
(
"
#VisualizationPopover li:nth-child(4)
"
).
wait
().
click
();
// run query
await
d
.
select
(
"
.Button.RunButton
"
).
wait
().
click
();
await
d
.
select
(
"
.Loading
"
).
waitRemoved
(
20000
);
await
d
.
screenshot
(
"
screenshots/qb-bar-chart.png
"
);
// save question
await
d
.
select
(
"
.Header-buttonSection:first-child
"
).
wait
().
click
();
await
d
.
select
(
"
#SaveQuestionModal input[name='name']
"
).
wait
().
sendKeys
(
"
Bar Chart
"
);
await
d
.
select
(
"
#SaveQuestionModal .Button.Button--primary
"
).
wait
().
click
();
// add to existing dashboard
await
d
.
sleep
(
500
);
await
d
.
select
(
"
#QuestionSavedModal .Button.Button--primary
"
).
wait
().
click
();
await
d
.
select
(
"
#AddToDashSelectDashModal .SortableItemList-list li:first-child>a
"
).
wait
().
click
();
// save dashboard
await
d
.
select
(
"
.EditHeader .Button.Button--primary
"
).
wait
().
click
();
await
d
.
select
(
"
.EditHeader
"
).
waitRemoved
();
await
removeCurrentDash
();
});
});
});
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