Skip to content

Commit

Permalink
fix d3fc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sc1f committed Jan 19, 2021
1 parent 671b5f7 commit 5721e8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ utils.with_server({}, () => {
await page.evaluate(element => element.setAttribute("columns", '["Sales", "Profit"]'), viewer);
await page.evaluate(element => element.setAttribute("filters", '[["Product ID", "==", "FUR-BO-10001798"]]'), viewer);
await page.waitForSelector("perspective-viewer:not([updating])");
await page.waitFor(
element => {
let elem = element.shadowRoot.querySelector("perspective-d3fc-chart").shadowRoot.querySelector(".segment");
if (elem) {
return elem.textContent.includes("11/12");
}
},
{},
viewer
);
});

test.capture("sunburst parent button shows formatted date", async page => {
Expand All @@ -47,17 +37,10 @@ utils.with_server({}, () => {
await page.evaluate(element => element.setAttribute("columns", '["Sales", "Profit"]'), viewer);
await page.evaluate(element => element.setAttribute("filters", '[["Product ID", "==", "FUR-BO-10001798"]]'), viewer);
await page.waitForSelector("perspective-viewer:not([updating])");
await page.mouse.click(550, 450);
await page.waitFor(
element => {
let elem = element.shadowRoot.querySelector("perspective-d3fc-chart").shadowRoot.querySelector(".parent");
if (elem) {
return elem.textContent.includes("11/12/2013, 12:00:00 AM");
}
},
{},
viewer
);
await page.mouse.click(430, 450);
await page.waitFor(500);
await page.mouse.click(430, 450);
await page.waitFor(500);
});
},
{reload_page: false, root: path.join(__dirname, "..", "..", "..")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,16 @@ utils.with_server({}, () => {
test.capture("treemap parent button shows formatted date", async page => {
const viewer = await page.$("perspective-viewer");
await page.shadow_click("perspective-viewer", "#config_button");
await page.evaluate(element => element.setAttribute("row-pivots", '["Ship Mode", "Segment"]'), viewer);
await page.evaluate(element => element.setAttribute("row-pivots", '["Ship Date", "Ship Mode"]'), viewer);
await page.evaluate(element => element.setAttribute("columns", '["Sales", "Profit"]'), viewer);
await page.waitForSelector("perspective-viewer:not([updating])");
await page.mouse.click(500, 200);
await page.waitFor(
element => {
let chart = element.shadowRoot.querySelector("perspective-d3fc-chart");
console.log(chart);
let elem = chart.shadowRoot.querySelector("#goto-parent");
if (elem) {
return elem.textContent.includes("Second Class");
return elem.textContent.includes("9/21/2012, 12:00:00 AM");
}
},
{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@
"treemap_with_column_position_1_set_to_null_": "f50a1857b0ccee3a397e3eacc91931e9",
"treemap_tooltip_columns_works": "654484647891ebbc8e0e9ec41ceddfcd",
"line_Sets_a_category_axis_when_pivoted_by_a_computed_datetime": "b35442f81409b8c269f1e03b859cb09f",
"sunburst_sunburst_label_shows_formatted_date": "590f474e076fd49ce10eb5e97bfc66d3",
"sunburst_sunburst_label_shows_formatted_date": "21a37f9f241e16461d070e9802b07d3b",
"sunburst_sunburst_parent_button_shows_formatted_date": "3179be0611e631948c89a887f32fc120",
"treemap_treemap_label_shows_formatted_date": "75b8779f329f3197699c97ee5202f7a3",
"treemap_treemap_parent_button_shows_formatted_date": "f2710ec0493adda40d49d3995f6d9273",
"xyline_shows_a_grid_without_any_settings_applied_": "6d4bdd941a04d6e39fe14c2ea001886e",
"xyline_pivots_by_a_row_": "cc7bd9ed73adab5da553a918daabd1bb",
"xyline_pivots_by_two_rows_": "c6e57809b071e1db5eb545e1847bc09a",
Expand Down

0 comments on commit 5721e8a

Please sign in to comment.