From 47c529a9b2b47133e7e7b19bc6922cc0edc92f94 Mon Sep 17 00:00:00 2001 From: Filip Satek Date: Fri, 23 Aug 2024 15:01:28 +0200 Subject: [PATCH 01/13] feat: migrate to @ima/testing-library --- .gitignore | 1 + itl.tgz | Bin 0 -> 29421 bytes jest.config.base.js | 7 +- package-lock.json | 486 +++++++++++++++--- package.json | 7 + packages/plugin-atoms/jest.config.js | 16 +- packages/plugin-atoms/jestSetup.js | 10 +- .../src/components/__tests__/ImageSpec.jsx | 89 ++-- .../src/components/__tests__/SizerSpec.jsx | 57 +- 9 files changed, 501 insertions(+), 172 deletions(-) create mode 100644 itl.tgz diff --git a/.gitignore b/.gitignore index 13b47610..56ffb98f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ .eslintcache *.tgz **/.turbo +!itl.tgz diff --git a/itl.tgz b/itl.tgz new file mode 100644 index 0000000000000000000000000000000000000000..e68d905a0786a37682c21cbba224ab3709a6bca5 GIT binary patch literal 29421 zcmaHyQ*(C=g0_QbYrYhq`DiS6V`CU!EhZEIrN*2K20=Q;C!>pN?mtJ4>?y7%tY z-50fY*T3plq|tC-{~ZvZOCekB4e7;MtAODZ#~E`0>_6?TrNt?s}mJ6J3AaroeSq?gcuNV40+im3Y|?a>+LEgdMC$$+@3zto;T$mc`SE7TlA_X zCyP(LtCscbYM2s0j5XDNaB#G=^(PNSYC>1`&k^2KE=1yQ@tekwK#Mj)ePsGIIFX~7+veT7G!z=p~e1!nt<8sq4r70NOscGUl zr$g4`R}yDD{Dp*Eqa-nFAM_Tk1ys6k0eLzS97L+IlEQ4=wit5>ZzOjrl#6#nj-rZY zZ~af%J2dlirXg=%rwd4QY(iP-F>k5n(o58T9AjmcqNm{gUI;K-6yqS%RS-oIr0{c_ zX)NZr3PRi*GPs;cN&tuw6B=pV7y}E?N1HYqko^p7=N+!8q`b-KM79e8jF5(?CgPNA zQb@T5C|_zmR47>&@e;G95>f7Ud90-Rf<;^yUKW)&BbCT^=qQQr8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ANhmw{QL+HP z5mOEfA(zhg)}&l}){!dQ~{Hnj0cJKK+~N$FZ8 z?v#?x_3Jwk{I;5R$u$-;8*>VkqIaLxw%TPJhK`d&A$9K9V6-Ne9#_S&y$K&$wT zyHsq4!-BuLU%ijZoy?j^SWnvkXwF zQo2W#c0hXQ$*0wu#L|4$hRVo}xCzkotSyvMs$j&V z;bI zko1^UM2wipS9hl{4AB%@9@Z{&fdrKbFLP*p=n7Ib0m*7)$z5s-!824H9=Lg^zfuff5j=ZY@E(Wn=JB-N ztAk5BF|evrdDm^w11^H%b{ksMbG@u0#=snQMXc`nJ!2yksahElr(eyhhSzJ2SXv!_ z{J~yWW+ihGDK};RAh=e;vZ*E?>=R%xBb`=?`)cyy>rnB{IhK5$x@b==#iuN}5e37y zE65AmW&yRMf?kPSi*1eHT!t=9CoV|I9!*yP3*C2%?s~v5*}Yjcpo@7s{_Ni5&R<0} z=aZRF^*?#mu<|zxS5MfAzc@L+7qu^vJ%ipg1%Q7Z)$n(>Aa1$Gt;Z!L62Pz+40@yM zn*WhwNqWF9DdZyX9rtP*}G1HVNI P1JD=S(k&2D&=CIvI;chu literal 0 HcmV?d00001 diff --git a/jest.config.base.js b/jest.config.base.js index c3ba9240..44869634 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -3,7 +3,6 @@ */ module.exports = { rootDir: '.', - testEnvironment: 'node', testRegex: '(/__tests__/).*Spec\\.jsx?$', modulePaths: ['/'], transformIgnorePatterns: [ @@ -14,6 +13,9 @@ module.exports = { '@swc/jest', { jsc: { + experimental: { + plugins: [['swc_mut_cjs_exports', {}]], + }, target: 'es2022', parser: { syntax: 'ecmascript', @@ -31,6 +33,9 @@ module.exports = { '@swc/jest', { jsc: { + experimental: { + plugins: [['swc_mut_cjs_exports', {}]], + }, target: 'es2022', parser: { syntax: 'typescript', diff --git a/package-lock.json b/package-lock.json index 454287b9..6f5a7d70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,9 +17,15 @@ "@cfaester/enzyme-adapter-react-18": "^0.7.0", "@changesets/cli": "^2.26.1", "@ima/plugin-cli": "^19.1.2", + "@ima/testing-library": "itl.tgz", "@swc/jest": "^0.2.26", + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.4.8", + "@testing-library/react": "^16.0.0", "@types/jest": "^29.5.1", "@types/node": "^20.2.5", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.59.8", "enzyme": "3.11.0", @@ -48,6 +54,7 @@ "stylelint-config-standard": "^33.0.0", "stylelint-declaration-block-no-ignored-properties": "^2.7.0", "stylelint-order": "^6.0.3", + "swc_mut_cjs_exports": "^0.99.0", "to-mock": "^1.6.2", "turbo": "^1.12.5", "type-fest": "^4.12.0", @@ -63,6 +70,13 @@ "node": ">=0.10.0" } }, + "node_modules/@adobe/css-tools": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", + "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -2855,6 +2869,20 @@ "node": ">=8" } }, + "node_modules/@ima/testing-library": { + "version": "19.6.0", + "resolved": "file:itl.tgz", + "integrity": "sha512-nuq0P4T0xkAoEt2GDuaQwdCcs5QXi8Gi93HP4V/dtzbgrGTLQktvE0SBOPFJwHYG2cO3QKlgdts6a0fsWihGzg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@ima/core": ">=19.0.0", + "@ima/react-page-renderer": ">=19.0.0", + "@testing-library/dom": ">=10.0.0", + "@testing-library/jest-dom": ">=6.0.0", + "@testing-library/react": ">=16.0.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -4126,13 +4154,14 @@ } }, "node_modules/@swc/core": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.6.tgz", - "integrity": "sha512-A7iK9+1qzTCIuc3IYcS8gPHCm9bZVKUJrfNnwveZYyo6OFp3jLno4WOM2yBy5uqedgYATEiWgBYHKq37KrU6IA==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.14.tgz", + "integrity": "sha512-9aeXeifnyuvc2pcuuhPQgVUwdpGEzZ+9nJu0W8/hNl/aESFsJGR5i9uQJRGu0atoNr01gK092fvmqMmQAPcKow==", "hasInstallScript": true, + "license": "Apache-2.0", "dependencies": { - "@swc/counter": "^0.1.2", - "@swc/types": "^0.1.5" + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.12" }, "engines": { "node": ">=10" @@ -4142,19 +4171,19 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.4.6", - "@swc/core-darwin-x64": "1.4.6", - "@swc/core-linux-arm-gnueabihf": "1.4.6", - "@swc/core-linux-arm64-gnu": "1.4.6", - "@swc/core-linux-arm64-musl": "1.4.6", - "@swc/core-linux-x64-gnu": "1.4.6", - "@swc/core-linux-x64-musl": "1.4.6", - "@swc/core-win32-arm64-msvc": "1.4.6", - "@swc/core-win32-ia32-msvc": "1.4.6", - "@swc/core-win32-x64-msvc": "1.4.6" + "@swc/core-darwin-arm64": "1.7.14", + "@swc/core-darwin-x64": "1.7.14", + "@swc/core-linux-arm-gnueabihf": "1.7.14", + "@swc/core-linux-arm64-gnu": "1.7.14", + "@swc/core-linux-arm64-musl": "1.7.14", + "@swc/core-linux-x64-gnu": "1.7.14", + "@swc/core-linux-x64-musl": "1.7.14", + "@swc/core-win32-arm64-msvc": "1.7.14", + "@swc/core-win32-ia32-msvc": "1.7.14", + "@swc/core-win32-x64-msvc": "1.7.14" }, "peerDependencies": { - "@swc/helpers": "^0.5.0" + "@swc/helpers": "*" }, "peerDependenciesMeta": { "@swc/helpers": { @@ -4163,12 +4192,13 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.6.tgz", - "integrity": "sha512-bpggpx/BfLFyy48aUKq1PsNUxb7J6CINlpAUk0V4yXfmGnpZH80Gp1pM3GkFDQyCfq7L7IpjPrIjWQwCrL4hYw==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.14.tgz", + "integrity": "sha512-V0OUXjOH+hdGxDYG8NkQzy25mKOpcNKFpqtZEzLe5V/CpLJPnpg1+pMz70m14s9ZFda9OxsjlvPbg1FLUwhgIQ==", "cpu": [ "arm64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "darwin" @@ -4178,12 +4208,13 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.6.tgz", - "integrity": "sha512-vJn+/ZuBTg+vtNkcmgZdH6FQpa0hFVdnB9bAeqYwKkyqP15zaPe6jfC+qL2y/cIeC7ASvHXEKrnCZgBLxfVQ9w==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.14.tgz", + "integrity": "sha512-9iFvUnxG6FC3An5ogp5jbBfQuUmTTwy8KMB+ZddUoPB3NR1eV+Y9vOh/tfWcenSJbgOKDLgYC5D/b1mHAprsrQ==", "cpu": [ "x64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "darwin" @@ -4193,12 +4224,13 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.6.tgz", - "integrity": "sha512-hEmYcB/9XBAl02MtuVHszhNjQpjBzhk/NFulnU33tBMbNZpy2TN5yTsitezMq090QXdDz8sKIALApDyg07ZR8g==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.14.tgz", + "integrity": "sha512-zGJsef9qPivKSH8Vv4F/HiBXBTHZ5Hs3ZjVGo/UIdWPJF8fTL9OVADiRrl34Q7zOZEtGXRwEKLUW1SCQcbDvZA==", "cpu": [ "arm" ], + "license": "Apache-2.0", "optional": true, "os": [ "linux" @@ -4208,12 +4240,13 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.6.tgz", - "integrity": "sha512-/UCYIVoGpm2YVvGHZM2QOA3dexa28BjcpLAIYnoCbgH5f7ulDhE8FAIO/9pasj+kixDBsdqewHfsNXFYlgGJjQ==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.14.tgz", + "integrity": "sha512-AxV3MPsoI7i4B8FXOew3dx3N8y00YoJYvIPfxelw07RegeCEH3aHp2U2DtgbP/NV1ugZMx0TL2Z2DEvocmA51g==", "cpu": [ "arm64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" @@ -4223,12 +4256,13 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.6.tgz", - "integrity": "sha512-LGQsKJ8MA9zZ8xHCkbGkcPSmpkZL2O7drvwsGKynyCttHhpwVjj9lguhD4DWU3+FWIsjvho5Vu0Ggei8OYi/Lw==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.14.tgz", + "integrity": "sha512-JDLdNjUj3zPehd4+DrQD8Ltb3B5lD8D05IwePyDWw+uR/YPc7w/TX1FUVci5h3giJnlMCJRvi1IQYV7K1n7KtQ==", "cpu": [ "arm64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" @@ -4238,12 +4272,13 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.6.tgz", - "integrity": "sha512-10JL2nLIreMQDKvq2TECnQe5fCuoqBHu1yW8aChqgHUyg9d7gfZX/kppUsuimqcgRBnS0AjTDAA+JF6UsG/2Yg==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.14.tgz", + "integrity": "sha512-Siy5OvPCLLWmMdx4msnEs8HvEVUEigSn0+3pbLjv78iwzXd0qSBNHUPZyC1xeurVaUbpNDxZTpPRIwpqNE2+Og==", "cpu": [ "x64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" @@ -4253,12 +4288,13 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.6.tgz", - "integrity": "sha512-EGyjFVzVY6Do89x8sfah7I3cuP4MwtwzmA6OlfD/KASqfCFf5eIaEBMbajgR41bVfMV7lK72lwAIea5xEyq1AQ==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.14.tgz", + "integrity": "sha512-FtEGm9mwtRYQNK43WMtUIadxHs/ja2rnDurB99os0ZoFTGG2IHuht2zD97W0wB8JbqEabT1XwSG9Y5wmN+ciEQ==", "cpu": [ "x64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" @@ -4268,12 +4304,13 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.6.tgz", - "integrity": "sha512-gfW9AuXvwSyK07Vb8Y8E9m2oJZk21WqcD+X4BZhkbKB0TCZK0zk1j/HpS2UFlr1JB2zPKPpSWLU3ll0GEHRG2A==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.14.tgz", + "integrity": "sha512-Jp8KDlfq7Ntt2/BXr0y344cYgB1zf0DaLzDZ1ZJR6rYlAzWYSccLYcxHa97VGnsYhhPspMpmCvHid97oe2hl4A==", "cpu": [ "arm64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" @@ -4283,12 +4320,13 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.6.tgz", - "integrity": "sha512-ZuQm81FhhvNVYtVb9GfZ+Du6e7fZlkisWvuCeBeRiyseNt1tcrQ8J3V67jD2nxje8CVXrwG3oUIbPcybv2rxfQ==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.14.tgz", + "integrity": "sha512-I+cFsXF0OU0J9J4zdWiQKKLURO5dvCujH9Jr8N0cErdy54l9d4gfIxdctfTF+7FyXtWKLTCkp+oby9BQhkFGWA==", "cpu": [ "ia32" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" @@ -4298,12 +4336,13 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.6.tgz", - "integrity": "sha512-UagPb7w5V0uzWSjrXwOavGa7s9iv3wrVdEgWy+/inm0OwY4lj3zpK9qDnMWAwYLuFwkI3UG4Q3dH8wD+CUUcjw==", + "version": "1.7.14", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.14.tgz", + "integrity": "sha512-NNrprQCK6d28mG436jVo2TD+vACHseUECacEBGZ9Ef0qfOIWS1XIt2MisQKG0Oea2VvLFl6tF/V4Lnx/H0Sn3Q==", "cpu": [ "x64" ], + "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "win32" @@ -4335,9 +4374,274 @@ } }, "node_modules/@swc/types": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz", - "integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.12.tgz", + "integrity": "sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==", + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "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/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "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": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/dom/node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "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": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "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": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "6.4.8", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.8.tgz", + "integrity": "sha512-JD0G+Zc38f5MBHA4NgxQMR5XtO5Jx9g86jqturNTt2WUfRmLDIY7iKkWHDCCTiDuFMre6nxAD5wHw9W5kI4rGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "@babel/runtime": "^7.9.2", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "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/jest-dom/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@testing-library/jest-dom/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/react": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.0.0.tgz", + "integrity": "sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } }, "node_modules/@tootallnate/once": { "version": "2.0.0", @@ -4361,6 +4665,13 @@ "resolved": "https://registry.npmjs.org/@types/archy/-/archy-0.0.32.tgz", "integrity": "sha512-5ZZ5+YGmUE01yejiXsKnTcvhakMZ2UllZlMsQni53Doc1JWhe21ia8VntRoRD6fAEWw08JBh/z9qQHJ+//MrIg==" }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -4595,21 +4906,25 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.65", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.65.tgz", - "integrity": "sha512-98TsY0aW4jqx/3RqsUXwMDZSWR1Z4CUlJNue8ueS2/wcxZOsz4xmW1X8ieaWVRHcmmQM3R8xVA4XWB3dJnWwDQ==", + "version": "18.3.3", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", + "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", "dev": true, + "license": "MIT", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, - "node_modules/@types/scheduler": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==", - "dev": true + "node_modules/@types/react-dom": { + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } }, "node_modules/@types/semver": { "version": "7.5.8", @@ -5362,6 +5677,16 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -7402,6 +7727,13 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true, + "license": "MIT" + }, "node_modules/cssdb": { "version": "7.11.2", "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-7.11.2.tgz", @@ -7800,6 +8132,16 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -7866,6 +8208,13 @@ "node": ">=6.0.0" } }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "license": "MIT" + }, "node_modules/dom-serializer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", @@ -14481,6 +14830,16 @@ "yallist": "^3.0.2" } }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "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", @@ -19688,6 +20047,17 @@ "node": ">= 10" } }, + "node_modules/swc_mut_cjs_exports": { + "version": "0.99.0", + "resolved": "https://registry.npmjs.org/swc_mut_cjs_exports/-/swc_mut_cjs_exports-0.99.0.tgz", + "integrity": "sha512-v3/AiUXrM/6ELCUo7zDHszpYYK0iFmGsnFSAUTsqGFkLH6rFq055L14Wg95agAhwDxO1M7e3nQbxsIUbFv4Khg==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@swc/core": "^1.7.0", + "@swc/jest": "^0.2.36" + } + }, "node_modules/swc-loader": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.3.tgz", diff --git a/package.json b/package.json index 1278efeb..57c3f18d 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,15 @@ "@cfaester/enzyme-adapter-react-18": "^0.7.0", "@changesets/cli": "^2.26.1", "@ima/plugin-cli": "^19.1.2", + "@ima/testing-library": "itl.tgz", "@swc/jest": "^0.2.26", + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.4.8", + "@testing-library/react": "^16.0.0", "@types/jest": "^29.5.1", "@types/node": "^20.2.5", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.59.8", "enzyme": "3.11.0", @@ -66,6 +72,7 @@ "stylelint-config-standard": "^33.0.0", "stylelint-declaration-block-no-ignored-properties": "^2.7.0", "stylelint-order": "^6.0.3", + "swc_mut_cjs_exports": "^0.99.0", "to-mock": "^1.6.2", "turbo": "^1.12.5", "type-fest": "^4.12.0", diff --git a/packages/plugin-atoms/jest.config.js b/packages/plugin-atoms/jest.config.js index 3f897ff7..834a51b2 100644 --- a/packages/plugin-atoms/jest.config.js +++ b/packages/plugin-atoms/jest.config.js @@ -1,6 +1,20 @@ +const { + setImaTestingLibraryServerConfig, + FALLBACK_APP_MAIN_PATH, + FALLBACK_APPLICATION_FOLDER, +} = require('@ima/testing-library/server'); + const base = require('../../jest.config.base.js'); +setImaTestingLibraryServerConfig({ + applicationFolder: FALLBACK_APPLICATION_FOLDER, +}); + module.exports = { ...base, - setupFiles: ['/jestSetup.js'], + preset: '@ima/testing-library', + moduleNameMapper: { + 'app/main': FALLBACK_APP_MAIN_PATH, + }, + setupFiles: ['./jestSetup.js'], }; diff --git a/packages/plugin-atoms/jestSetup.js b/packages/plugin-atoms/jestSetup.js index 76c240a6..92a8b665 100644 --- a/packages/plugin-atoms/jestSetup.js +++ b/packages/plugin-atoms/jestSetup.js @@ -1,4 +1,8 @@ -import Adapter from '@cfaester/enzyme-adapter-react-18'; -import Enzyme from 'enzyme'; +import { + FALLBACK_APP_MAIN_PATH, + setImaTestingLibraryClientConfig, +} from '@ima/testing-library'; -Enzyme.configure({ adapter: new Adapter() }); +setImaTestingLibraryClientConfig({ + appMainPath: FALLBACK_APP_MAIN_PATH, +}); diff --git a/packages/plugin-atoms/src/components/__tests__/ImageSpec.jsx b/packages/plugin-atoms/src/components/__tests__/ImageSpec.jsx index 99cc54a1..a907eb17 100644 --- a/packages/plugin-atoms/src/components/__tests__/ImageSpec.jsx +++ b/packages/plugin-atoms/src/components/__tests__/ImageSpec.jsx @@ -1,74 +1,43 @@ -import { Router, Window } from '@ima/core'; -import * as hooks from '@ima/react-page-renderer'; -import classnames from 'classnames'; -import { shallow } from 'enzyme'; -import { Infinite } from 'infinite-circle'; -import { withContext } from 'shallow-with-context'; -import { toMockedInstance } from 'to-mock'; +import '../../main'; // To ensure that pluginLoader is called -import ComponentPositions from '../../ComponentPositions'; -import UIComponentHelper from '../../UIComponentHelper'; -import Visibility from '../../Visibility'; -import { Image } from '../Image'; +import { renderWithContext } from '@ima/testing-library'; -jest.mock('@ima/react-page-renderer', () => { - return { - __esModule: true, - ...jest.requireActual('@ima/react-page-renderer'), - }; -}); +import { Image } from '../Image'; describe('Image component', () => { - let wrapper = null; - - let router = toMockedInstance(Router); - let window = toMockedInstance(Window); - let visibility = toMockedInstance(Visibility); - let componentPositions = toMockedInstance(ComponentPositions); - let infinite = toMockedInstance(Infinite); - let uiComponentHelper = new UIComponentHelper( - router, - window, - visibility, - componentPositions, - infinite, - classnames - ); - - let context = { - $Utils: { - $UIComponentHelper: uiComponentHelper, - $CssClasses: classnames, - }, - }; - const Img = withContext(Image, context); - - beforeEach(() => { - jest.spyOn(hooks, 'useComponentUtils').mockReturnValue(context.$Utils); - }); - - it('should has defined default attributes', () => { - wrapper = shallow( - , - { context } - ); - expect(wrapper.html()).toMatchInlineSnapshot( - `""` + it('should has defined default attributes', async () => { + const { container } = await renderWithContext( + ); + + expect(container.firstChild).toMatchInlineSnapshot(` + + `); }); - it('should be responsive in layout', () => { - wrapper = shallow( - { + const { container } = await renderWithContext( + , - { context } - ); - expect(wrapper.html()).toMatchInlineSnapshot( - `""` + /> ); + expect(container.firstChild).toMatchInlineSnapshot(` + + `); }); }); diff --git a/packages/plugin-atoms/src/components/__tests__/SizerSpec.jsx b/packages/plugin-atoms/src/components/__tests__/SizerSpec.jsx index 1e5fd331..1bd912f6 100644 --- a/packages/plugin-atoms/src/components/__tests__/SizerSpec.jsx +++ b/packages/plugin-atoms/src/components/__tests__/SizerSpec.jsx @@ -1,68 +1,27 @@ -import * as hooks from '@ima/react-page-renderer'; -import classnames from 'classnames'; -import { shallow } from 'enzyme'; -import { Infinite } from 'infinite-circle'; -import { withContext } from 'shallow-with-context'; -import { toMockedInstance } from 'to-mock'; +import { renderWithContext } from '@ima/testing-library'; -import dummyRouter from '../../__tests__/mocks/router'; -import dummyWindow from '../../__tests__/mocks/window'; -import ComponentPositions from '../../ComponentPositions'; -import UIComponentHelper from '../../UIComponentHelper'; -import Visibility from '../../Visibility'; import { Sizer } from '../Sizer'; -jest.mock('@ima/react-page-renderer', () => { - return { - __esModule: true, - ...jest.requireActual('@ima/react-page-renderer'), - }; -}); - describe('Sizer component', () => { let wrapper = null; - let visibility = toMockedInstance(Visibility); - let componentPositions = toMockedInstance(ComponentPositions); - let infinite = toMockedInstance(Infinite); - let uiComponentHelper = new UIComponentHelper( - dummyRouter, - dummyWindow, - visibility, - componentPositions, - infinite, - classnames - ); - let context = { - $Utils: { - $UIComponentHelper: uiComponentHelper, - $CssClasses: classnames, - }, - }; - - beforeEach(() => { - const Component = withContext(Sizer, context); - - jest.spyOn(hooks, 'useComponentUtils').mockReturnValue(context.$Utils); - wrapper = shallow(, { context }); + beforeEach(async () => { + wrapper = await renderWithContext(); }); it('should set atm-sizer class', () => { - expect(wrapper.hasClass('atm-sizer')).toBeTruthy(); + expect(wrapper.container.firstChild).toHaveClass('atm-sizer'); }); it('should set atm-placeholder class if is defined placeholder props', () => { - wrapper.setProps({ placeholder: true }); + wrapper.rerender(); - expect(wrapper.hasClass('atm-placeholder')).toBeTruthy(); + expect(wrapper.container.firstChild).toHaveClass('atm-placeholder'); }); it('should calculate ratio between width and height', () => { - wrapper.setProps({ - width: 16, - height: 9, - }); + wrapper.rerender(); - expect(wrapper.get(0).props.style.paddingTop).toBe('56.25%'); + expect(wrapper.container.firstChild.style.paddingTop).toBe('56.25%'); }); }); From 0cdfe97ab97c06c1b141d187e97cbe2dc1b63e9d Mon Sep 17 00:00:00 2001 From: Filip Satek Date: Wed, 28 Aug 2024 17:08:34 +0200 Subject: [PATCH 02/13] test: migrate to IMA Testing Library --- .gitignore | 1 + jest.config.itl.js | 20 ++ .../jestSetup.js => jestSetup.itl.js | 0 package.json | 3 - packages/plugin-atoms/jest.config.js | 19 +- .../__tests__/__snapshots__/mountSpec.js.snap | 5 - .../plugin-atoms/src/__tests__/mountSpec.js | 107 ------ .../src/components/__tests__/IframeSpec.jsx | 38 +++ .../__snapshots__/IframeSpec.jsx.snap | 25 ++ packages/plugin-select/jest.config.js | 9 +- packages/plugin-select/jestSetupFile.js | 11 - .../src/select/__tests__/SelectSpec.js | 197 ++++++----- .../__snapshots__/SelectSpec.js.snap | 322 +++++++----------- .../EnzymePageRenderer.js | 2 + 14 files changed, 312 insertions(+), 447 deletions(-) create mode 100644 jest.config.itl.js rename packages/plugin-atoms/jestSetup.js => jestSetup.itl.js (100%) delete mode 100644 packages/plugin-atoms/src/__tests__/__snapshots__/mountSpec.js.snap delete mode 100644 packages/plugin-atoms/src/__tests__/mountSpec.js create mode 100644 packages/plugin-atoms/src/components/__tests__/IframeSpec.jsx create mode 100644 packages/plugin-atoms/src/components/__tests__/__snapshots__/IframeSpec.jsx.snap delete mode 100644 packages/plugin-select/jestSetupFile.js diff --git a/.gitignore b/.gitignore index 56ffb98f..15adfe11 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ .eslintcache *.tgz **/.turbo +.swc/ !itl.tgz diff --git a/jest.config.itl.js b/jest.config.itl.js new file mode 100644 index 00000000..306261f0 --- /dev/null +++ b/jest.config.itl.js @@ -0,0 +1,20 @@ +const { + setImaTestingLibraryServerConfig, + FALLBACK_APP_MAIN_PATH, + FALLBACK_APPLICATION_FOLDER, +} = require('@ima/testing-library/server'); + +const base = require('./jest.config.base.js'); + +setImaTestingLibraryServerConfig({ + applicationFolder: FALLBACK_APPLICATION_FOLDER, +}); + +module.exports = { + ...base, + preset: '@ima/testing-library', + moduleNameMapper: { + 'app/main': FALLBACK_APP_MAIN_PATH, + }, + setupFiles: ['/../../jestSetup.itl.js'], +}; diff --git a/packages/plugin-atoms/jestSetup.js b/jestSetup.itl.js similarity index 100% rename from packages/plugin-atoms/jestSetup.js rename to jestSetup.itl.js diff --git a/package.json b/package.json index 57c3f18d..e97374e7 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "devDependencies": { "@babel/eslint-parser": "^7.21.8", "@babel/preset-react": "^7.22.3", - "@cfaester/enzyme-adapter-react-18": "^0.7.0", "@changesets/cli": "^2.26.1", "@ima/plugin-cli": "^19.1.2", "@ima/testing-library": "itl.tgz", @@ -46,8 +45,6 @@ "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^5.59.8", "@typescript-eslint/parser": "^5.59.8", - "enzyme": "3.11.0", - "enzyme-to-json": "^3.6.2", "eslint": "^8.41.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-import": "^2.27.5", diff --git a/packages/plugin-atoms/jest.config.js b/packages/plugin-atoms/jest.config.js index 834a51b2..3dd3a9d3 100644 --- a/packages/plugin-atoms/jest.config.js +++ b/packages/plugin-atoms/jest.config.js @@ -1,20 +1,5 @@ -const { - setImaTestingLibraryServerConfig, - FALLBACK_APP_MAIN_PATH, - FALLBACK_APPLICATION_FOLDER, -} = require('@ima/testing-library/server'); - -const base = require('../../jest.config.base.js'); - -setImaTestingLibraryServerConfig({ - applicationFolder: FALLBACK_APPLICATION_FOLDER, -}); +const itl = require('../../jest.config.itl.js'); module.exports = { - ...base, - preset: '@ima/testing-library', - moduleNameMapper: { - 'app/main': FALLBACK_APP_MAIN_PATH, - }, - setupFiles: ['./jestSetup.js'], + ...itl, }; diff --git a/packages/plugin-atoms/src/__tests__/__snapshots__/mountSpec.js.snap b/packages/plugin-atoms/src/__tests__/__snapshots__/mountSpec.js.snap deleted file mode 100644 index 92892587..00000000 --- a/packages/plugin-atoms/src/__tests__/__snapshots__/mountSpec.js.snap +++ /dev/null @@ -1,5 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`UIAtoms mount rendering should render atoms without noscript tag: should render Iframe without noscript tag 1`] = `"
"`; - -exports[`UIAtoms mount rendering should render atoms without noscript tag: should render Image without noscript tag 1`] = `""`; diff --git a/packages/plugin-atoms/src/__tests__/mountSpec.js b/packages/plugin-atoms/src/__tests__/mountSpec.js deleted file mode 100644 index 556cd841..00000000 --- a/packages/plugin-atoms/src/__tests__/mountSpec.js +++ /dev/null @@ -1,107 +0,0 @@ -import { PageContext } from '@ima/react-page-renderer'; -import classnames from 'classnames'; -import { mount } from 'enzyme'; -import { Infinite } from 'infinite-circle'; -import { JSDOM } from 'jsdom'; -// eslint-disable-next-line no-unused-vars -import { useState } from 'react'; -import { toMockedInstance } from 'to-mock'; - -import _router from './mocks/router'; -import _settings from './mocks/settings'; -import _window from './mocks/window'; -import ComponentPositions from '../ComponentPositions'; -import * as UIAtoms from '../main'; -import UIComponentHelper from '../UIComponentHelper'; -// eslint-disable-next-line import/order -import Visibility from '../Visibility'; - -jest.mock('react', () => ({ - ...jest.requireActual('react'), - useState: () => [true, () => {}], -})); - -const jsdom = new JSDOM(''); -const { window } = jsdom; - -global.window = window; -global.document = window.document; -global.navigator = { - userAgent: 'node.js', -}; - -const visibility = toMockedInstance(Visibility); -const mockPosition = { - height: 0, -}; -const componentPositions = toMockedInstance(ComponentPositions, { - getWindowViewportRect: () => mockPosition, -}); -const infinite = toMockedInstance(Infinite); - -function getComponentOptions(overrideSettings = {}) { - const $Settings = Object.assign({}, _settings, overrideSettings); - - const $UIComponentHelper = new UIComponentHelper( - _router, - _window, - componentPositions, - visibility, - infinite, - classnames - ); - - const context = { - $Utils: { - $Settings, - $UIComponentHelper, - $CssClasses: classnames, - }, - }; - const mountOptions = { - context, - someProp: true, - }; - - return mountOptions; -} - -describe('UIAtoms mount rendering', () => { - let wrapper = null; - - afterEach(() => { - if (wrapper) { - wrapper.unmount(); - } - }); - - describe('should render atoms without noscript tag: ', () => { - let mountOptions = getComponentOptions(); - - it('should render Image without noscript tag', () => { - const Component = UIAtoms.Image; - wrapper = mount( - - - , - mountOptions - ); - - expect(wrapper.html()).toMatchSnapshot(); - expect(wrapper.find('noscript')).toHaveLength(0); - }); - - it('should render Iframe without noscript tag', () => { - const Component = UIAtoms.Iframe; - wrapper = mount( - - - , - mountOptions - ); - - expect(wrapper.html()).toMatchSnapshot(); - expect(wrapper.find('noscript')).toHaveLength(0); - }); - }); -}); diff --git a/packages/plugin-atoms/src/components/__tests__/IframeSpec.jsx b/packages/plugin-atoms/src/components/__tests__/IframeSpec.jsx new file mode 100644 index 00000000..05877b44 --- /dev/null +++ b/packages/plugin-atoms/src/components/__tests__/IframeSpec.jsx @@ -0,0 +1,38 @@ +import { renderWithContext, waitFor } from '@ima/testing-library'; + +import { Iframe, Visibility } from '../../main'; + +describe('Iframe', () => { + it('should render with noscript tag by default', async () => { + const { container } = await renderWithContext( +