This is an automated email from the ASF dual-hosted git repository. eallen pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
commit 6c6cdd10cbf3b4d020a288df4d74614e4768f610 Author: Ernest Allen <eal...@redhat.com> AuthorDate: Tue May 25 12:01:05 2021 -0400 DISPATCH-1914 Updated the console's schema page test --- .../react/src/details/schema/schemaPage.test.js | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/console/react/src/details/schema/schemaPage.test.js b/console/react/src/details/schema/schemaPage.test.js index 84e8923..6e09ea4 100644 --- a/console/react/src/details/schema/schemaPage.test.js +++ b/console/react/src/details/schema/schemaPage.test.js @@ -18,31 +18,16 @@ under the License. */ import React from "react"; -import { render, fireEvent } from "@testing-library/react"; +import { render } from "@testing-library/react"; import { mockService } from "../../../test_data/qdrService.mock"; import SchemaPage from "./schemaPage"; it("renders a SchemaPage", () => { const service = mockService({}); const props = { - schema: service.schema + schema: service.schema, }; - const { getByTestId, queryByTestId } = render(<SchemaPage {...props} />); - - // the root node should be present - const root = getByTestId("entities"); - expect(root).toBeInTheDocument(); - - // the root node should be expanded by default - // therefore the address entity should be present - let addressEntity = getByTestId("address"); - expect(addressEntity).toBeInTheDocument(); - - fireEvent.click(addressEntity); - expect(getByTestId("address-egressPhase")).toBeInTheDocument(); - - // clicking on the root should collapse the tree - fireEvent.click(root); - addressEntity = queryByTestId("address"); - expect(addressEntity).toBeNull(); + const { getByText } = render(<SchemaPage {...props} />); + const addressText = getByText(/router.address/); + expect(addressText).toBeInTheDocument(); }); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org