From 44463206f9699e768637ec675cd3307c3e6b0546 Mon Sep 17 00:00:00 2001 From: Sarah Clements Date: Fri, 21 Jun 2019 11:19:28 -0700 Subject: [PATCH] install newly scoped testing library --- package.json | 4 +-- tests/ui/unit/react/alerts_test.jsx | 2 +- tests/ui/unit/react/compare_table_test.jsx | 2 +- tests/ui/unit/react/replicates_graph_test.jsx | 2 +- tests/ui/unit/react/selected_job_test.jsx | 2 +- yarn.lock | 36 +++++++++++++++---- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 791f15df7..d07d722a1 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@fortawesome/react-fontawesome": "0.1.4", "@neutrinojs/copy": "9.0.0-rc.3", "@neutrinojs/react": "9.0.0-rc.3", + "@testing-library/react": "8.0.1", "@types/angular": "*", "@types/prop-types": "*", "@types/react": "*", @@ -93,8 +94,7 @@ "jest-dom": "3.5.0", "node-fetch": "2.6.0", "prettier": "1.17.1", - "webpack-dev-server": "3.7.1", - "react-testing-library": "8.0.1" + "webpack-dev-server": "3.7.1" }, "scripts": { "build": "node ./node_modules/webpack/bin/webpack.js --mode production", diff --git a/tests/ui/unit/react/alerts_test.jsx b/tests/ui/unit/react/alerts_test.jsx index 17e2e28c6..1ea3e2db2 100644 --- a/tests/ui/unit/react/alerts_test.jsx +++ b/tests/ui/unit/react/alerts_test.jsx @@ -6,7 +6,7 @@ import { waitForElement, waitForElementToBeRemoved, wait, -} from 'react-testing-library'; +} from '@testing-library/react'; import AlertsViewControls from '../../../../ui/perfherder/alerts/AlertsViewControls'; import optionCollectionMap from '../../mock/optionCollectionMap'; diff --git a/tests/ui/unit/react/compare_table_test.jsx b/tests/ui/unit/react/compare_table_test.jsx index 17a4a9440..82e584a12 100644 --- a/tests/ui/unit/react/compare_table_test.jsx +++ b/tests/ui/unit/react/compare_table_test.jsx @@ -5,7 +5,7 @@ import { fireEvent, waitForElement, waitForElementToBeRemoved, -} from 'react-testing-library'; +} from '@testing-library/react'; import CompareTableControls from '../../../../ui/perfherder/compare/CompareTableControls'; import { filterText } from '../../../../ui/perfherder/constants'; diff --git a/tests/ui/unit/react/replicates_graph_test.jsx b/tests/ui/unit/react/replicates_graph_test.jsx index ba8fc2708..9aa6301fc 100644 --- a/tests/ui/unit/react/replicates_graph_test.jsx +++ b/tests/ui/unit/react/replicates_graph_test.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { render, cleanup, waitForElement } from 'react-testing-library'; +import { render, cleanup, waitForElement } from '@testing-library/react'; import ReplicatesGraph from '../../../../ui/perfherder/compare/ReplicatesGraph'; import { noDataFoundMessage } from '../../../../ui/perfherder/constants'; diff --git a/tests/ui/unit/react/selected_job_test.jsx b/tests/ui/unit/react/selected_job_test.jsx index 2d5e59ee2..c0f8623f4 100644 --- a/tests/ui/unit/react/selected_job_test.jsx +++ b/tests/ui/unit/react/selected_job_test.jsx @@ -5,7 +5,7 @@ import { cleanup, fireEvent, waitForElement, -} from 'react-testing-library'; +} from '@testing-library/react'; import PushJobs from '../../../../ui/job-view/pushes/PushJobs'; import FilterModel from '../../../../ui/models/filter'; diff --git a/yarn.lock b/yarn.lock index f4cebcec7..bb7f86e63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1096,6 +1096,30 @@ babel-merge "^3.0.0" deepmerge "^1.5.2" +"@sheerun/mutationobserver-shim@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b" + integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q== + +"@testing-library/dom@^5.0.0": + version "5.2.1" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-5.2.1.tgz#3f2af5229af106c0ccd5078bcb820958310604bc" + integrity sha512-K30UE+UKwyI/iTaQsSJXVYBPnPsTLlcNT1QEhHKKqlsehu7SzWTSkCE3xW0qvMPIkPb3/rVisDx7Viez/qmAKA== + dependencies: + "@babel/runtime" "^7.4.5" + "@sheerun/mutationobserver-shim" "^0.3.2" + aria-query "3.0.0" + pretty-format "^24.8.0" + wait-for-expect "^1.2.0" + +"@testing-library/react@8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-8.0.1.tgz#91c254adf855b13de50020613cb5d3915f9f7875" + integrity sha512-N/1pJfhEnNYkGyxuw4xbp03evaS0z/CT8o0QgTfJqGlukAcU15xf9uU1w03NHKZJcU69nOCBAoAkXHtHzYwMbg== + dependencies: + "@babel/runtime" "^7.4.5" + "@testing-library/dom" "^5.0.0" + "@types/angular@*", "@types/angular@^1.6.39": version "1.6.54" resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.54.tgz#f9d5a03e4da7b021a6dabe5d63e899ed4567a5bd" @@ -1568,7 +1592,7 @@ argparse@^1.0.7, argparse@^1.0.9: dependencies: sprintf-js "~1.0.2" -aria-query@^3.0.0: +aria-query@3.0.0, aria-query@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" integrity sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w= @@ -7759,11 +7783,6 @@ react-test-renderer@^16.0.0-0: react-is "^16.8.6" scheduler "^0.13.6" -react-testing-library@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/react-testing-library/-/react-testing-library-8.0.1.tgz#b3dd43bce3fa88423cf0a23292fb819023c227cc" - integrity sha512-Gq4JC9r3prA4hYwo7afcbHHMFckO29+5Nrh2KblAEPuK/DWaU0bJE1vtpAgLhzhY9bBirmcgjjIHljHEwGAXKw== - react-transition-group@^2.2.1, react-transition-group@^2.3.1: version "2.9.0" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" @@ -9375,6 +9394,11 @@ w3c-hr-time@^1.0.1: dependencies: browser-process-hrtime "^0.1.2" +wait-for-expect@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-1.2.0.tgz#fdab6a26e87d2039101db88bff3d8158e5c3e13f" + integrity sha512-EJhKpA+5UHixduMBEGhTFuLuVgQBKWxkFbefOdj2bbk2/OpA5Opsc4aUTGmF+qJ+v3kTGxDRNYwKaT4j6g5n8Q== + walker@^1.0.7, walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"