From 9907a768a0e9660549821e77918fea6f0d04c467 Mon Sep 17 00:00:00 2001 From: Cassidy Schaufele Date: Mon, 10 Jan 2022 23:32:08 -0700 Subject: [PATCH 01/10] DOP-2642: Update low/mid complexity tests to use RTL, not enzyme --- package-lock.json | 652 ++-- package.json | 3 + tests/unit/Admonition.test.js | 6 +- tests/unit/Banner.test.js | 6 +- tests/unit/BlockQuote.test.js | 6 +- tests/unit/BreadcrumbContainer.test.js | 11 +- tests/unit/BreadcrumbSchema.test.js | 42 - tests/unit/Breadcrumbs.test.js | 20 +- tests/unit/Button.test.js | 6 +- tests/unit/Card.test.js | 6 +- tests/unit/CardGroup.test.js | 6 +- tests/unit/CardRef.test.js | 8 +- tests/unit/Chapter.test.js | 12 +- tests/unit/Chapters.test.js | 37 +- tests/unit/DefinitionList.test.js | 4 +- tests/unit/Emphasis.test.js | 6 +- tests/unit/Field.test.js | 6 +- tests/unit/FieldList.test.js | 6 +- tests/unit/Figure.test.js | 8 +- tests/unit/Footnote.test.js | 6 +- tests/unit/FootnoteReference.test.js | 6 +- tests/unit/GuidesLandingTree.test.js | 6 +- tests/unit/Heading.test.js | 4 +- tests/unit/InternalPageNav.test.js | 8 +- tests/unit/Line.test.js | 10 +- tests/unit/LineBlock.test.js | 6 +- tests/unit/Link.test.js | 16 +- tests/unit/List.test.js | 4 +- tests/unit/Literal.test.js | 6 +- tests/unit/LiteralInclude.test.js | 6 +- tests/unit/MongoWebShell.test.js | 6 +- tests/unit/Paragraph.test.js | 6 +- tests/unit/Procedure.test.js | 6 +- tests/unit/QuizWidget.test.js | 31 +- tests/unit/Reference.test.js | 4 +- tests/unit/ReleaseSpecification.test.js | 4 +- tests/unit/Role.test.js | 12 +- tests/unit/Section.test.js | 6 +- tests/unit/SiteBanner.test.js | 12 +- tests/unit/Step.test.js | 6 +- tests/unit/StepYAML.test.js | 6 +- tests/unit/Strong.test.js | 6 +- tests/unit/Target.test.js | 6 +- tests/unit/Text.test.js | 6 +- tests/unit/TitleReference.test.js | 6 +- tests/unit/VersionModified.test.js | 10 +- .../__snapshots__/Admonition.test.js.snap | 131 +- tests/unit/__snapshots__/Banner.test.js.snap | 130 +- .../__snapshots__/BlockQuote.test.js.snap | 208 +- .../BreadcrumbContainer.test.js.snap | 257 +- .../BreadcrumbSchema.test.js.snap | 14 - .../__snapshots__/Breadcrumbs.test.js.snap | 199 +- tests/unit/__snapshots__/Button.test.js.snap | 132 +- tests/unit/__snapshots__/CardRef.test.js.snap | 2700 +---------------- tests/unit/__snapshots__/Chapter.test.js.snap | 428 +-- .../__snapshots__/DefinitionList.test.js.snap | 34 +- .../unit/__snapshots__/Emphasis.test.js.snap | 8 +- tests/unit/__snapshots__/Field.test.js.snap | 94 +- tests/unit/__snapshots__/Figure.test.js.snap | 74 +- .../unit/__snapshots__/Footnote.test.js.snap | 129 +- .../FootnoteReference.test.js.snap | 18 +- .../GuidesLandingTree.test.js.snap | 339 ++- tests/unit/__snapshots__/Heading.test.js.snap | 36 +- .../InternalPageNav.test.js.snap | 128 +- tests/unit/__snapshots__/Line.test.js.snap | 75 +- .../unit/__snapshots__/LineBlock.test.js.snap | 25 +- tests/unit/__snapshots__/Link.test.js.snap | 92 +- tests/unit/__snapshots__/List.test.js.snap | 48 +- tests/unit/__snapshots__/Literal.test.js.snap | 49 +- .../__snapshots__/LiteralInclude.test.js.snap | 210 +- .../__snapshots__/MongoWebShell.test.js.snap | 40 +- .../unit/__snapshots__/Paragraph.test.js.snap | 23 +- .../unit/__snapshots__/Procedure.test.js.snap | 292 +- .../__snapshots__/QuizWidget.test.js.snap | 277 ++ .../unit/__snapshots__/Reference.test.js.snap | 14 +- .../ReleaseSpecification.test.js.snap | 64 +- tests/unit/__snapshots__/Role.test.js.snap | 42 +- tests/unit/__snapshots__/Section.test.js.snap | 135 +- .../__snapshots__/SiteBanner.test.js.snap | 28 +- tests/unit/__snapshots__/Step.test.js.snap | 158 +- .../unit/__snapshots__/StepYAML.test.js.snap | 154 +- tests/unit/__snapshots__/Strong.test.js.snap | 8 +- tests/unit/__snapshots__/Target.test.js.snap | 112 +- tests/unit/__snapshots__/Text.test.js.snap | 4 +- .../__snapshots__/TitleReference.test.js.snap | 8 +- .../VersionModified.test.js.snap | 206 +- 86 files changed, 2997 insertions(+), 5188 deletions(-) delete mode 100644 tests/unit/BreadcrumbSchema.test.js delete mode 100644 tests/unit/__snapshots__/BreadcrumbSchema.test.js.snap diff --git a/package-lock.json b/package-lock.json index 75a036d13..70c210585 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,9 @@ }, "devDependencies": { "@babel/core": "^7.12.9", + "@testing-library/dom": "^8.11.1", + "@testing-library/react": "^12.1.2", + "@testing-library/user-event": "^13.5.0", "auto-changelog": "^2.2.1", "babel-jest": "^26.6.3", "babel-plugin-emotion": "^10.0.33", @@ -107,11 +110,15 @@ "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" }, "node_modules/@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha1-REFra9diS5mPWxr11HCFbEATh4k=", + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { @@ -145,24 +152,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/core/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/core/node_modules/json5": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", @@ -394,9 +383,10 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz", - "integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==", + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha1-6MYCQ4xKgZV1EkPakDHRYH0kfK0=", + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -428,13 +418,17 @@ } }, "node_modules/@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha1-gaAdfWdQRvDZb4JFDZ2VeL39aws=", + "license": "MIT", "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/parser": { @@ -1214,24 +1208,6 @@ "@babel/types": "^7.12.7" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/template/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/traverse": { "version": "7.12.9", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz", @@ -1248,24 +1224,6 @@ "lodash": "^4.17.19" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/types": { "version": "7.14.8", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.8.tgz", @@ -4088,6 +4046,192 @@ "node": ">=6" } }, + "node_modules/@testing-library/dom": { + "version": "8.11.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/dom/-/dom-8.11.1.tgz", + "integrity": "sha1-A/omhKoJreWJtGDbRrTHvp/Gl1M=", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^4.2.0", + "aria-query": "^5.0.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.4.4", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@testing-library/dom/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "/~https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/aria-query": { + "version": "5.0.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha1-IQwhqvRpYT7oyaYsf4ZSXgWNtSw=", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@testing-library/dom/node_modules/chalk": { + "version": "4.1.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "/~https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/dom/node_modules/pretty-format": { + "version": "27.4.6", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/pretty-format/-/pretty-format-27.4.6.tgz", + "integrity": "sha1-G3hNL1PGjbMXl7I0j6ObSeMYRrc=", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@testing-library/dom/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "/~https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@testing-library/dom/node_modules/react-is": { + "version": "17.0.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/react": { + "version": "12.1.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/react/-/react-12.1.2.tgz", + "integrity": "sha1-8byaRZQ0YfoqWYu0WX3xrgRM/HY=", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "@testing-library/dom": "^8.0.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "react": "*", + "react-dom": "*" + } + }, + "node_modules/@testing-library/user-event": { + "version": "13.5.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/user-event/-/user-event-13.5.0.tgz", + "integrity": "sha1-addwB/HhJNVTFKK3P9IEszOxMpU=", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, "node_modules/@theme-ui/color-modes": { "version": "0.10.0", "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@theme-ui/color-modes/-/color-modes-0.10.0.tgz", @@ -4342,6 +4486,13 @@ "resolved": "https://registry.npmjs.org/@turist/time/-/time-0.0.1.tgz", "integrity": "sha512-M2BiThcbxMxSKX8W4z5u9jKZn6datnM3+FpEU+eYw0//l31E2xhqi7vTAuJ/Sf0P3yhp66SDJgPu3bRRpvrdQQ==" }, + "node_modules/@types/aria-query": { + "version": "4.2.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@types/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha1-7U4K2SMGpwT5+xMqDPz3dIbb4rw=", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -9434,6 +9585,13 @@ "node": ">=0.10.0" } }, + "node_modules/dom-accessibility-api": { + "version": "0.5.10", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz", + "integrity": "sha1-yqbQj2A4jQu0U53XX+RYqaHQAUw=", + "dev": true, + "license": "MIT" + }, "node_modules/dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -12403,24 +12561,6 @@ "node": ">=10.13.0" } }, - "node_modules/gatsby-telemetry/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/gatsby-telemetry/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/gatsby-telemetry/node_modules/gatsby-core-utils": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.7.1.tgz", @@ -12438,37 +12578,6 @@ "node": ">=10.13.0" } }, - "node_modules/gatsby/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/gatsby/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/gatsby/node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/gatsby/node_modules/ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -19124,6 +19233,16 @@ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==" }, + "node_modules/lz-string": { + "version": "1.4.4", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "dev": true, + "license": "WTFPL", + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -23618,14 +23737,6 @@ "@mdx-js/util": "^2.0.0-next.8" } }, - "node_modules/remark-mdxjs/node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/remark-mdxjs/node_modules/@babel/core": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", @@ -23652,16 +23763,6 @@ "node": ">=6.9.0" } }, - "node_modules/remark-mdxjs/node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/remark-mdxjs/node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz", @@ -29420,11 +29521,11 @@ } }, "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha1-REFra9diS5mPWxr11HCFbEATh4k=", "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { @@ -29455,24 +29556,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "json5": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", @@ -29696,9 +29779,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.14.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz", - "integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==" + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha1-6MYCQ4xKgZV1EkPakDHRYH0kfK0=" }, "@babel/helper-validator-option": { "version": "7.12.1", @@ -29727,12 +29810,12 @@ } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.16.7", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha1-gaAdfWdQRvDZb4JFDZ2VeL39aws=", "requires": { + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, @@ -30493,26 +30576,6 @@ "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.12.7", "@babel/types": "^7.12.7" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } } }, "@babel/traverse": { @@ -30529,26 +30592,6 @@ "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } } }, "@babel/types": { @@ -33055,6 +33098,129 @@ "defer-to-connect": "^1.0.1" } }, + "@testing-library/dom": { + "version": "8.11.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/dom/-/dom-8.11.1.tgz", + "integrity": "sha1-A/omhKoJreWJtGDbRrTHvp/Gl1M=", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^4.2.0", + "aria-query": "^5.0.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.4.4", + "pretty-format": "^27.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "aria-query": { + "version": "5.0.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/aria-query/-/aria-query-5.0.0.tgz", + "integrity": "sha1-IQwhqvRpYT7oyaYsf4ZSXgWNtSw=", + "dev": true + }, + "chalk": { + "version": "4.1.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", + "dev": true + }, + "pretty-format": { + "version": "27.4.6", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/pretty-format/-/pretty-format-27.4.6.tgz", + "integrity": "sha1-G3hNL1PGjbMXl7I0j6ObSeMYRrc=", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", + "dev": true + } + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "@testing-library/react": { + "version": "12.1.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/react/-/react-12.1.2.tgz", + "integrity": "sha1-8byaRZQ0YfoqWYu0WX3xrgRM/HY=", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.5", + "@testing-library/dom": "^8.0.0" + } + }, + "@testing-library/user-event": { + "version": "13.5.0", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@testing-library/user-event/-/user-event-13.5.0.tgz", + "integrity": "sha1-addwB/HhJNVTFKK3P9IEszOxMpU=", + "dev": true, + "requires": { + "@babel/runtime": "^7.12.5" + } + }, "@theme-ui/color-modes": { "version": "0.10.0", "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@theme-ui/color-modes/-/color-modes-0.10.0.tgz", @@ -33251,6 +33417,12 @@ "resolved": "https://registry.npmjs.org/@turist/time/-/time-0.0.1.tgz", "integrity": "sha512-M2BiThcbxMxSKX8W4z5u9jKZn6datnM3+FpEU+eYw0//l31E2xhqi7vTAuJ/Sf0P3yhp66SDJgPu3bRRpvrdQQ==" }, + "@types/aria-query": { + "version": "4.2.2", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@types/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha1-7U4K2SMGpwT5+xMqDPz3dIbb4rw=", + "dev": true + }, "@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -37626,6 +37798,12 @@ "isarray": "^1.0.0" } }, + "dom-accessibility-api": { + "version": "0.5.10", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz", + "integrity": "sha1-yqbQj2A4jQu0U53XX+RYqaHQAUw=", + "dev": true + }, "dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -39742,36 +39920,6 @@ "yaml-loader": "^0.6.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -40567,24 +40715,6 @@ "uuid": "3.4.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "gatsby-core-utils": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/gatsby-core-utils/-/gatsby-core-utils-1.7.1.tgz", @@ -45603,6 +45733,12 @@ "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==" }, + "lz-string": { + "version": "1.4.4", + "resolved": "http://artifactory.corp.mongodb.com/artifactory/api/npm/npm/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "dev": true + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -49397,14 +49533,6 @@ "@mdx-js/util": "^2.0.0-next.8" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "requires": { - "@babel/highlight": "^7.10.4" - } - }, "@babel/core": { "version": "7.10.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", @@ -49428,16 +49556,6 @@ "source-map": "^0.5.0" } }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.4.tgz", diff --git a/package.json b/package.json index 401e62cf3..28ebf7229 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ }, "devDependencies": { "@babel/core": "^7.12.9", + "@testing-library/dom": "^8.11.1", + "@testing-library/react": "^12.1.2", + "@testing-library/user-event": "^13.5.0", "auto-changelog": "^2.2.1", "babel-jest": "^26.6.3", "babel-plugin-emotion": "^10.0.33", diff --git a/tests/unit/Admonition.test.js b/tests/unit/Admonition.test.js index 67e6c2cda..365ad83b4 100644 --- a/tests/unit/Admonition.test.js +++ b/tests/unit/Admonition.test.js @@ -1,11 +1,11 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react'; import Admonition from '../../src/components/Admonition'; // data for this component import mockData from './data/Admonition.test.json'; it('admonitions render correctly', () => { - const tree = shallow(); - expect(tree).toMatchSnapshot(); + const tree = render(); + expect(tree.asFragment()).toMatchSnapshot(); }); diff --git a/tests/unit/Banner.test.js b/tests/unit/Banner.test.js index c4e0b8d92..6adc28360 100644 --- a/tests/unit/Banner.test.js +++ b/tests/unit/Banner.test.js @@ -1,11 +1,11 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react'; import Banner from '../../src/components/Banner'; // data for this component import mockData from './data/Banner.test.json'; it('renders a Banner correctly', () => { - const tree = shallow(); - expect(tree).toMatchSnapshot(); + const tree = render(); + expect(tree.asFragment()).toMatchSnapshot(); }); diff --git a/tests/unit/BlockQuote.test.js b/tests/unit/BlockQuote.test.js index 686fe9781..539366231 100644 --- a/tests/unit/BlockQuote.test.js +++ b/tests/unit/BlockQuote.test.js @@ -1,11 +1,11 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react'; import BlockQuote from '../../src/components/BlockQuote'; // data for this component import mockData from './data/BlockQuote.test.json'; it('renders correctly', () => { - const tree = shallow(
); - expect(tree).toMatchSnapshot(); + const tree = render(
); + expect(tree.asFragment()).toMatchSnapshot(); }); diff --git a/tests/unit/BreadcrumbContainer.test.js b/tests/unit/BreadcrumbContainer.test.js index ed167d37d..af5351ae8 100644 --- a/tests/unit/BreadcrumbContainer.test.js +++ b/tests/unit/BreadcrumbContainer.test.js @@ -1,14 +1,15 @@ import React from 'react'; -import { mount } from 'enzyme'; +import { render } from '@testing-library/react'; import BreadcrumbContainer from '../../src/components/BreadcrumbContainer'; import { NavigationContext } from '../../src/components/navigation-context'; -const mountBreadcrumbContainer = (homeCrumb, lastCrumb, parents) => - mount( +const mountBreadcrumbContainer = (homeCrumb, lastCrumb, parents) => { + return render( ); +}; describe('BreadcrumbContainer', () => { const mockHomeCrumb = { @@ -30,7 +31,7 @@ describe('BreadcrumbContainer', () => { ]; const tree = mountBreadcrumbContainer(mockHomeCrumb, mockLastCrumb, mockParents); - expect(tree).toMatchSnapshot(); + expect(tree.asFragment()).toMatchSnapshot(); }); it('renders correctly without project parent', () => { @@ -40,6 +41,6 @@ describe('BreadcrumbContainer', () => { }; const tree = mountBreadcrumbContainer(mockHomeCrumb, mockLastCrumb, []); - expect(tree).toMatchSnapshot(); + expect(tree.asFragment()).toMatchSnapshot(); }); }); diff --git a/tests/unit/BreadcrumbSchema.test.js b/tests/unit/BreadcrumbSchema.test.js deleted file mode 100644 index 80cfc4408..000000000 --- a/tests/unit/BreadcrumbSchema.test.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import BreadcrumbSchema from '../../src/components/BreadcrumbSchema'; - -import mockData from './data/Breadcrumbs.test.json'; - -const siteUrl = 'https://docs.mongodb.com'; - -jest.mock('../../src/hooks/use-site-metadata', () => ({ - useSiteMetadata: () => ({ siteUrl }), -})); - -describe('BreadcrumbSchema', () => { - let shallowWrapper; - - beforeAll(() => { - shallowWrapper = shallow( - - ); - }); - - it('renders correctly', () => { - expect(shallowWrapper).toMatchSnapshot(); - }); - - it('script has a correct schema', () => { - const script = shallowWrapper.find('script'); - - expect(script.text()).toEqual( - JSON.stringify({ - '@context': 'https://schema.org', - '@type': 'BreadcrumbList', - itemListElement: [ - { '@type': 'ListItem', position: 1, name: 'MongoDB Documentation', item: `${siteUrl}/` }, - { '@type': 'ListItem', position: 2, name: 'MongoDB Compass', item: `${siteUrl}/` }, - { '@type': 'ListItem', position: 3, name: 'Interact with Your Data', item: `${siteUrl}/manage-data/` }, - { '@type': 'ListItem', position: 4, name: 'Manage Documents', item: `${siteUrl}/documents/` }, - ], - }) - ); - }); -}); diff --git a/tests/unit/Breadcrumbs.test.js b/tests/unit/Breadcrumbs.test.js index 6c3f33129..0dd35af67 100644 --- a/tests/unit/Breadcrumbs.test.js +++ b/tests/unit/Breadcrumbs.test.js @@ -1,16 +1,26 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import * as Gatsby from 'gatsby'; +import { render } from '@testing-library/react'; import Breadcrumbs from '../../src/components/Breadcrumbs'; import mockData from './data/Breadcrumbs.test.json'; it('renders correctly with siteTitle', () => { - const tree = shallow(); - expect(tree).toMatchSnapshot(); + const tree = render(); + expect(tree.asFragment()).toMatchSnapshot(); }); +const useStaticQuery = jest.spyOn(Gatsby, 'useStaticQuery'); +useStaticQuery.mockImplementation(() => ({ + site: { + siteMetadata: { + project: '', + }, + }, +})); + it('renders correctly with pageTitle', () => { - const tree = shallow( + const tree = render( { slug={'view-analyze'} /> ); - expect(tree).toMatchSnapshot(); + expect(tree.asFragment()).toMatchSnapshot(); }); diff --git a/tests/unit/Button.test.js b/tests/unit/Button.test.js index 7cf5388d8..f69a8f41f 100644 --- a/tests/unit/Button.test.js +++ b/tests/unit/Button.test.js @@ -1,11 +1,11 @@ import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react'; import Button from '../../src/components/Button'; // data for this component import mockData from './data/Button.test.json'; it('renders correctly', () => { - const tree = shallow( + + .emotion-0 { + overflow: hidden; + border-radius: 3px; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.emotion-2 { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding: 0; + margin: 0; + background-color: transparent; + border: 0px solid transparent; + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-align-items: stretch; + -webkit-box-align: stretch; + -ms-flex-align: stretch; + align-items: stretch; + border-radius: 4px; + -webkit-transition: all 150ms ease-in-out; + transition: all 150ms ease-in-out; + position: relative; + -webkit-text-decoration: none; + text-decoration: none; + cursor: pointer; + z-index: 0; + background-color: #09804C; + box-shadow: 0px 2px 3px rgba(19,170,82,0.4); + color: #FFFFFF; + font-size: 14px; + height: 36px; +} + +.emotion-2:focus { + outline: none; +} + +.emotion-2:disabled { + pointer-events: none; +} + +.emotion-2:active, +.emotion-2:focus, +.emotion-2:hover { + -webkit-text-decoration: none; + text-decoration: none; +} + +.emotion-2:focus { + color: #FFFFFF; +} + +.emotion-2:hover, +.emotion-2:active { + color: #FFFFFF; + background-color: #116149; + box-shadow: 0px 2px 3px rgba(19,170,82,0.4),0px 0px 0px 3px #c3e7ca; +} + +.emotion-2:focus { + background-color: #116149; + box-shadow: 0px 4px 4px rgba(0,124,173,0.4), 0px 0px 0px 3px #019EE2; +} + +.emotion-1 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 100%; + width: 100%; + pointer-events: none; + position: relative; + z-index: 0; + font-family: Akzidenz,'Helvetica Neue',Helvetica,Arial,sans-serif; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + padding-left: 12px; + padding-right: 12px; +} + + +
+
+ Download Compass +
+
+ `; diff --git a/tests/unit/__snapshots__/CardRef.test.js.snap b/tests/unit/__snapshots__/CardRef.test.js.snap index 9eb72d209..630eebc36 100644 --- a/tests/unit/__snapshots__/CardRef.test.js.snap +++ b/tests/unit/__snapshots__/CardRef.test.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`card correctly with and without url 1`] = ` -.emotion-44 { + + .emotion-20 { position: relative; border-radius: 7px; -webkit-transition: border 300ms ease-in-out,box-shadow 300ms ease-in-out; @@ -12,7 +13,7 @@ exports[`card correctly with and without url 1`] = ` color: #21313C; } -.emotion-60 { +.emotion-31 { position: relative; border-radius: 7px; -webkit-transition: border 300ms ease-in-out,box-shadow 300ms ease-in-out; @@ -24,21 +25,21 @@ exports[`card correctly with and without url 1`] = ` cursor: pointer; } -.emotion-60:focus { +.emotion-31:focus { outline: none; box-shadow: 0 4px 10px -4px rgba(6,22,33,0.3),0 0 0 3px #9DD0E7; } -.emotion-60:hover { +.emotion-31:hover { border: 1px solid #E7EEEC; box-shadow: 0 2px 6px -2px rgba(6,22,33,0.6); } -.emotion-60:hover:focus { +.emotion-31:hover:focus { box-shadow: 0 2px 6px -2px rgba(6,22,33,0.6),0 0 0 3px #9DD0E7; } -.emotion-66 { +.emotion-32 { -webkit-align-items: stretch; -webkit-box-align: stretch; -ms-flex-align: stretch; @@ -52,27 +53,27 @@ exports[`card correctly with and without url 1`] = ` } @media only screen and (max-width:1200px) { - .emotion-66 { + .emotion-32 { grid-template-columns: repeat(2,1fr); } } @media only screen and (max-width:767px) { - .emotion-66 { + .emotion-32 { grid-template-columns: repeat(1,1fr); grid-column-gap: 16px; } } @media only screen and (max-width:420px) { - .emotion-66 { + .emotion-32 { grid-column-gap: 16px; grid-template-columns: 'auto'; grid-row-gap: '16px'; } } -.emotion-42 { +.emotion-18 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -92,7 +93,7 @@ exports[`card correctly with and without url 1`] = ` padding: 32px 24px; } -.emotion-42 p:last-of-type { +.emotion-18 p:last-of-type { margin-bottom: 0; } @@ -100,7 +101,7 @@ exports[`card correctly with and without url 1`] = ` width: 24px; } -.emotion-40 { +.emotion-16 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -113,7 +114,7 @@ exports[`card correctly with and without url 1`] = ` } @media only screen and (max-width:420px) { - .emotion-40 { + .emotion-16 { margin-left: 16px; } } @@ -143,2608 +144,115 @@ exports[`card correctly with and without url 1`] = ` content: ' ➔'; } -.emotion-54 { +.emotion-25 { font-weight: bold; margin-top: auto; } -.emotion-54 > a:hover { +.emotion-25 > a:hover { color: #1A567E; } - -
- +
- - - - -
- - - - - - - -
-

-

- Realm SDKs -

- - - -

- - - Use platform-specific libraries to include and work with the Realm database in your application. - - -

-
-
- - -

- - - - - - - - - Android - - - - - - - - - - - + Realm SDKs + +

+ Use platform-specific libraries to include and work with the Realm database in your application. +

+

+ + Android + + - - - - - - - - - - - iOS - - - - - - - - - - - + + iOS + + - - - - - - - - - - - .Net - - - - - - - - - - - + + .Net + + - - - - - - - - - - - Web - - - - - - - - - - - + + Web + + - - - - - - - - - - - React Native - - - - - - - - - - - + + React Native + + - - - - - - - - - - - Node.js - - - - - - - - -

-
-
-
-
-
-
-
-
-
-
- - + Node.js + +

+
+
+
+ +
- + MongoDB Realm + +

+ Discover how to sync data, define permissions, and connect to other services, including MongoDB Atlas. +

+

- - - -

- - - - - - - -
-

-

- MongoDB Realm -

- - - -

- - - Discover how to sync data, define permissions, and connect to other services, including MongoDB Atlas. - - -

-
-
- -

- - - Learn more about MongoDB Realm Application Services - - -

-
-
-
-
-
- -
- - - + Learn more about MongoDB Realm Application Services + +

+
-
-
+
+
`; diff --git a/tests/unit/__snapshots__/Chapter.test.js.snap b/tests/unit/__snapshots__/Chapter.test.js.snap index b684122f3..4f982892b 100644 --- a/tests/unit/__snapshots__/Chapter.test.js.snap +++ b/tests/unit/__snapshots__/Chapter.test.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` -.emotion-32 { + + .emotion-20 { position: relative; border-radius: 7px; -webkit-transition: border 300ms ease-in-out,box-shadow 300ms ease-in-out; @@ -12,7 +13,7 @@ exports[`renders correctly 1`] = ` color: #21313C; } -.emotion-30 { +.emotion-18 { background-color: #FFFFFF; border-radius: 4px; border: 1px solid #F9FBFA; @@ -20,7 +21,7 @@ exports[`renders correctly 1`] = ` } @media not all and (max-width:767px) { - .emotion-30 { + .emotion-18 { display: grid; grid-template-areas: 'description image' 'guides guides'; padding: 48px 40px; @@ -29,19 +30,19 @@ exports[`renders correctly 1`] = ` } @media not all and (max-width:1023px) { - .emotion-30 { + .emotion-18 { grid-column-gap: 40px; } } @media not all and (max-width:1440px) { - .emotion-30 { + .emotion-18 { grid-column-gap: 50px; } } @media not all and (max-width:1920px) { - .emotion-30 { + .emotion-18 { grid-column-gap: 108px; } } @@ -101,7 +102,7 @@ exports[`renders correctly 1`] = ` margin-top: 8px; } -.emotion-28 { +.emotion-16 { list-style-type: none; list-style-image: url(/assets/lightning-bolt.svg); margin-bottom: 0; @@ -110,7 +111,7 @@ exports[`renders correctly 1`] = ` } @media not all and (max-width:767px) { - .emotion-28 { + .emotion-16 { grid-area: guides; } } @@ -153,352 +154,73 @@ exports[`renders correctly 1`] = ` } } - - - + +
- + Chapter 1 +
+
+ Atlas +
+ - -
-
-
+ + Migrate a MongoDB Replicate Set from AWS to MongoDB Atlas + + + + + + +
`; diff --git a/tests/unit/__snapshots__/DefinitionList.test.js.snap b/tests/unit/__snapshots__/DefinitionList.test.js.snap index 877129519..6e570527e 100644 --- a/tests/unit/__snapshots__/DefinitionList.test.js.snap +++ b/tests/unit/__snapshots__/DefinitionList.test.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DefinitionList renders correctly 1`] = ` -.emotion-2 { + + .emotion-2 { background-color: #F9FBFA; border: 1px solid #B8C4C2; border-radius: 3px; @@ -32,21 +33,22 @@ exports[`DefinitionList renders correctly 1`] = ` }
-
- + + MongoDefaultPartitioner + +
+
- MongoDefaultPartitioner - - -
- - Default - - . Wraps the MongoSamplePartitioner and provides + + Default + + . Wraps the MongoSamplePartitioner and provides help for users of older versions of MongoDB. -
-
+ + +
`; diff --git a/tests/unit/__snapshots__/Emphasis.test.js.snap b/tests/unit/__snapshots__/Emphasis.test.js.snap index 5548c39ee..e8086920d 100644 --- a/tests/unit/__snapshots__/Emphasis.test.js.snap +++ b/tests/unit/__snapshots__/Emphasis.test.js.snap @@ -1,7 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - - Step 3 - + + + Step 3 + + `; diff --git a/tests/unit/__snapshots__/Field.test.js.snap b/tests/unit/__snapshots__/Field.test.js.snap index 68e2498f6..d49a22265 100644 --- a/tests/unit/__snapshots__/Field.test.js.snap +++ b/tests/unit/__snapshots__/Field.test.js.snap @@ -1,63 +1,39 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - - Returns - : - - - - + + Returns:A JSON Web Token string encoded for the provided + .emotion-2 { + background-color: #F9FBFA; + border: 1px solid #B8C4C2; + border-radius: 3px; + font-family: 'Source Code Pro',Menlo,monospace; + font-size: 14px; + line-height: 20px; + -webkit-letter-spacing: 0px; + -moz-letter-spacing: 0px; + -ms-letter-spacing: 0px; + letter-spacing: 0px; + white-space: nowrap; +} + +[data-leafygreen-ui="anchor-inline-code"]:hover > .emotion-2 { + box-shadow: 0 0 0 3px #E7EEEC; +} + +[data-leafygreen-ui="anchor-inline-code"]:focus > .emotion-2 { + box-shadow: 0 0 0 3px #C5E4F2; +} + +.emotion-0 { + font-size: unset; +} + + + payload + + . + `; diff --git a/tests/unit/__snapshots__/Figure.test.js.snap b/tests/unit/__snapshots__/Figure.test.js.snap index 32b56862c..344f8c5d1 100644 --- a/tests/unit/__snapshots__/Figure.test.js.snap +++ b/tests/unit/__snapshots__/Figure.test.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders border correctly when specified as an option 1`] = ` -.emotion-1 { + + .emotion-1 { max-width: 100%; } @@ -13,19 +14,21 @@ exports[`renders border correctly when specified as an option 1`] = ` }
- /images/firstcluster.png -
+ class="figure emotion-1" + style="width: 700px;" + > + /images/firstcluster.png + +
`; exports[`renders correctly 1`] = ` -.emotion-1 { + + .emotion-1 { max-width: 100%; } @@ -34,19 +37,21 @@ exports[`renders correctly 1`] = ` }
- /images/firstcluster.png -
+ class="figure emotion-1" + style="width: 700px;" + > + /images/firstcluster.png + +
`; exports[`renders lightbox correctly when specified as an option 1`] = ` -.emotion-0 { + + .emotion-0 { max-width: 100%; } @@ -67,22 +72,23 @@ exports[`renders lightbox correctly when specified as an option 1`] = ` }
-
- /images/firstcluster.png
- click to enlarge + /images/firstcluster.png +
+ click to enlarge +
-
+
`; diff --git a/tests/unit/__snapshots__/Footnote.test.js.snap b/tests/unit/__snapshots__/Footnote.test.js.snap index f735523f3..6f8ef2261 100644 --- a/tests/unit/__snapshots__/Footnote.test.js.snap +++ b/tests/unit/__snapshots__/Footnote.test.js.snap @@ -1,50 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - +
[ 1 @@ -64,91 +30,10 @@ exports[`renders correctly 1`] = ` ] - - - - - - Numerical footnote. - - - - + Numerical footnote.
-
+ `; diff --git a/tests/unit/__snapshots__/FootnoteReference.test.js.snap b/tests/unit/__snapshots__/FootnoteReference.test.js.snap index 061c4f9b9..f8176f0cd 100644 --- a/tests/unit/__snapshots__/FootnoteReference.test.js.snap +++ b/tests/unit/__snapshots__/FootnoteReference.test.js.snap @@ -1,13 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - - [ - 1 - ] - + + + [1] + + `; diff --git a/tests/unit/__snapshots__/GuidesLandingTree.test.js.snap b/tests/unit/__snapshots__/GuidesLandingTree.test.js.snap index 9e39b7f9e..bb5be5147 100644 --- a/tests/unit/__snapshots__/GuidesLandingTree.test.js.snap +++ b/tests/unit/__snapshots__/GuidesLandingTree.test.js.snap @@ -1,38 +1,325 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` + + .emotion-1 { + width: 100%; +} + .emotion-0 { + margin: 0; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; + border: none; + cursor: pointer; + width: 100%; + min-height: 32px; + padding: 8px 16px; + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-family: Akzidenz,'Helvetica Neue',Helvetica,Arial,sans-serif; + font-weight: normal; + text-align: left; + -webkit-text-decoration: none; + text-decoration: none; + text-transform: capitalize; + color: #3D4F58; + -webkit-transition: background-color 150ms ease-in-out; + transition: background-color 150ms ease-in-out; + background-color: rgba(249,251,250,0); + font-size: 14px; + line-height: 1em; + cursor: default; + font-weight: bold; + -webkit-text-decoration: none; + text-decoration: none; + position: relative; padding-left: 24px; padding-right: 24px; } - - - Overview - - + Overview + + + .emotion-1 { + width: 100%; +} + +.emotion-0 { + margin: 0; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; + border: none; + cursor: pointer; + width: 100%; + min-height: 32px; + padding: 8px 16px; + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-family: Akzidenz,'Helvetica Neue',Helvetica,Arial,sans-serif; + font-weight: normal; + text-align: left; + -webkit-text-decoration: none; + text-decoration: none; + text-transform: capitalize; + color: #3D4F58; + -webkit-transition: background-color 150ms ease-in-out; + transition: background-color 150ms ease-in-out; + background-color: rgba(249,251,250,0); + font-size: 14px; + line-height: 1em; + position: relative; + padding-left: 24px; + padding-right: 24px; +} + +.emotion-0:hover { + background-color: #E7EEEC; + -webkit-text-decoration: none; + text-decoration: none; +} + +.emotion-0:focus { + -webkit-text-decoration: none; + text-decoration: none; + outline: none; +} + +.emotion-0::-moz-focus-inner { + border: 0; +} + +.emotion-0:before { + -webkit-transition: all 150ms ease-in-out; + transition: all 150ms ease-in-out; + content: ''; + -webkit-transform: scaleY(0.3); + -ms-transform: scaleY(0.3); + transform: scaleY(0.3); + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 3px; + height: 20px; + margin: auto; + background-color: #019EE2; + opacity: 0; + border-radius: 0 3px 3px 0; +} + +.emotion-0:focus { + -webkit-text-decoration: none; + text-decoration: none; + color: #0D324F; + background-color: #C5E4F2; +} + +.emotion-0:focus:before { + opacity: 1; + -webkit-transform: scaleY(1); + -ms-transform: scaleY(1); + transform: scaleY(1); +} + +
  • - Atlas - - + Atlas + +
  • + .emotion-1 { + width: 100%; +} + +.emotion-0 { + margin: 0; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: none; + border: none; + cursor: pointer; + width: 100%; + min-height: 32px; + padding: 8px 16px; + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-family: Akzidenz,'Helvetica Neue',Helvetica,Arial,sans-serif; + font-weight: normal; + text-align: left; + -webkit-text-decoration: none; + text-decoration: none; + text-transform: capitalize; + color: #3D4F58; + -webkit-transition: background-color 150ms ease-in-out; + transition: background-color 150ms ease-in-out; + background-color: rgba(249,251,250,0); + font-size: 14px; + line-height: 1em; + position: relative; + padding-left: 24px; + padding-right: 24px; +} + +.emotion-0:hover { + background-color: #E7EEEC; + -webkit-text-decoration: none; + text-decoration: none; +} + +.emotion-0:focus { + -webkit-text-decoration: none; + text-decoration: none; + outline: none; +} + +.emotion-0::-moz-focus-inner { + border: 0; +} + +.emotion-0:before { + -webkit-transition: all 150ms ease-in-out; + transition: all 150ms ease-in-out; + content: ''; + -webkit-transform: scaleY(0.3); + -ms-transform: scaleY(0.3); + transform: scaleY(0.3); + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 3px; + height: 20px; + margin: auto; + background-color: #019EE2; + opacity: 0; + border-radius: 0 3px 3px 0; +} + +.emotion-0:focus { + -webkit-text-decoration: none; + text-decoration: none; + color: #0D324F; + background-color: #C5E4F2; +} + +.emotion-0:focus:before { + opacity: 1; + -webkit-transform: scaleY(1); + -ms-transform: scaleY(1); + transform: scaleY(1); +} + +
  • - CRUD - - + + CRUD + +
  • +
    `; diff --git a/tests/unit/__snapshots__/Heading.test.js.snap b/tests/unit/__snapshots__/Heading.test.js.snap index e6dc68c0f..bd4218821 100644 --- a/tests/unit/__snapshots__/Heading.test.js.snap +++ b/tests/unit/__snapshots__/Heading.test.js.snap @@ -1,7 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` -.emotion-0 { + + .emotion-0 { -webkit-align-self: center; -ms-flex-item-align: center; align-self: center; @@ -15,22 +16,23 @@ exports[`renders correctly 1`] = ` } + + `; diff --git a/tests/unit/__snapshots__/InternalPageNav.test.js.snap b/tests/unit/__snapshots__/InternalPageNav.test.js.snap index ab7e8ea79..d11e2fee3 100644 --- a/tests/unit/__snapshots__/InternalPageNav.test.js.snap +++ b/tests/unit/__snapshots__/InternalPageNav.test.js.snap @@ -1,78 +1,84 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders a page with next and previous links correctly 1`] = ` - + `; exports[`renders a page with no next link correctly 1`] = ` - + `; exports[`renders a page with no previous link correctly 1`] = ` - + `; diff --git a/tests/unit/__snapshots__/Line.test.js.snap b/tests/unit/__snapshots__/Line.test.js.snap index a16aec9a7..ea6e6be10 100644 --- a/tests/unit/__snapshots__/Line.test.js.snap +++ b/tests/unit/__snapshots__/Line.test.js.snap @@ -1,40 +1,51 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders an empty Line node correctly 1`] = ` -
    -
    -
    + +
    +
    +
    +
    `; exports[`renders correctly 1`] = ` + + .emotion-2 { + background-color: #F9FBFA; + border: 1px solid #B8C4C2; + border-radius: 3px; + font-family: 'Source Code Pro',Menlo,monospace; + font-size: 14px; + line-height: 20px; + -webkit-letter-spacing: 0px; + -moz-letter-spacing: 0px; + -ms-letter-spacing: 0px; + letter-spacing: 0px; + white-space: nowrap; +} + +[data-leafygreen-ui="anchor-inline-code"]:hover > .emotion-2 { + box-shadow: 0 0 0 3px #E7EEEC; +} + +[data-leafygreen-ui="anchor-inline-code"]:focus > .emotion-2 { + box-shadow: 0 0 0 3px #C5E4F2; +} + +.emotion-0 { + font-size: unset; +} +
    - -
    + class="line" + > + + N. Virginia (us-east-1) + + +
    `; diff --git a/tests/unit/__snapshots__/LineBlock.test.js.snap b/tests/unit/__snapshots__/LineBlock.test.js.snap index 707f04501..b94cb639d 100644 --- a/tests/unit/__snapshots__/LineBlock.test.js.snap +++ b/tests/unit/__snapshots__/LineBlock.test.js.snap @@ -1,22 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` -
    - -
    + +
    + N. Virginia (us-east-1) +
    +
    `; diff --git a/tests/unit/__snapshots__/Link.test.js.snap b/tests/unit/__snapshots__/Link.test.js.snap index b662238c1..65b91946a 100644 --- a/tests/unit/__snapshots__/Link.test.js.snap +++ b/tests/unit/__snapshots__/Link.test.js.snap @@ -1,61 +1,75 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Link component renders a variety of strings correctly empty string 1`] = ` - - Empty string - + + + Empty string + + `; exports[`Link component renders a variety of strings correctly external URL 1`] = ` - - MongoDB Company - + + + MongoDB Company + + `; exports[`Link component renders a variety of strings correctly identfies mailto links as external urls 1`] = ` - - docs@mongodb.com - + + + docs@mongodb.com + + `; exports[`Link component renders a variety of strings correctly internal link 1`] = ` - - C Driver - + + + C Driver + + `; exports[`Link component renders a variety of strings correctly internal link query param 1`] = ` - - C Driver - + + + C Driver + + `; exports[`Link component renders a variety of strings correctly internal link that already includes trailing slash 1`] = ` - - C Driver - + + + C Driver + + `; exports[`Link component renders a variety of strings correctly internal link with hash 1`] = ` - - C Driver - + + + C Driver + + `; diff --git a/tests/unit/__snapshots__/List.test.js.snap b/tests/unit/__snapshots__/List.test.js.snap index aec65b9d7..80e02925d 100644 --- a/tests/unit/__snapshots__/List.test.js.snap +++ b/tests/unit/__snapshots__/List.test.js.snap @@ -1,29 +1,31 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`List renders correctly 1`] = ` -
      -
    1. - In , click - - Charts - - in the navigation bar. -
    2. -
    3. - If this is the first time you are launching , click + +
        +
      1. + In , click + + Charts + + in the navigation bar. +
      2. +
      3. + If this is the first time you are launching , click - - Activate MongoDB Charts - - . This provisions a new + + Activate MongoDB Charts + + . This provisions a new instance in the project. -
      4. -
      +
    4. +
    + `; diff --git a/tests/unit/__snapshots__/Literal.test.js.snap b/tests/unit/__snapshots__/Literal.test.js.snap index b42783db3..a206e1059 100644 --- a/tests/unit/__snapshots__/Literal.test.js.snap +++ b/tests/unit/__snapshots__/Literal.test.js.snap @@ -1,20 +1,37 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - - - + + .emotion-2 { + background-color: #F9FBFA; + border: 1px solid #B8C4C2; + border-radius: 3px; + font-family: 'Source Code Pro',Menlo,monospace; + font-size: 14px; + line-height: 20px; + -webkit-letter-spacing: 0px; + -moz-letter-spacing: 0px; + -ms-letter-spacing: 0px; + letter-spacing: 0px; + white-space: nowrap; +} + +[data-leafygreen-ui="anchor-inline-code"]:hover > .emotion-2 { + box-shadow: 0 0 0 3px #E7EEEC; +} + +[data-leafygreen-ui="anchor-inline-code"]:focus > .emotion-2 { + box-shadow: 0 0 0 3px #C5E4F2; +} + +.emotion-0 { + font-size: unset; +} + + + N. Virginia (us-east-1) + + `; diff --git a/tests/unit/__snapshots__/LiteralInclude.test.js.snap b/tests/unit/__snapshots__/LiteralInclude.test.js.snap index 04a39d80f..cc2f253ac 100644 --- a/tests/unit/__snapshots__/LiteralInclude.test.js.snap +++ b/tests/unit/__snapshots__/LiteralInclude.test.js.snap @@ -1,23 +1,197 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders correctly 1`] = ` - + .emotion-1 { + border-spacing: 0; + vertical-align: top; + padding: 0 16px; +} + +.emotion-4 { + color: inherit; + font-size: 13px; + font-family: 'Source Code Pro',Menlo,monospace; + line-height: 24px; +} + +.emotion-5 { + border: 2px solid; + overflow-x: auto; + border-radius: 0; + border: 0; + padding-top: 8px; + padding-bottom: 8px; + margin: 0; + position: relative; + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; + white-space: pre; + border-color: #E7EEEC; + background-color: #F9FBFA; + color: #061621; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding-top: 6px; + padding-bottom: 6px; +} + +@media only screen and (max-device-width:812px) and (-webkit-min-device-pixel-ratio:2) { + .emotion-5 { + white-space: pre-wrap; + } +} + +@media only screen and (min-device-width:813px) and (-webkit-min-device-pixel-ratio:2) { + .emotion-5 { + white-space: pre; } -/> +} + +.emotion-8 { + border: 1px solid #E7EEEC; + border-radius: 4px; + overflow: hidden; +} + +.emotion-7 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} + +.emotion-3 { + border-spacing: 0; + width: 100%; +} + +.emotion-2 { + background-color: #FEF7E3; + background-image: none; + background-attachment: fixed; +} + +.emotion-2 > td { + border-top: 1px solid #FEF2C8; +} + +.emotion-2 + tr > td { + border-top: 1px solid #FEF2C8; +} + +.emotion-2 + .emotion-2 > td { + border-top: 0; +} + +.emotion-2:last-child > td { + border-bottom: 1px solid #FEF2C8; +} + +.emotion-0 { + border-spacing: 0; + vertical-align: top; + padding: 0 16px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + text-align: right; + padding-left: 8px; + padding-right: 0; + color: #86681D; +} + +.emotion-6 { + width: 38px; + border-left: solid 1px; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + padding-top: 6px; + min-height: 36px; + padding-top: 4px; + min-height: 36px; + padding-top: 4px; + border-color: #E7EEEC; + background-color: white; +} + +.emotion-9 { + display: table; + margin: 16px 0; + min-width: 150px; + table-layout: fixed; + width: 100%; +} + +.emotion-9 > div > div { + width: unset; +} + +.emotion-9 button > div > div { + font-size: 16px; +} + +
    +
    +
    +
    +          
    +            
    +              
    +                
    +                  
    +                  
    +                
    +              
    +            
    + 1 + + sample code +
    +
    +
    +
    +
    +
    +
    + `; diff --git a/tests/unit/__snapshots__/MongoWebShell.test.js.snap b/tests/unit/__snapshots__/MongoWebShell.test.js.snap index 3be074a4e..9ba8d17d0 100644 --- a/tests/unit/__snapshots__/MongoWebShell.test.js.snap +++ b/tests/unit/__snapshots__/MongoWebShell.test.js.snap @@ -1,33 +1,37 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`correctly renders a MongoDB Web Shell 1`] = ` -.emotion-0 { + + .emotion-0 { border: 0; }