From 470d06d763cf099ee1ded9db3bae29f4994e515e Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 15 Feb 2022 03:39:04 +0000 Subject: [PATCH 01/32] Add playwright dependency --- site/package.json | 1 + site/yarn.lock | 403 +++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 368 insertions(+), 36 deletions(-) diff --git a/site/package.json b/site/package.json index 50dbc4e93c796..f340d835e3dc7 100644 --- a/site/package.json +++ b/site/package.json @@ -21,6 +21,7 @@ "@material-ui/core": "4.9.4", "@material-ui/icons": "4.5.1", "@material-ui/lab": "4.0.0-alpha.42", + "@playwright/test": "1.17.2", "@react-theming/storybook-addon": "1.1.5", "@storybook/addon-actions": "6.4.19", "@storybook/addon-essentials": "6.4.19", diff --git a/site/yarn.lock b/site/yarn.lock index d4efb51bfbbd6..9fb55fdd21492 100644 --- a/site/yarn.lock +++ b/site/yarn.lock @@ -2,6 +2,13 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.0.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.1.tgz#7922fb0817bf3166d8d9e258c57477e3fd1c3610" + integrity sha512-Aolwjd7HSC2PyY0fDj/wA/EimQT4HfEnFYNp5s9CQlrdhyvWTtvZ5YzrUPu6R6/1jKiUlxu8bUhkdSnKHNAHMA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.0" + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -9,7 +16,7 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== @@ -64,6 +71,27 @@ semver "^6.3.0" source-map "^0.5.0" +"@babel/core@^7.14.8": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.2.tgz#2c77fc430e95139d816d39b113b31bf40fb22337" + integrity sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw== + dependencies: + "@ampproject/remapping" "^2.0.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.0" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helpers" "^7.17.2" + "@babel/parser" "^7.17.0" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.0" + "@babel/types" "^7.17.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.16.8", "@babel/generator@^7.7.2": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe" @@ -73,6 +101,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.17.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.0.tgz#7bd890ba706cd86d3e2f727322346ffdbf98f65e" + integrity sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw== + dependencies: + "@babel/types" "^7.17.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -299,6 +336,15 @@ "@babel/traverse" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helpers@^7.17.2": + version "7.17.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.2.tgz#23f0a0746c8e287773ccd27c14be428891f63417" + integrity sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.0" + "@babel/types" "^7.17.0" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": version "7.16.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" @@ -313,6 +359,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.12.tgz#9474794f9a650cf5e2f892444227f98e28cdf8b6" integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A== +"@babel/parser@^7.17.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.0.tgz#f0ac33eddbe214e4105363bb17c3341c5ffcc43c" + integrity sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" @@ -338,7 +389,7 @@ "@babel/helper-remap-async-to-generator" "^7.16.8" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.7": +"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.14.5", "@babel/plugin-proposal-class-properties@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz#925cad7b3b1a2fcea7e59ecc8eb5954f961f91b0" integrity sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww== @@ -364,7 +415,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-decorators" "^7.16.7" -"@babel/plugin-proposal-dynamic-import@^7.16.7": +"@babel/plugin-proposal-dynamic-import@^7.14.5", "@babel/plugin-proposal-dynamic-import@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz#c19c897eaa46b27634a00fee9fb7d829158704b2" integrity sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg== @@ -380,7 +431,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-export-default-from" "^7.16.7" -"@babel/plugin-proposal-export-namespace-from@^7.16.7": +"@babel/plugin-proposal-export-namespace-from@^7.14.5", "@babel/plugin-proposal-export-namespace-from@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz#09de09df18445a5786a305681423ae63507a6163" integrity sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA== @@ -396,7 +447,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.16.7": +"@babel/plugin-proposal-logical-assignment-operators@^7.14.5", "@babel/plugin-proposal-logical-assignment-operators@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz#be23c0ba74deec1922e639832904be0bea73cdea" integrity sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg== @@ -404,7 +455,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.14.5", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99" integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ== @@ -412,7 +463,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.16.7": +"@babel/plugin-proposal-numeric-separator@^7.14.5", "@babel/plugin-proposal-numeric-separator@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz#d6b69f4af63fb38b6ca2558442a7fb191236eba9" integrity sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw== @@ -448,7 +499,7 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.16.7": +"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.14.5", "@babel/plugin-proposal-optional-chaining@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== @@ -457,7 +508,7 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.16.11": +"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.14.5", "@babel/plugin-proposal-private-methods@^7.16.11": version "7.16.11" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz#e8df108288555ff259f4527dbe84813aac3a1c50" integrity sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw== @@ -465,7 +516,7 @@ "@babel/helper-create-class-features-plugin" "^7.16.10" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-proposal-private-property-in-object@^7.16.7": +"@babel/plugin-proposal-private-property-in-object@^7.14.5", "@babel/plugin-proposal-private-property-in-object@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz#b0b8cef543c2c3d57e59e2c611994861d46a3fce" integrity sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ== @@ -765,7 +816,7 @@ "@babel/helper-plugin-utils" "^7.16.7" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.16.8": +"@babel/plugin-transform-modules-commonjs@^7.14.5", "@babel/plugin-transform-modules-commonjs@^7.16.8": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz#cdee19aae887b16b9d331009aa9a219af7c86afe" integrity sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA== @@ -1049,7 +1100,7 @@ "@babel/plugin-transform-react-jsx-development" "^7.16.7" "@babel/plugin-transform-react-pure-annotations" "^7.16.7" -"@babel/preset-typescript@^7.12.7": +"@babel/preset-typescript@^7.12.7", "@babel/preset-typescript@^7.14.5": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz#ab114d68bb2020afc069cd51b37ff98a046a70b9" integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== @@ -1109,6 +1160,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.17.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.0.tgz#3143e5066796408ccc880a33ecd3184f3e75cd30" + integrity sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.0" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.17.0" + "@babel/types" "^7.17.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.8.tgz#0ba5da91dd71e0a4e7781a30f22770831062e3c1" @@ -1117,6 +1184,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.17.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" + integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1499,10 +1574,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.4.2": - version "27.4.2" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" - integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== +"@jest/types@^27.2.5", "@jest/types@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" + integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1510,10 +1585,10 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== +"@jest/types@^27.4.2": + version "27.4.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.4.2.tgz#96536ebd34da6392c2b7c7737d693885b5dd44a5" + integrity sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" @@ -1521,6 +1596,24 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jridgewell/resolve-uri@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" + integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.11" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" + integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== + +"@jridgewell/trace-mapping@^0.3.0": + version "0.3.4" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" + integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@material-ui/core@4.9.4": version "4.9.4" resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.9.4.tgz#796515b12845dc6ea7e21872888cfc4c0c1c1efe" @@ -1767,6 +1860,47 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@playwright/test@1.17.2": + version "1.17.2" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.17.2.tgz#0c67e329a28ffe43a79dc15a0e139dadd9cb250f" + integrity sha512-lxauaOlLNddQsgknCDJZEo8spTlSUF7gU4jXf0sUDLFsH/KE4ySe4SOPUGbtw+lCMrUfSbSRz0e7wnw5z78LNA== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/core" "^7.14.8" + "@babel/plugin-proposal-class-properties" "^7.14.5" + "@babel/plugin-proposal-dynamic-import" "^7.14.5" + "@babel/plugin-proposal-export-namespace-from" "^7.14.5" + "@babel/plugin-proposal-logical-assignment-operators" "^7.14.5" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.14.5" + "@babel/plugin-proposal-numeric-separator" "^7.14.5" + "@babel/plugin-proposal-optional-chaining" "^7.14.5" + "@babel/plugin-proposal-private-methods" "^7.14.5" + "@babel/plugin-proposal-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/plugin-syntax-json-strings" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/plugin-transform-modules-commonjs" "^7.14.5" + "@babel/preset-typescript" "^7.14.5" + colors "1.4.0" + commander "^8.2.0" + debug "^4.1.1" + expect "=27.2.5" + jest-matcher-utils "=27.2.5" + jpeg-js "^0.4.2" + mime "^2.4.6" + minimatch "^3.0.3" + ms "^2.1.2" + open "^8.3.0" + pirates "^4.0.1" + pixelmatch "^5.2.1" + playwright-core "=1.17.2" + pngjs "^5.0.0" + rimraf "^3.0.2" + source-map-support "^0.4.18" + stack-utils "^2.0.3" + yazl "^2.5.1" + "@pmmmwh/react-refresh-webpack-plugin@^0.5.1": version "0.5.4" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.4.tgz#df0d0d855fc527db48aac93c218a0bf4ada41f99" @@ -3131,6 +3265,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a" + integrity sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA== + dependencies: + "@types/node" "*" + "@typescript-eslint/eslint-plugin@4.33.0": version "4.33.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" @@ -3469,7 +3610,7 @@ address@^1.0.1: resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== -agent-base@6: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -4285,6 +4426,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -4768,6 +4914,11 @@ commander@^6.2.1: resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + common-path-prefix@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" @@ -5226,6 +5377,11 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -6041,6 +6197,18 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expect@=27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.2.5.tgz#16154aaa60b4d9a5b0adacfea3e4d6178f4b93fd" + integrity sha512-ZrO0w7bo8BgGoP/bLz+HDCI+0Hfei9jUSZs5yI/Wyn9VkG9w8oJ7rHRgYj+MA7yqqFa0IwHA3flJzZtYugShJA== + dependencies: + "@jest/types" "^27.2.5" + ansi-styles "^5.0.0" + jest-get-type "^27.0.6" + jest-matcher-utils "^27.2.5" + jest-message-util "^27.2.5" + jest-regex-util "^27.0.6" + expect@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" @@ -6121,6 +6289,17 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-zip@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -6210,6 +6389,13 @@ fbjs@^3.0.0, fbjs@^3.0.1: setimmediate "^1.0.5" ua-parser-js "^0.7.30" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -6605,6 +6791,13 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -7380,7 +7573,7 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" -is-docker@^2.0.0: +is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== @@ -7618,7 +7811,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.1.1: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -7804,7 +7997,7 @@ jest-diff@^27.0.0: jest-get-type "^27.4.0" pretty-format "^27.4.6" -jest-diff@^27.5.1: +jest-diff@^27.2.5, jest-diff@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== @@ -7857,16 +8050,16 @@ jest-environment-node@^27.5.1: jest-mock "^27.5.1" jest-util "^27.5.1" +jest-get-type@^27.0.6, jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + jest-get-type@^27.4.0: version "27.4.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.4.0.tgz#7503d2663fffa431638337b3998d39c5e928e9b5" integrity sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ== -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== - jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" @@ -7949,7 +8142,17 @@ jest-leak-detector@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-matcher-utils@^27.5.1: +jest-matcher-utils@=27.2.5: + version "27.2.5" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.2.5.tgz#4684faaa8eb32bf15e6edaead6834031897e2980" + integrity sha512-qNR/kh6bz0Dyv3m68Ck2g1fLW5KlSOUNcFQh87VXHZwWc/gY6XwnKofx76Qytz3x5LDWT09/2+yXndTkaG4aWg== + dependencies: + chalk "^4.0.0" + jest-diff "^27.2.5" + jest-get-type "^27.0.6" + pretty-format "^27.2.5" + +jest-matcher-utils@^27.2.5, jest-matcher-utils@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== @@ -7959,7 +8162,7 @@ jest-matcher-utils@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-message-util@^27.5.1: +jest-message-util@^27.2.5, jest-message-util@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== @@ -7992,7 +8195,7 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-regex-util@^27.5.1: +jest-regex-util@^27.0.6, jest-regex-util@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== @@ -8227,6 +8430,11 @@ jest@27.5.1: import-local "^3.0.2" jest-cli "^27.5.1" +jpeg-js@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.3.tgz#6158e09f1983ad773813704be80680550eff977b" + integrity sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q== + js-string-escape@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" @@ -8882,7 +9090,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.4.4: +mime@^2.4.4, mime@^2.4.6: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== @@ -8921,6 +9129,13 @@ minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.1.tgz#879ad447200773912898b46cd516a7abbb5e50b0" + integrity sha512-reLxBcKUPNBnc/sVtAbxgRVFSegoGeLaSjmphNhcwcolhYLRgtJscn5mRl6YRZNQv40Y7P6JM2YhSIsbL9OB5A== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -9025,7 +9240,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.1.1: +ms@2.1.3, ms@^2.1.1, ms@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -9388,6 +9603,15 @@ open@^7.0.3: is-docker "^2.0.0" is-wsl "^2.1.1" +open@^8.3.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -9686,6 +9910,11 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + picocolors@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" @@ -9716,6 +9945,13 @@ pirates@^4.0.0, pirates@^4.0.1, pirates@^4.0.4: resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== +pixelmatch@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.2.1.tgz#9e4e4f4aa59648208a31310306a5bed5522b0d65" + integrity sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ== + dependencies: + pngjs "^4.0.1" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -9737,6 +9973,38 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" +playwright-core@=1.17.2: + version "1.17.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.17.2.tgz#916254fa8fb3eb76c160b5c2e06bc979d6ec2cf8" + integrity sha512-TCYIt2UNHvqGxvD79bBjBv9osDLAH1gn7AZD5kRpMNQJG6BAmJt8B4Ek8fzdKmCQOnHf9ASJmcYRszoIZxcdVA== + dependencies: + commander "^8.2.0" + debug "^4.1.1" + extract-zip "^2.0.1" + https-proxy-agent "^5.0.0" + jpeg-js "^0.4.2" + mime "^2.4.6" + pngjs "^5.0.0" + progress "^2.0.3" + proper-lockfile "^4.1.1" + proxy-from-env "^1.1.0" + rimraf "^3.0.2" + socks-proxy-agent "^6.1.0" + stack-utils "^2.0.3" + ws "^7.4.6" + yauzl "^2.10.0" + yazl "^2.5.1" + +pngjs@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe" + integrity sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg== + +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + pnp-webpack-plugin@1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149" @@ -9879,7 +10147,7 @@ pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.4.6: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^27.5.1: +pretty-format@^27.2.5, pretty-format@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== @@ -9913,7 +10181,7 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0: +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -9968,6 +10236,15 @@ prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.2, object-assign "^4.1.1" react-is "^16.13.1" +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + property-expr@^2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.5.tgz#278bdb15308ae16af3e3b9640024524f4dc02cb4" @@ -9988,6 +10265,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -10647,6 +10929,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -10991,6 +11278,11 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -11021,6 +11313,23 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +socks-proxy-agent@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87" + integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew== + dependencies: + agent-base "^6.0.2" + debug "^4.3.1" + socks "^2.6.1" + +socks@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" + integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== + dependencies: + ip "^1.1.5" + smart-buffer "^4.2.0" + source-list-map@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" @@ -11042,6 +11351,13 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@^0.4.18: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== + dependencies: + source-map "^0.5.6" + source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -12525,6 +12841,21 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yazl@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" + integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== + dependencies: + buffer-crc32 "~0.2.3" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" From ab81ef9fb1e2ccdacfbb37765218f7cf3071ed98 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 15 Feb 2022 03:49:26 +0000 Subject: [PATCH 02/32] Add initial playwright command to run against development server --- site/e2e/playwright.config.ts | 21 +++++++++++++++++++++ site/e2e/tests/login.spec.ts | 7 +++++++ site/package.json | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 site/e2e/playwright.config.ts create mode 100644 site/e2e/tests/login.spec.ts diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts new file mode 100644 index 0000000000000..a69e2567120a2 --- /dev/null +++ b/site/e2e/playwright.config.ts @@ -0,0 +1,21 @@ +import * as path from "path" +import { PlaywrightTestConfig } from "@playwright/test" + +const config: PlaywrightTestConfig = { + + testDir: "tests", + + // `webServer` tells Playwright to launch a test server - more details here: + // https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests + webServer: { + command: path.join(__dirname, "../../develop.sh"), + port: 8080, + timeout: 120 * 10000, + reuseExistingServer: false, + env: { + HUMAN_LOG: "1", + }, + }, +} + +export default config \ No newline at end of file diff --git a/site/e2e/tests/login.spec.ts b/site/e2e/tests/login.spec.ts new file mode 100644 index 0000000000000..355d30c200d71 --- /dev/null +++ b/site/e2e/tests/login.spec.ts @@ -0,0 +1,7 @@ +import { test } from "@playwright/test" +//import { ResetPasswordPage, SignInPage } from "../../pom" + +test("Login takes user to /projects", async ({ page, baseURL }) => { + console.log("base url: " + baseURL) + await page.goto(baseURL + "/", { waitUntil: "networkidle" }) +}) \ No newline at end of file diff --git a/site/package.json b/site/package.json index f340d835e3dc7..77be3e59e86b9 100644 --- a/site/package.json +++ b/site/package.json @@ -12,6 +12,9 @@ "format:write": "prettier --write '**/*.{css,html,js,json,jsx,md,ts,tsx,yaml,yml}' && sql-formatter -l postgresql ./database/query.sql -o ./database/query.sql", "lint": "jest --selectProjects lint", "lint:fix": "FIX=true yarn lint", + "playwright:install": "playwright install", + "playwright:install-deps": "playwright install-deps", + "playwright:test": "playwright test --config=e2e/playwright.config.ts", "storybook": "start-storybook -p 6006 -s ./static", "storybook:build": "build-storybook", "test": "jest --selectProjects test", From 7c970b5f754616393c26b8ab99edaab7d8aebc72 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 15 Feb 2022 04:44:22 +0000 Subject: [PATCH 03/32] feat: Initial E2E framework --- .gitignore | 1 + site/.eslintignore | 3 ++- site/.prettierignore | 1 + site/e2e/playwright.config.ts | 7 +++++-- site/e2e/pom/SignInPage.ts | 15 +++++++++++++++ site/e2e/pom/index.ts | 1 + site/e2e/tests/login.spec.ts | 13 ++++++++++--- 7 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 site/e2e/pom/SignInPage.ts create mode 100644 site/e2e/pom/index.ts diff --git a/.gitignore b/.gitignore index 16a31c9d50b58..34e53869b12f0 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ site/.next/ site/node_modules/ site/storybook-static/ site/test_results/ +site/test-results/ site/yarn-error.log coverage/ diff --git a/site/.eslintignore b/site/.eslintignore index f802bce56b464..01320123e1992 100644 --- a/site/.eslintignore +++ b/site/.eslintignore @@ -7,4 +7,5 @@ out coverage .next storybook-static -test_results \ No newline at end of file +test_results +test-results \ No newline at end of file diff --git a/site/.prettierignore b/site/.prettierignore index 1be0aa8af00cb..bcc93f22d3934 100644 --- a/site/.prettierignore +++ b/site/.prettierignore @@ -16,3 +16,4 @@ coverage/ out/ storybook-static/ test_results/ +test-results/ diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index a69e2567120a2..d366d715f0264 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -2,9 +2,12 @@ import * as path from "path" import { PlaywrightTestConfig } from "@playwright/test" const config: PlaywrightTestConfig = { - testDir: "tests", + use: { + video: "retain-on-failure", + }, + // `webServer` tells Playwright to launch a test server - more details here: // https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests webServer: { @@ -18,4 +21,4 @@ const config: PlaywrightTestConfig = { }, } -export default config \ No newline at end of file +export default config diff --git a/site/e2e/pom/SignInPage.ts b/site/e2e/pom/SignInPage.ts new file mode 100644 index 0000000000000..ed267ecb03c4f --- /dev/null +++ b/site/e2e/pom/SignInPage.ts @@ -0,0 +1,15 @@ +import { Page } from "@playwright/test" + +export class SignInPage { + private page: Page + + constructor(page: Page) { + this.page = page + } + + async submitBuiltInAuthentication(email: string, password: string): Promise { + await this.page.fill("id=signin-form-inpt-email", email) + await this.page.fill("id=signin-form-inpt-password", password) + await this.page.click("id=signin-form-submit") + } +} diff --git a/site/e2e/pom/index.ts b/site/e2e/pom/index.ts new file mode 100644 index 0000000000000..b29c4855d21ed --- /dev/null +++ b/site/e2e/pom/index.ts @@ -0,0 +1 @@ +export * from "./SignInPage" diff --git a/site/e2e/tests/login.spec.ts b/site/e2e/tests/login.spec.ts index 355d30c200d71..76bff2055cb39 100644 --- a/site/e2e/tests/login.spec.ts +++ b/site/e2e/tests/login.spec.ts @@ -1,7 +1,14 @@ import { test } from "@playwright/test" -//import { ResetPasswordPage, SignInPage } from "../../pom" +import { SignInPage } from "../pom" test("Login takes user to /projects", async ({ page, baseURL }) => { - console.log("base url: " + baseURL) await page.goto(baseURL + "/", { waitUntil: "networkidle" }) -}) \ No newline at end of file + + // Log-in with the default credentials we set up in the development server + const signInPage = new SignInPage(page) + await signInPage.submitBuiltInAuthentication("admin@coder.com", "password") + + await page.waitForNavigation({ url: baseURL + "/projects", waitUntil: "networkidle" }) + + await page.waitForSelector("text=Projects") +}) From 2b0f0cb5e8d819fbdc5682900c76815973c44d22 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:03:00 +0000 Subject: [PATCH 04/32] Add test/e2e job --- .github/workflows/coder.yaml | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 221dd991d80be..3ee144f874ea3 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -282,3 +282,49 @@ jobs: DD_DATABASE: postgresql GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: go run scripts/datadog-cireport/main.go site/test_results/junit.xml + + test-e2e: + name: "test/e2e" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache Node + id: cache-node + uses: actions/cache@v2 + with: + path: | + **/node_modules + .eslintcache + key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }} + + # Go is required for uploading the test results to datadog + - uses: actions/setup-go@v2 + with: + go-version: "^1.17" + + - uses: hashicorp/setup-terraform@v1 + with: + terraform_version: 1.1.2 + terraform_wrapper: false + + - uses: actions/setup-node@v3 + with: + node-version: "14" + + - uses: actions/cache@v2 + with: + # Go mod cache, Linux build cache, Mac build cache, Windows build cache + path: | + ~/go/pkg/mod + ~/.cache/go-build + ~/Library/Caches/go-build + %LocalAppData%\go-build + key: ${{ matrix.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ matrix.os }}-go- + + - run: make build + + - run: yarn test:coverage + working-directory: site \ No newline at end of file From 78ceb9c827c216612463b9bf5da13e70e2062dfd Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:04:30 +0000 Subject: [PATCH 05/32] Add test/e2e job --- .github/workflows/coder.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 3ee144f874ea3..20ed0c2a0e406 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -326,5 +326,12 @@ jobs: - run: make build - - run: yarn test:coverage - working-directory: site \ No newline at end of file + - run: yarn playwright:install + working-directory: site + + - run: yarn playwright:install-deps + working-directory: site + + - run: yarn playwright:test + working-directory: site + \ No newline at end of file From 5eb93147750c22783234121563a9adc72be52a8d Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:20:24 +0000 Subject: [PATCH 06/32] Use coderd directly, create initial user in setup script --- site/e2e/globalSetup.ts | 26 ++++++++++++++++++++++++++ site/e2e/playwright.config.ts | 10 +++++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 site/e2e/globalSetup.ts diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts new file mode 100644 index 0000000000000..cb56e8c57b5ab --- /dev/null +++ b/site/e2e/globalSetup.ts @@ -0,0 +1,26 @@ +import { FullConfig, request } from '@playwright/test'; + +async function globalSetup(config: FullConfig) { + const { baseURL } = config.projects[0].use; + console.log(" -- Starting global setup: " + baseURL) + + // Create a context that will issue http requests. + const context = await request.newContext({ + baseURL, + }); + + // Create initial user + await context.post( + "/api/v2/user", { + data: { + email: "admin@coder.com", + username: "admin", + password: "password", + organization: "acme-corp" + } + }); + + console.log("-- Created initial user.") +} + +export default globalSetup; \ No newline at end of file diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index d366d715f0264..517b98d754eb5 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -3,21 +3,21 @@ import { PlaywrightTestConfig } from "@playwright/test" const config: PlaywrightTestConfig = { testDir: "tests", + globalSetup: require.resolve('./globalSetup'), use: { + baseURL: "http://localhost:3000", video: "retain-on-failure", }, // `webServer` tells Playwright to launch a test server - more details here: // https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests webServer: { - command: path.join(__dirname, "../../develop.sh"), - port: 8080, + // Run the 'coderd' binary directly + command: path.join(__dirname, "../../bin/coderd"), + port: 3000, timeout: 120 * 10000, reuseExistingServer: false, - env: { - HUMAN_LOG: "1", - }, }, } From 8fc553a573581a3b18a998058b241aaa48678642 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:21:40 +0000 Subject: [PATCH 07/32] Ignore e2e tests from jest --- site/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/jest.config.js b/site/jest.config.js index 6db0792abc814..e777d780bf172 100644 --- a/site/jest.config.js +++ b/site/jest.config.js @@ -17,7 +17,7 @@ module.exports = { }, testEnvironment: "jsdom", testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", - testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes"], + testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes, " / e2e / "], moduleDirectories: ["node_modules", ""], }, { From 1b0e0d3e4ed54941a02841cd01cc1467cb4ddb6f Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:23:26 +0000 Subject: [PATCH 08/32] Fix typo --- site/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/jest.config.js b/site/jest.config.js index e777d780bf172..9dde19da8ddf1 100644 --- a/site/jest.config.js +++ b/site/jest.config.js @@ -17,7 +17,7 @@ module.exports = { }, testEnvironment: "jsdom", testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", - testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes, " / e2e / "], + testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes", "/e2e/"], moduleDirectories: ["node_modules", ""], }, { From f39f59a042db21dd44c5d2e19059d9b39671ae16 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:26:38 +0000 Subject: [PATCH 09/32] Consolidate test_results/test-results --- site/.eslintignore | 1 - site/.prettierignore | 1 - site/jest.config.js | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/site/.eslintignore b/site/.eslintignore index 01320123e1992..d997337daf939 100644 --- a/site/.eslintignore +++ b/site/.eslintignore @@ -7,5 +7,4 @@ out coverage .next storybook-static -test_results test-results \ No newline at end of file diff --git a/site/.prettierignore b/site/.prettierignore index bcc93f22d3934..df6ed4d23837d 100644 --- a/site/.prettierignore +++ b/site/.prettierignore @@ -15,5 +15,4 @@ yarn-error.log coverage/ out/ storybook-static/ -test_results/ test-results/ diff --git a/site/jest.config.js b/site/jest.config.js index 9dde19da8ddf1..1dfafb61e3ebd 100644 --- a/site/jest.config.js +++ b/site/jest.config.js @@ -58,7 +58,7 @@ module.exports = { "jest-junit", { suiteName: "Front-end Jest Tests", - outputDirectory: "./test_results", + outputDirectory: "./test-results", outputName: "junit.xml", }, ], From 0428a628587bf269d054f65d1d4f1a8deae58807 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:31:00 +0000 Subject: [PATCH 10/32] Add junit reporter for DataDog --- site/e2e/playwright.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index 517b98d754eb5..c33c4b703fdb9 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -5,6 +5,9 @@ const config: PlaywrightTestConfig = { testDir: "tests", globalSetup: require.resolve('./globalSetup'), + // Create junit report file for upload to DataDog + reporter: [['junit', { outputFile: 'junit.xml' }]], + use: { baseURL: "http://localhost:3000", video: "retain-on-failure", From 94c76849cefaa0ce8ba179305ffcb3807e34f141 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:31:40 +0000 Subject: [PATCH 11/32] Fix junit path --- site/e2e/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index c33c4b703fdb9..c00d47d55e1d2 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -6,7 +6,7 @@ const config: PlaywrightTestConfig = { globalSetup: require.resolve('./globalSetup'), // Create junit report file for upload to DataDog - reporter: [['junit', { outputFile: 'junit.xml' }]], + reporter: [['junit', { outputFile: 'test-results/junit.xml' }]], use: { baseURL: "http://localhost:3000", From dfe0c7c796de72b2d198210942feb991ef028a68 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:33:16 +0000 Subject: [PATCH 12/32] Upload E2E test results to DataDog --- .github/workflows/coder.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 20ed0c2a0e406..79e7469ad1b49 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -334,4 +334,11 @@ jobs: - run: yarn playwright:test working-directory: site - \ No newline at end of file + + - name: Upload DataDog Trace + if: (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux' + env: + DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} + DD_DATABASE: e2e + GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + run: go run scripts/datadog-cireport/main.go site/test_results/junit.xml \ No newline at end of file From 8af7d02e8af6e5332ed9b29aa81286d29200c713 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:34:18 +0000 Subject: [PATCH 13/32] Formatting --- site/e2e/globalSetup.ts | 17 ++++++++--------- site/e2e/playwright.config.ts | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts index cb56e8c57b5ab..d6c6cbd6f2b66 100644 --- a/site/e2e/globalSetup.ts +++ b/site/e2e/globalSetup.ts @@ -1,26 +1,25 @@ -import { FullConfig, request } from '@playwright/test'; +import { FullConfig, request } from "@playwright/test" async function globalSetup(config: FullConfig) { - const { baseURL } = config.projects[0].use; + const { baseURL } = config.projects[0].use console.log(" -- Starting global setup: " + baseURL) // Create a context that will issue http requests. const context = await request.newContext({ baseURL, - }); + }) // Create initial user - await context.post( - "/api/v2/user", { + await context.post("/api/v2/user", { data: { email: "admin@coder.com", username: "admin", password: "password", - organization: "acme-corp" - } - }); + organization: "acme-corp", + }, + }) console.log("-- Created initial user.") } -export default globalSetup; \ No newline at end of file +export default globalSetup diff --git a/site/e2e/playwright.config.ts b/site/e2e/playwright.config.ts index c00d47d55e1d2..cf76a66337a7d 100644 --- a/site/e2e/playwright.config.ts +++ b/site/e2e/playwright.config.ts @@ -3,10 +3,10 @@ import { PlaywrightTestConfig } from "@playwright/test" const config: PlaywrightTestConfig = { testDir: "tests", - globalSetup: require.resolve('./globalSetup'), + globalSetup: require.resolve("./globalSetup"), // Create junit report file for upload to DataDog - reporter: [['junit', { outputFile: 'test-results/junit.xml' }]], + reporter: [["junit", { outputFile: "test-results/junit.xml" }]], use: { baseURL: "http://localhost:3000", From 18f21da61d5124437b4962591b9a3e3a75efa9ba Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:39:17 +0000 Subject: [PATCH 14/32] Fix lint issues --- site/e2e/globalSetup.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts index d6c6cbd6f2b66..9ed86314bc041 100644 --- a/site/e2e/globalSetup.ts +++ b/site/e2e/globalSetup.ts @@ -1,8 +1,7 @@ import { FullConfig, request } from "@playwright/test" -async function globalSetup(config: FullConfig) { +async function globalSetup(config: FullConfig): Promise { const { baseURL } = config.projects[0].use - console.log(" -- Starting global setup: " + baseURL) // Create a context that will issue http requests. const context = await request.newContext({ @@ -18,8 +17,6 @@ async function globalSetup(config: FullConfig) { organization: "acme-corp", }, }) - - console.log("-- Created initial user.") } export default globalSetup From bcef4ac1d110a4d1f81272c2efd5a27cee468adc Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:43:32 +0000 Subject: [PATCH 15/32] Fix unit test DataDog uploads --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 79e7469ad1b49..d26abfead2623 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -281,7 +281,7 @@ jobs: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} DD_DATABASE: postgresql GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - run: go run scripts/datadog-cireport/main.go site/test_results/junit.xml + run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml test-e2e: name: "test/e2e" From 91bda34eb9ca7620954cee5812d2e893825c4a18 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Mon, 28 Feb 2022 23:57:26 +0000 Subject: [PATCH 16/32] Clean up globalSetup --- site/e2e/globalSetup.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts index 9ed86314bc041..38c1a1273b2e9 100644 --- a/site/e2e/globalSetup.ts +++ b/site/e2e/globalSetup.ts @@ -1,6 +1,7 @@ import { FullConfig, request } from "@playwright/test" async function globalSetup(config: FullConfig): Promise { + // Grab the 'baseURL' from the webserver (`coderd`) const { baseURL } = config.projects[0].use // Create a context that will issue http requests. From 08dc699e4150944af31e7b04bb1e741f44b2c22f Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 00:01:46 +0000 Subject: [PATCH 17/32] Fix upload of E2E datadog reports --- .github/workflows/coder.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index d26abfead2623..655a54a0d9b23 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -341,4 +341,4 @@ jobs: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} DD_DATABASE: e2e GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - run: go run scripts/datadog-cireport/main.go site/test_results/junit.xml \ No newline at end of file + run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml \ No newline at end of file From b8cc80f17e63933563ad3b491201db0038452c2b Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 00:07:40 +0000 Subject: [PATCH 18/32] Add 'category' for classifying tests in datadog (unit, integration, e2e) --- .github/workflows/coder.yaml | 5 +++-- scripts/datadog-cireport/main.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 655a54a0d9b23..8525533dd3cba 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -164,6 +164,7 @@ jobs: env: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} DD_DATABASE: fake + DD_CATEGORY: unit GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: go run scripts/datadog-cireport/main.go gotests.xml @@ -279,7 +280,7 @@ jobs: if: (success() || failure()) && github.actor != 'dependabot[bot]' env: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} - DD_DATABASE: postgresql + DD_CATEGORY: unit GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml @@ -339,6 +340,6 @@ jobs: if: (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux' env: DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} - DD_DATABASE: e2e + DD_CATEGORY: e2e GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml \ No newline at end of file diff --git a/scripts/datadog-cireport/main.go b/scripts/datadog-cireport/main.go index 51fb902b1689e..644c1233ce445 100644 --- a/scripts/datadog-cireport/main.go +++ b/scripts/datadog-cireport/main.go @@ -75,7 +75,8 @@ func main() { "service": "coder", "_dd.cireport_version": "2", - "test.traits": fmt.Sprintf(`{"database":["%s"]}`, os.Getenv("DD_DATABASE")), + "test.traits": fmt.Sprintf(`{"database":["%s"], "category":["%s"]}`, + os.Getenv("DD_DATABASE"), os.Getenv("DD_CATEGORY")), // Additional tags found in DataDog docs. See: // https://docs.datadoghq.com/continuous_integration/setup_tests/junit_upload/#collecting-environment-configuration-metadata From a88a72290e51bc75fcbd7aafb0a15e29dfc17e2a Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 00:13:29 +0000 Subject: [PATCH 19/32] Remove coverage collection from E2E folder --- site/jest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/site/jest.config.js b/site/jest.config.js index 1dfafb61e3ebd..f22ea399eee4d 100644 --- a/site/jest.config.js +++ b/site/jest.config.js @@ -45,6 +45,7 @@ module.exports = { "!/api.ts", "!/coverage/**/*.*", "!/dev.ts", + "!/e2e/**/*.*", "!/jest-runner.eslint.config.js", "!/jest.config.js", "!/next-env.d.ts", From 4bad40eb8e59c0b6ff229c255dd7c6e1dfee0d58 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 00:24:21 +0000 Subject: [PATCH 20/32] Run e2e on all platforms --- .github/workflows/coder.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 8525533dd3cba..df56ece735ef9 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -232,6 +232,12 @@ jobs: test-js: name: "test/js" + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-2022 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -285,8 +291,14 @@ jobs: run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml test-e2e: - name: "test/e2e" - runs-on: ubuntu-latest + name: "test/e2e/${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-2022 steps: - uses: actions/checkout@v2 From 3b0b4cd3a8771df821932eda99c385aa68f2ffad Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 00:30:28 +0000 Subject: [PATCH 21/32] Try running on mac/ubuntu for now --- .github/workflows/coder.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index df56ece735ef9..8dc8132a22814 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -298,7 +298,8 @@ jobs: os: - ubuntu-latest - macos-latest - - windows-2022 + # TODO: Get `make build` running on Windows 2022 + # - windows-2022 steps: - uses: actions/checkout@v2 From 15a9a11e036ca45cc5e6c14159d765a709258a63 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 01:20:00 +0000 Subject: [PATCH 22/32] Experiment: Unblock windows e2e tests --- .github/workflows/coder.yaml | 3 +-- Makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 8dc8132a22814..df56ece735ef9 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -298,8 +298,7 @@ jobs: os: - ubuntu-latest - macos-latest - # TODO: Get `make build` running on Windows 2022 - # - windows-2022 + - windows-2022 steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index f3e1bfc8b0317..4475258753e3e 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto .PHONY: provisionersdk/proto site/out: - ./scripts/yarn_install.sh + cd site && yarn install cd site && yarn build cd site && yarn export .PHONY: site/out From 081c9cf691f22b69adc3bf34ed36950df39ef94a Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 01:26:59 +0000 Subject: [PATCH 23/32] Revert "Experiment: Unblock windows e2e tests" This reverts commit 15a9a11e036ca45cc5e6c14159d765a709258a63. --- .github/workflows/coder.yaml | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index df56ece735ef9..8dc8132a22814 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -298,7 +298,8 @@ jobs: os: - ubuntu-latest - macos-latest - - windows-2022 + # TODO: Get `make build` running on Windows 2022 + # - windows-2022 steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index 4475258753e3e..f3e1bfc8b0317 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ provisionersdk/proto: provisionersdk/proto/provisioner.proto .PHONY: provisionersdk/proto site/out: - cd site && yarn install + ./scripts/yarn_install.sh cd site && yarn build cd site && yarn export .PHONY: site/out From 439c13b9484123992ddb7782f8f241d50d1cf6c8 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 01:49:31 +0000 Subject: [PATCH 24/32] Revert change to test/js --- .github/workflows/coder.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index 8dc8132a22814..d0bea9d938359 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -232,12 +232,6 @@ jobs: test-js: name: "test/js" - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - - windows-2022 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From d7f925706d64a52a31389ab4218bddf940ed8638 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 01:50:31 +0000 Subject: [PATCH 25/32] Add link back to Windows issue --- .github/workflows/coder.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index d0bea9d938359..ac5945e9396da 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -293,6 +293,7 @@ jobs: - ubuntu-latest - macos-latest # TODO: Get `make build` running on Windows 2022 + # https://github.com/coder/coder/issues/384 # - windows-2022 steps: - uses: actions/checkout@v2 From 7381ca23ede67c55fa644dd42498f46c70fccc9e Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 23:00:14 +0000 Subject: [PATCH 26/32] Consolidate test-results/test_results in .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 34e53869b12f0..bd1e2142eae1d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ site/.eslintcache site/.next/ site/node_modules/ site/storybook-static/ -site/test_results/ site/test-results/ site/yarn-error.log coverage/ From d3c8e508c267269d65ceeeb4b7b7fc29869e2982 Mon Sep 17 00:00:00 2001 From: Bryan Date: Tue, 1 Mar 2022 15:03:01 -0800 Subject: [PATCH 27/32] Update site/.eslintignore Co-authored-by: G r e y --- site/.eslintignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/.eslintignore b/site/.eslintignore index d997337daf939..0f3e9e0e60fcb 100644 --- a/site/.eslintignore +++ b/site/.eslintignore @@ -7,4 +7,4 @@ out coverage .next storybook-static -test-results \ No newline at end of file +test-results From e66c6851349aa996af57efdc52ba6134403d54b5 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Tue, 1 Mar 2022 23:09:29 +0000 Subject: [PATCH 28/32] Switch to using const vs function --- site/.eslintignore | 2 +- site/e2e/globalSetup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/.eslintignore b/site/.eslintignore index d997337daf939..0f3e9e0e60fcb 100644 --- a/site/.eslintignore +++ b/site/.eslintignore @@ -7,4 +7,4 @@ out coverage .next storybook-static -test-results \ No newline at end of file +test-results diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts index 38c1a1273b2e9..6876a9b6ece82 100644 --- a/site/e2e/globalSetup.ts +++ b/site/e2e/globalSetup.ts @@ -1,6 +1,6 @@ import { FullConfig, request } from "@playwright/test" -async function globalSetup(config: FullConfig): Promise { +const globalSetup = async (config: FullConfig): Promise => { // Grab the 'baseURL' from the webserver (`coderd`) const { baseURL } = config.projects[0].use From 66b7d60eab475fca883d2f9a35d9036295050b4c Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 2 Mar 2022 00:01:10 +0000 Subject: [PATCH 29/32] Refactor use email, password, username to constants --- site/e2e/constants.ts | 5 +++++ site/e2e/globalSetup.ts | 9 +++++---- site/e2e/tests/login.spec.ts | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 site/e2e/constants.ts diff --git a/site/e2e/constants.ts b/site/e2e/constants.ts new file mode 100644 index 0000000000000..18bfcf15ae133 --- /dev/null +++ b/site/e2e/constants.ts @@ -0,0 +1,5 @@ +// Default credentials and user for running tests +export const username = "admin" +export const password = "password" +export const organization = "acme-crop" +export const email = "admin@coder.com" \ No newline at end of file diff --git a/site/e2e/globalSetup.ts b/site/e2e/globalSetup.ts index 6876a9b6ece82..192b06156bd6c 100644 --- a/site/e2e/globalSetup.ts +++ b/site/e2e/globalSetup.ts @@ -1,4 +1,5 @@ import { FullConfig, request } from "@playwright/test" +import { email, username, password, organization } from "./constants" const globalSetup = async (config: FullConfig): Promise => { // Grab the 'baseURL' from the webserver (`coderd`) @@ -12,10 +13,10 @@ const globalSetup = async (config: FullConfig): Promise => { // Create initial user await context.post("/api/v2/user", { data: { - email: "admin@coder.com", - username: "admin", - password: "password", - organization: "acme-corp", + email, + username, + password, + organization, }, }) } diff --git a/site/e2e/tests/login.spec.ts b/site/e2e/tests/login.spec.ts index 76bff2055cb39..d8b1886156bd8 100644 --- a/site/e2e/tests/login.spec.ts +++ b/site/e2e/tests/login.spec.ts @@ -1,12 +1,13 @@ import { test } from "@playwright/test" import { SignInPage } from "../pom" +import { email, password } from "../constants" test("Login takes user to /projects", async ({ page, baseURL }) => { await page.goto(baseURL + "/", { waitUntil: "networkidle" }) // Log-in with the default credentials we set up in the development server const signInPage = new SignInPage(page) - await signInPage.submitBuiltInAuthentication("admin@coder.com", "password") + await signInPage.submitBuiltInAuthentication(email, password) await page.waitForNavigation({ url: baseURL + "/projects", waitUntil: "networkidle" }) From 7c568de4e1e38de1c19e90e2d07bcb7a55e9096d Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 2 Mar 2022 00:24:31 +0000 Subject: [PATCH 30/32] Expand POM model --- site/e2e/constants.ts | 2 +- site/e2e/pom/BasePom.ts | 13 +++++++++++++ site/e2e/pom/ProjectsPage.ts | 12 ++++++++++++ site/e2e/pom/SignInPage.ts | 11 +++++++---- site/e2e/tests/login.spec.ts | 8 +++++--- 5 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 site/e2e/pom/BasePom.ts create mode 100644 site/e2e/pom/ProjectsPage.ts diff --git a/site/e2e/constants.ts b/site/e2e/constants.ts index 18bfcf15ae133..503b30ab44a0b 100644 --- a/site/e2e/constants.ts +++ b/site/e2e/constants.ts @@ -2,4 +2,4 @@ export const username = "admin" export const password = "password" export const organization = "acme-crop" -export const email = "admin@coder.com" \ No newline at end of file +export const email = "admin@coder.com" diff --git a/site/e2e/pom/BasePom.ts b/site/e2e/pom/BasePom.ts new file mode 100644 index 0000000000000..a782eb3fa1806 --- /dev/null +++ b/site/e2e/pom/BasePom.ts @@ -0,0 +1,13 @@ +import { Page } from "@playwright/test" + +export abstract class BasePom { + abstract readonly url: string + + protected page: Page + protected baseURL: string | undefined + + constructor(baseURL: string | undefined, page: Page) { + this.page = page + this.baseURL = baseURL + } +} diff --git a/site/e2e/pom/ProjectsPage.ts b/site/e2e/pom/ProjectsPage.ts new file mode 100644 index 0000000000000..6b2ca2d7811d1 --- /dev/null +++ b/site/e2e/pom/ProjectsPage.ts @@ -0,0 +1,12 @@ +import { Page } from "@playwright/test" +import { BasePom } from "./BasePom" + +export class ProjectsPage extends BasePom { + public get url(): string { + return this.baseURL + "/projects" + } + + constructor(baseURL: string | undefined, page: Page) { + super(baseURL, page) + } +} diff --git a/site/e2e/pom/SignInPage.ts b/site/e2e/pom/SignInPage.ts index ed267ecb03c4f..88826a1c84e26 100644 --- a/site/e2e/pom/SignInPage.ts +++ b/site/e2e/pom/SignInPage.ts @@ -1,10 +1,13 @@ import { Page } from "@playwright/test" +import { BasePom } from "./BasePom" -export class SignInPage { - private page: Page +export class SignInPage extends BasePom { + public get url(): string { + return this.baseURL + "/login" + } - constructor(page: Page) { - this.page = page + constructor(baseURL: string | undefined, page: Page) { + super(baseURL, page) } async submitBuiltInAuthentication(email: string, password: string): Promise { diff --git a/site/e2e/tests/login.spec.ts b/site/e2e/tests/login.spec.ts index d8b1886156bd8..4ed68cecb86bd 100644 --- a/site/e2e/tests/login.spec.ts +++ b/site/e2e/tests/login.spec.ts @@ -1,15 +1,17 @@ import { test } from "@playwright/test" import { SignInPage } from "../pom" import { email, password } from "../constants" +import ProjectPage from "../../pages/projects/[organization]/[project]" -test("Login takes user to /projects", async ({ page, baseURL }) => { +test("Login takes user to /projects", async ({ baseURL, page }) => { await page.goto(baseURL + "/", { waitUntil: "networkidle" }) // Log-in with the default credentials we set up in the development server - const signInPage = new SignInPage(page) + const signInPage = new SignInPage(baseURL, page) await signInPage.submitBuiltInAuthentication(email, password) - await page.waitForNavigation({ url: baseURL + "/projects", waitUntil: "networkidle" }) + const projectsPage = new ProjectPage(baseURL, page) + await page.waitForNavigation({ url: projectsPage.url, waitUntil: "networkidle" }) await page.waitForSelector("text=Projects") }) From 41a4516088331bd93ff064511450fb1b16c97c61 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 2 Mar 2022 00:48:13 +0000 Subject: [PATCH 31/32] Fix broken import --- site/e2e/pom/BasePom.ts | 2 +- site/e2e/pom/index.ts | 1 + site/e2e/tests/login.spec.ts | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/e2e/pom/BasePom.ts b/site/e2e/pom/BasePom.ts index a782eb3fa1806..312489618043a 100644 --- a/site/e2e/pom/BasePom.ts +++ b/site/e2e/pom/BasePom.ts @@ -1,7 +1,7 @@ import { Page } from "@playwright/test" export abstract class BasePom { - abstract readonly url: string + abstract get url(): string protected page: Page protected baseURL: string | undefined diff --git a/site/e2e/pom/index.ts b/site/e2e/pom/index.ts index b29c4855d21ed..7f54f234249ea 100644 --- a/site/e2e/pom/index.ts +++ b/site/e2e/pom/index.ts @@ -1 +1,2 @@ +export * from "./ProjectsPage" export * from "./SignInPage" diff --git a/site/e2e/tests/login.spec.ts b/site/e2e/tests/login.spec.ts index 4ed68cecb86bd..02a51cd6994c0 100644 --- a/site/e2e/tests/login.spec.ts +++ b/site/e2e/tests/login.spec.ts @@ -1,7 +1,6 @@ import { test } from "@playwright/test" -import { SignInPage } from "../pom" +import { ProjectsPage, SignInPage } from "../pom" import { email, password } from "../constants" -import ProjectPage from "../../pages/projects/[organization]/[project]" test("Login takes user to /projects", async ({ baseURL, page }) => { await page.goto(baseURL + "/", { waitUntil: "networkidle" }) @@ -10,7 +9,7 @@ test("Login takes user to /projects", async ({ baseURL, page }) => { const signInPage = new SignInPage(baseURL, page) await signInPage.submitBuiltInAuthentication(email, password) - const projectsPage = new ProjectPage(baseURL, page) + const projectsPage = new ProjectsPage(baseURL, page) await page.waitForNavigation({ url: projectsPage.url, waitUntil: "networkidle" }) await page.waitForSelector("text=Projects") From fae6b3f7e36e187cc5ea8463260669e99d06cc5d Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Wed, 2 Mar 2022 04:39:56 +0000 Subject: [PATCH 32/32] Push functionality up to BasePOM API --- site/e2e/pom/BasePom.ts | 16 ++++++++++------ site/e2e/pom/ProjectsPage.ts | 6 +----- site/e2e/pom/SignInPage.ts | 6 +----- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/site/e2e/pom/BasePom.ts b/site/e2e/pom/BasePom.ts index 312489618043a..69641c6b2ee8f 100644 --- a/site/e2e/pom/BasePom.ts +++ b/site/e2e/pom/BasePom.ts @@ -1,13 +1,17 @@ import { Page } from "@playwright/test" export abstract class BasePom { - abstract get url(): string + protected readonly baseURL: string | undefined + protected readonly path: string + protected readonly page: Page - protected page: Page - protected baseURL: string | undefined - - constructor(baseURL: string | undefined, page: Page) { - this.page = page + constructor(baseURL: string | undefined, path: string, page: Page) { this.baseURL = baseURL + this.path = path + this.page = page + } + + get url(): string { + return this.baseURL + this.path } } diff --git a/site/e2e/pom/ProjectsPage.ts b/site/e2e/pom/ProjectsPage.ts index 6b2ca2d7811d1..0226410e09282 100644 --- a/site/e2e/pom/ProjectsPage.ts +++ b/site/e2e/pom/ProjectsPage.ts @@ -2,11 +2,7 @@ import { Page } from "@playwright/test" import { BasePom } from "./BasePom" export class ProjectsPage extends BasePom { - public get url(): string { - return this.baseURL + "/projects" - } - constructor(baseURL: string | undefined, page: Page) { - super(baseURL, page) + super(baseURL, "/projects", page) } } diff --git a/site/e2e/pom/SignInPage.ts b/site/e2e/pom/SignInPage.ts index 88826a1c84e26..56a328d9a4d05 100644 --- a/site/e2e/pom/SignInPage.ts +++ b/site/e2e/pom/SignInPage.ts @@ -2,12 +2,8 @@ import { Page } from "@playwright/test" import { BasePom } from "./BasePom" export class SignInPage extends BasePom { - public get url(): string { - return this.baseURL + "/login" - } - constructor(baseURL: string | undefined, page: Page) { - super(baseURL, page) + super(baseURL, "/login", page) } async submitBuiltInAuthentication(email: string, password: string): Promise {