mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1433655 - Allow JSON Viewer to change expandedNodes state. r=Honza
MozReview-Commit-ID: C2Db2U2KQKp --HG-- extra : rebase_source : 2fd1d921bd8726afdc1c416ca2ab6a8b16b49434
This commit is contained in:
parent
59e3631151
commit
62eb995d90
@ -66,7 +66,7 @@ define(function (require, exports, module) {
|
|||||||
title: JSONView.Locale.$STR("jsonViewer.tab.JSON")},
|
title: JSONView.Locale.$STR("jsonViewer.tab.JSON")},
|
||||||
JsonPanel({
|
JsonPanel({
|
||||||
data: this.state.json,
|
data: this.state.json,
|
||||||
expandedNodes: this.props.expandedNodes,
|
expandedNodes: this.state.expandedNodes,
|
||||||
actions: this.props.actions,
|
actions: this.props.actions,
|
||||||
searchFilter: this.state.searchFilter
|
searchFilter: this.state.searchFilter
|
||||||
})
|
})
|
||||||
|
@ -41,8 +41,8 @@ add_task(async function () {
|
|||||||
await selectJsonViewContentTab("rawdata");
|
await selectJsonViewContentTab("rawdata");
|
||||||
await checkText();
|
await checkText();
|
||||||
|
|
||||||
// Another text check.
|
// Add an array, when counting rows we will ensure it has been expanded automatically.
|
||||||
await write("]");
|
await write(",[3]]");
|
||||||
await checkText();
|
await checkText();
|
||||||
|
|
||||||
// Close the connection.
|
// Close the connection.
|
||||||
@ -52,8 +52,8 @@ add_task(async function () {
|
|||||||
|
|
||||||
is(await getElementCount(".json.is-active"), 1, "The JSON tab is selected.");
|
is(await getElementCount(".json.is-active"), 1, "The JSON tab is selected.");
|
||||||
|
|
||||||
is(await getElementCount(".jsonPanelBox .treeTable .treeRow"), 2,
|
is(await getElementCount(".jsonPanelBox .treeTable .treeRow"), 4,
|
||||||
"There is a tree with 2 rows.");
|
"There is a tree with 4 rows.");
|
||||||
|
|
||||||
await selectJsonViewContentTab("rawdata");
|
await selectJsonViewContentTab("rawdata");
|
||||||
await checkText();
|
await checkText();
|
||||||
|
Loading…
Reference in New Issue
Block a user