-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add viewer api for
clear()
and replace()
- Loading branch information
Showing
7 changed files
with
102 additions
and
19 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/perspective-viewer-highcharts/test/js/slow.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
|
||
const utils = require("@jpmorganchase/perspective-viewer/test/js/utils.js"); | ||
const path = require("path"); | ||
|
||
const mutation_tests = require("@jpmorganchase/perspective-viewer/test/js/mutation_tests.js"); | ||
|
||
utils.with_server({}, () => { | ||
describe.page( | ||
"line.html", | ||
() => { | ||
mutation_tests.default(); | ||
}, | ||
{root: path.join(__dirname, "..", "..")} | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/perspective-viewer-hypergrid/test/js/slow.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
|
||
const utils = require("@jpmorganchase/perspective-viewer/test/js/utils.js"); | ||
const path = require("path"); | ||
|
||
const mutation_tests = require("@jpmorganchase/perspective-viewer/test/js/mutation_tests.js"); | ||
|
||
utils.with_server({}, () => { | ||
describe.page( | ||
"superstore.html", | ||
() => { | ||
mutation_tests.default(); | ||
}, | ||
{root: path.join(__dirname, "..", "..")} | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
|
||
exports.default = function() { | ||
test.capture("replaces all rows.", async page => { | ||
const viewer = await page.$("perspective-viewer"); | ||
await page.shadow_click("perspective-viewer", "#config_button"); | ||
const json = await page.evaluate(async element => { | ||
let json = await element.view.to_json(); | ||
return json.slice(10, 20); | ||
}, viewer); | ||
expect(json.length).toEqual(10); | ||
await page.evaluate( | ||
async (element, json) => { | ||
element.replace(json); | ||
}, | ||
viewer, | ||
json | ||
); | ||
// FIXME This is due to update() not triggering flush() semantics | ||
await page.waitFor(1000); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (c) 2017, the Perspective Authors. | ||
* | ||
* This file is part of the Perspective library, distributed under the terms of | ||
* the Apache License 2.0. The full license can be found in the LICENSE file. | ||
* | ||
*/ | ||
|
||
const utils = require("./utils.js"); | ||
|
||
const mutation_tests = require("./mutation_tests.js"); | ||
const path = require("path"); | ||
|
||
utils.with_server({}, () => { | ||
describe.page( | ||
"superstore.html", | ||
() => { | ||
mutation_tests.default(); | ||
}, | ||
{root: path.join(__dirname, "..", "..")} | ||
); | ||
}); |