Skip to content
Snippets Groups Projects
Unverified Commit 3b0cea7f authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix e2e tests. Don't do production build for now. [ci e2e]

parent 829c6f57
Branches
Tags
No related merge requests found
......@@ -54,7 +54,7 @@ node-5() {
}
node-6() {
if is_enabled "jar" || is_enabled "e2e" || is_enabled "screenshots"; then
run_step ./bin/build version frontend sample-dataset uberjar
run_step ./bin/build version frontend-fast sample-dataset uberjar
fi
if is_enabled "e2e" || is_enabled "compare_screenshots"; then
USE_SAUCE=true \
......
......@@ -27,18 +27,19 @@ describeE2E("query_builder", () => {
await d.select(":react(AggregationWidget)").wait().click();
await d.select("#AggregationPopover .List-item:nth-child(2)>a").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:nth-child(3) .List-section-header").wait().click();
await d.select("#BreakoutPopover .List-item:nth-child(12)>a").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:first-child .Field-extra>a").wait().click();
await d.select("#TimeGroupingPopover .List-item:nth-child(4)>a").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");
......@@ -49,10 +50,20 @@ describeE2E("query_builder", () => {
// 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) {
}
// get the card ID from the URL
const cardId = (await d.wd().getCurrentUrl()).match(/\/question\/(\d+)/)[1];
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() + "?add=1");
await d.waitUrl(getLatestDashboardUrl() + "?add=" + cardId);
// save dashboard
await d.select(".EditHeader .Button.Button--primary").wait().click();
......
......@@ -252,6 +252,7 @@ if (NODE_ENV !== "production") {
// this is required to ensure we don't minify Chevrotain token identifiers
// https://github.com/SAP/chevrotain/tree/master/examples/parser/minification
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
warnings: false,
mangle: {
except: allTokens.map(function(currTok) {
return chevrotain.tokenName(currTok);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment