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:
Oriol Brufau 2018-01-28 22:50:16 +01:00
parent 59e3631151
commit 62eb995d90
2 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ define(function (require, exports, module) {
title: JSONView.Locale.$STR("jsonViewer.tab.JSON")},
JsonPanel({
data: this.state.json,
expandedNodes: this.props.expandedNodes,
expandedNodes: this.state.expandedNodes,
actions: this.props.actions,
searchFilter: this.state.searchFilter
})

View File

@ -41,8 +41,8 @@ add_task(async function () {
await selectJsonViewContentTab("rawdata");
await checkText();
// Another text check.
await write("]");
// Add an array, when counting rows we will ensure it has been expanded automatically.
await write(",[3]]");
await checkText();
// 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(".jsonPanelBox .treeTable .treeRow"), 2,
"There is a tree with 2 rows.");
is(await getElementCount(".jsonPanelBox .treeTable .treeRow"), 4,
"There is a tree with 4 rows.");
await selectJsonViewContentTab("rawdata");
await checkText();