Merge branch 'trunk' into try/individual-test-files

This commit is contained in:
Ron Rennick 2021-04-29 16:29:35 -03:00
commit 98f7a8562d
20 changed files with 614 additions and 79 deletions

View File

@ -21,7 +21,7 @@
"pelago/emogrifier": "3.1.0",
"psr/container": "1.0.0",
"woocommerce/action-scheduler": "3.1.6",
"woocommerce/woocommerce-admin": "2.2.2-rc.1",
"woocommerce/woocommerce-admin": "2.2.2",
"woocommerce/woocommerce-blocks": "4.9.1"
},
"require-dev": {

12
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "be33d948ed1d2ee3a7a23ef657f3148d",
"content-hash": "a604678b268820c78736d599e1eb6726",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@ -503,16 +503,16 @@
},
{
"name": "woocommerce/woocommerce-admin",
"version": "2.2.2-rc.1",
"version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-admin.git",
"reference": "0d305d1716481a0cc2010ec7b0a608a2d3c8ebe4"
"reference": "161e6afa01a3fb69533cfa2b245a71df7512ec3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/woocommerce-admin/zipball/0d305d1716481a0cc2010ec7b0a608a2d3c8ebe4",
"reference": "0d305d1716481a0cc2010ec7b0a608a2d3c8ebe4",
"url": "https://api.github.com/repos/woocommerce/woocommerce-admin/zipball/161e6afa01a3fb69533cfa2b245a71df7512ec3f",
"reference": "161e6afa01a3fb69533cfa2b245a71df7512ec3f",
"shasum": ""
},
"require": {
@ -544,7 +544,7 @@
],
"description": "A modern, javascript-driven WooCommerce Admin experience.",
"homepage": "https://github.com/woocommerce/woocommerce-admin",
"time": "2021-04-28T19:39:33+00:00"
"time": "2021-04-29T14:11:48+00:00"
},
{
"name": "woocommerce/woocommerce-blocks",

454
tests/e2e/core-tests/package-lock.json generated Normal file
View File

@ -0,0 +1,454 @@
{
"name": "@woocommerce/e2e-core-tests",
"version": "0.1.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
"integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
"requires": {
"@babel/highlight": "^7.12.13"
}
},
"@babel/helper-validator-identifier": {
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
},
"@babel/highlight": {
"version": "7.13.10",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz",
"integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==",
"requires": {
"@babel/helper-validator-identifier": "^7.12.11",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"@jest/environment": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.5.2.tgz",
"integrity": "sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw==",
"requires": {
"@jest/fake-timers": "^26.5.2",
"@jest/types": "^26.5.2",
"@types/node": "*",
"jest-mock": "^26.5.2"
}
},
"@jest/fake-timers": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.5.2.tgz",
"integrity": "sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw==",
"requires": {
"@jest/types": "^26.5.2",
"@sinonjs/fake-timers": "^6.0.1",
"@types/node": "*",
"jest-message-util": "^26.5.2",
"jest-mock": "^26.5.2",
"jest-util": "^26.5.2"
}
},
"@jest/globals": {
"version": "26.5.3",
"resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.5.3.tgz",
"integrity": "sha512-7QztI0JC2CuB+Wx1VdnOUNeIGm8+PIaqngYsZXQCkH2QV0GFqzAYc9BZfU0nuqA6cbYrWh5wkuMzyii3P7deug==",
"requires": {
"@jest/environment": "^26.5.2",
"@jest/types": "^26.5.2",
"expect": "^26.5.3"
}
},
"@jest/types": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
"integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
"@types/istanbul-reports": "^3.0.0",
"@types/node": "*",
"@types/yargs": "^15.0.0",
"chalk": "^4.0.0"
}
},
"@sinonjs/commons": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
"integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
"requires": {
"type-detect": "4.0.8"
}
},
"@sinonjs/fake-timers": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz",
"integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==",
"requires": {
"@sinonjs/commons": "^1.7.0"
}
},
"@types/istanbul-lib-coverage": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
"integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw=="
},
"@types/istanbul-lib-report": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
"integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
"requires": {
"@types/istanbul-lib-coverage": "*"
}
},
"@types/istanbul-reports": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz",
"integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==",
"requires": {
"@types/istanbul-lib-report": "*"
}
},
"@types/node": {
"version": "14.14.41",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.41.tgz",
"integrity": "sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g=="
},
"@types/stack-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz",
"integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw=="
},
"@types/yargs": {
"version": "15.0.13",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz",
"integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==",
"requires": {
"@types/yargs-parser": "*"
}
},
"@types/yargs-parser": {
"version": "20.2.0",
"resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
"integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA=="
},
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": {
"fill-range": "^7.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"ci-info": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
"integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
},
"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==",
"requires": {
"color-name": "~1.1.4"
}
},
"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=="
},
"config": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/config/-/config-3.3.3.tgz",
"integrity": "sha512-T3RmZQEAji5KYqUQpziWtyGJFli6Khz7h0rpxDwYNjSkr5ynyTWwO7WpfjHzTXclNCDfSWQRcwMb+NwxJesCKw==",
"requires": {
"json5": "^2.1.1"
}
},
"diff-sequences": {
"version": "26.5.0",
"resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.5.0.tgz",
"integrity": "sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q=="
},
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
},
"expect": {
"version": "26.5.3",
"resolved": "https://registry.npmjs.org/expect/-/expect-26.5.3.tgz",
"integrity": "sha512-kkpOhGRWGOr+TEFUnYAjfGvv35bfP+OlPtqPIJpOCR9DVtv8QV+p8zG0Edqafh80fsjeE+7RBcVUq1xApnYglw==",
"requires": {
"@jest/types": "^26.5.2",
"ansi-styles": "^4.0.0",
"jest-get-type": "^26.3.0",
"jest-matcher-utils": "^26.5.2",
"jest-message-util": "^26.5.2",
"jest-regex-util": "^26.0.0"
}
},
"faker": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz",
"integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g=="
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"graceful-fs": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
"integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ=="
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"is-ci": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
"integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
"requires": {
"ci-info": "^2.0.0"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"jest-diff": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.5.2.tgz",
"integrity": "sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA==",
"requires": {
"chalk": "^4.0.0",
"diff-sequences": "^26.5.0",
"jest-get-type": "^26.3.0",
"pretty-format": "^26.5.2"
}
},
"jest-get-type": {
"version": "26.3.0",
"resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz",
"integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig=="
},
"jest-matcher-utils": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz",
"integrity": "sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA==",
"requires": {
"chalk": "^4.0.0",
"jest-diff": "^26.5.2",
"jest-get-type": "^26.3.0",
"pretty-format": "^26.5.2"
}
},
"jest-message-util": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.5.2.tgz",
"integrity": "sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw==",
"requires": {
"@babel/code-frame": "^7.0.0",
"@jest/types": "^26.5.2",
"@types/stack-utils": "^2.0.0",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"micromatch": "^4.0.2",
"slash": "^3.0.0",
"stack-utils": "^2.0.2"
}
},
"jest-mock": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.5.2.tgz",
"integrity": "sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw==",
"requires": {
"@jest/types": "^26.5.2",
"@types/node": "*"
}
},
"jest-regex-util": {
"version": "26.0.0",
"resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz",
"integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A=="
},
"jest-util": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.5.2.tgz",
"integrity": "sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg==",
"requires": {
"@jest/types": "^26.5.2",
"@types/node": "*",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"is-ci": "^2.0.0",
"micromatch": "^4.0.2"
}
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"json5": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"requires": {
"minimist": "^1.2.5"
}
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"picomatch": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz",
"integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg=="
},
"pretty-format": {
"version": "26.5.2",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
"integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
"requires": {
"@jest/types": "^26.5.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
"react-is": "^16.12.0"
}
},
"react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="
},
"stack-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz",
"integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==",
"requires": {
"escape-string-regexp": "^2.0.0"
}
},
"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==",
"requires": {
"has-flag": "^4.0.0"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"requires": {
"is-number": "^7.0.0"
}
},
"type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
}
}
}

View File

@ -73,7 +73,7 @@ const runShopperTests = () => {
runCheckoutCreateAccountTest();
runCheckoutLoginAccountTest();
runCartCalculateShippingTest();
runCartRedirectionTest();
runCartRedirectionTest();
runOrderEmailReceivingTest();
};

View File

@ -0,0 +1,83 @@
/* eslint-disable jest/no-export, jest/no-disabled-tests */
/**
* Internal dependencies
*/
const {
merchant,
completeOnboardingWizard,
withRestApi,
addShippingZoneAndMethod,
IS_RETEST_MODE,
} = require( '@woocommerce/e2e-utils' );
/**
* External dependencies
*/
const config = require( 'config' );
const {
it,
describe,
} = require( '@jest/globals' );
const shippingZoneNameUS = config.get( 'addresses.customer.shipping.country' );
const runOnboardingFlowTest = () => {
describe('Store owner can go through store Onboarding', () => {
if ( IS_RETEST_MODE ) {
it('can reset onboarding to default settings', async () => {
await withRestApi.resetOnboarding();
});
it('can reset shipping zones to default settings', async () => {
await withRestApi.deleteAllShippingZones();
});
it('can reset to default settings', async () => {
await withRestApi.resetSettingsGroupToDefault('general');
await withRestApi.resetSettingsGroupToDefault('products');
await withRestApi.resetSettingsGroupToDefault('tax');
});
}
it('can start and complete onboarding when visiting the site for the first time.', async () => {
await completeOnboardingWizard();
});
});
};
const runTaskListTest = () => {
describe('Store owner can go through setup Task List', () => {
it('can setup shipping', async () => {
await page.evaluate(() => {
document.querySelector('.woocommerce-list__item-title').scrollIntoView();
});
// Query for all tasks on the list
const taskListItems = await page.$$('.woocommerce-list__item-title');
expect(taskListItems.length).toBeInRange( 5, 6 );
// Work around for https://github.com/woocommerce/woocommerce-admin/issues/6761
if ( taskListItems.length == 6 ) {
// Click on "Set up shipping" task to move to the next step
const [ setupTaskListItem ] = await page.$x( '//div[contains(text(),"Set up shipping")]' );
await setupTaskListItem.click();
// Wait for "Proceed" button to become active
await page.waitForSelector('button.is-primary:not(:disabled)');
await page.waitFor(3000);
// Click on "Proceed" button to save shipping settings
await page.click('button.is-primary');
await page.waitFor(3000);
} else {
await merchant.openNewShipping();
await addShippingZoneAndMethod(shippingZoneNameUS);
}
});
});
};
module.exports = {
runOnboardingFlowTest,
runTaskListTest,
};

View File

@ -42,15 +42,14 @@ const runOrderApplyCouponTest = () => {
} );
it('can apply a coupon', async () => {
await page.waitForSelector('button.add-coupon');
const couponDialog = await expect(page).toDisplayDialog(async () => {
await evalAndClick('button.add-coupon');
});
expect(couponDialog.message()).toMatch(couponDialogMessage);
// Accept the dialog with the coupon code
await couponDialog.accept(couponCode);
await uiUnblocked();
// Verify the coupon list is showing

View File

@ -1,4 +1,4 @@
/* eslint-disable jest/no-export, jest/no-disabled-tests, */
/* eslint-disable jest/no-export, jest/no-disabled-tests, jest/expect-expect */
/**
* Internal dependencies

View File

@ -57,7 +57,7 @@ const runOrderStatusFiltersTest = () => {
await createSimpleOrder(orderStatus.cancelled.description.text);
await createSimpleOrder(orderStatus.refunded.description.text);
await createSimpleOrder(orderStatus.failed.description.text);
}, 40000);
}, 60000);
afterAll( async () => {
// Make sure we're on the all orders view and cleanup the orders we created

View File

@ -35,7 +35,6 @@ const runProductEditDetailsTest = () => {
await expect(page).toFill('#_regular_price', '100.05');
// Save the changes
await expect(page).toClick('#publish');
await verifyAndPublish('Product updated.');
await uiUnblocked();

View File

@ -84,12 +84,19 @@ const runAddSimpleProductTest = () => {
const runAddVariableProductTest = () => {
describe('Add New Variable Product Page', () => {
it('can create product with variations', async () => {
beforeAll(async () => {
await merchant.login();
});
it('can create variable product', async () => {
await openNewProductAndVerify();
// Set product data
await expect(page).toFill('#title', 'Variable Product with Three Variations');
await expect(page).toSelect('#product-type', 'Variable product');
});
it('can create set variable product attributes', async () => {
// Create attributes for variations
await waitAndClick( page, '.attribute_tab a' );
@ -111,7 +118,9 @@ const runAddVariableProductTest = () => {
// Wait for attribute form to save (triggers 2 UI blocks)
await uiUnblocked();
await uiUnblocked();
});
it('can create variable product variations', async () => {
// Create variations from attributes
await waitForSelector( page, '.variations_tab' );
await waitAndClick( page, '.variations_tab a' );
@ -129,8 +138,11 @@ const runAddVariableProductTest = () => {
// Set some variation data
await uiUnblocked();
await uiUnblocked();
});
it('can create variation attributes', async () => {
await waitAndClick( page, '.variations_tab a' );
await uiUnblocked();
await waitForSelector(
page,
'select[name="attribute_attr-1[0]"]',

View File

@ -41,7 +41,7 @@ const runCartApplyCouponsTest = () => {
await shopper.goToCart();
});
it('allows customer to apply fixed cart coupon', async () => {
it('allows cart to apply fixed cart coupon', async () => {
await applyCoupon(couponFixedCart);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -52,7 +52,7 @@ const runCartApplyCouponsTest = () => {
await removeCoupon(couponFixedCart);
});
it('allows customer to apply percentage coupon', async () => {
it('allows cart to apply percentage coupon', async () => {
await applyCoupon(couponPercentage);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -63,7 +63,7 @@ const runCartApplyCouponsTest = () => {
await removeCoupon(couponPercentage);
});
it('allows customer to apply fixed product coupon', async () => {
it('allows cart to apply fixed product coupon', async () => {
await applyCoupon(couponFixedProduct);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -74,7 +74,7 @@ const runCartApplyCouponsTest = () => {
await removeCoupon(couponFixedProduct);
});
it('prevents customer applying same coupon twice', async () => {
it('prevents cart applying same coupon twice', async () => {
await applyCoupon(couponFixedCart);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
await applyCoupon(couponFixedCart);
@ -84,7 +84,7 @@ const runCartApplyCouponsTest = () => {
await expect(page).toMatchElement('.order-total .amount', {text: '$4.99'});
});
it('allows customer to apply multiple coupons', async () => {
it('allows cart to apply multiple coupons', async () => {
await applyCoupon(couponFixedProduct);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});

View File

@ -41,7 +41,7 @@ const runCheckoutApplyCouponsTest = () => {
await shopper.goToCheckout();
});
it('allows customer to apply fixed cart coupon', async () => {
it('allows checkout to apply fixed cart coupon', async () => {
await applyCoupon(couponFixedCart);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -54,7 +54,7 @@ const runCheckoutApplyCouponsTest = () => {
await removeCoupon(couponFixedCart);
});
it('allows customer to apply percentage coupon', async () => {
it('allows checkout to apply percentage coupon', async () => {
await applyCoupon(couponPercentage);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -64,7 +64,7 @@ const runCheckoutApplyCouponsTest = () => {
await removeCoupon(couponPercentage);
});
it('allows customer to apply fixed product coupon', async () => {
it('allows checkout to apply fixed product coupon', async () => {
await applyCoupon(couponFixedProduct);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -75,7 +75,7 @@ const runCheckoutApplyCouponsTest = () => {
await removeCoupon(couponFixedProduct);
});
it('prevents customer applying same coupon twice', async () => {
it('prevents checkout applying same coupon twice', async () => {
await applyCoupon(couponFixedCart);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
await applyCoupon(couponFixedCart);
@ -85,7 +85,7 @@ const runCheckoutApplyCouponsTest = () => {
await expect(page).toMatchElement('.order-total .amount', {text: '$4.99'});
});
it('allows customer to apply multiple coupons', async () => {
it('allows checkout to apply multiple coupons', async () => {
await applyCoupon(couponFixedProduct);
await expect(page).toMatchElement('.woocommerce-message', {text: 'Coupon code applied successfully.'});
@ -94,7 +94,7 @@ const runCheckoutApplyCouponsTest = () => {
await expect(page).toMatchElement('.order-total .amount', {text: '$0.00'});
});
it('restores cart total when coupons are removed', async () => {
it('restores checkout total when coupons are removed', async () => {
await removeCoupon(couponFixedCart);
await removeCoupon(couponFixedProduct);
await expect(page).toMatchElement('.order-total .amount', {text: '$9.99'});

View File

@ -3,6 +3,8 @@
## Added
- `takeScreenshotFor` utility function to take screenshots within tests
- `sendFailedTestScreenshotToSlack` to send the screenshot to the configured Slack channel
- `sendFailedTestMessageToSlack` to send the context for screenshot to the configured Slack channel
- `toBeInRange` expect numeric range matcher
# 0.2.1

View File

@ -5,6 +5,7 @@ const babelConfig = require( './babel.config' );
const esLintConfig = require( './.eslintrc.js' );
const allE2EConfig = require( './config' );
const allE2EUtils = require( './utils' );
const slackUtils = require( './src/slack' );
/**
* External dependencies
*/
@ -16,4 +17,5 @@ module.exports = {
...allE2EConfig,
...allE2EUtils,
...allPuppeteerUtils,
...slackUtils,
};

View File

@ -51,37 +51,6 @@ async function setupBrowser() {
await setBrowserViewport( 'large' );
}
/**
* Navigates to woocommerce import page and imports sample products.
*
* @return {Promise} Promise resolving once products have been imported.
*/
async function importSampleProducts() {
await switchUserToAdmin();
// Visit Import Products page.
await visitAdminPage(
'edit.php',
'post_type=product&page=product_importer'
);
await page.click( 'a.woocommerce-importer-toggle-advanced-options' );
await page.focus( '#woocommerce-importer-file-url' );
// local path for sample data that is included with woo.
await page.keyboard.type(
'wp-content/plugins/woocommerce/sample-data/sample_products.csv'
);
await page.click( '.wc-actions .button-next' );
await page.waitForSelector( '.wc-importer-mapping-table' );
await page.select(
'.wc-importer-mapping-table tr:nth-child(29) select',
''
);
await page.click( '.wc-actions .button-next' );
await page.waitForXPath(
"//*[@class='woocommerce-importer-done' and contains(., 'Import complete! ')]"
);
await switchUserToTest();
}
/**
* Adds an event listener to the page to handle additions of page event
* handlers, to assure that they are removed at test teardown.

View File

@ -1 +1,3 @@
export * from './reporter';
const slackUtils = require( './reporter' );
module.exports = slackUtils;

View File

@ -69,7 +69,7 @@ const initializeSlack = () => {
* @param testName
* @returns {Promise<void>}
*/
export async function sendFailedTestMessageToSlack( testName ) {
async function sendFailedTestMessageToSlack( testName ) {
const { branch, commit, webUrl } = initializeSlack();
if ( ! branch ) {
return;
@ -127,7 +127,7 @@ export async function sendFailedTestMessageToSlack( testName ) {
* @param screenshotOfFailedTest
* @returns {Promise<void>}
*/
export async function sendFailedTestScreenshotToSlack( screenshotOfFailedTest ) {
async function sendFailedTestScreenshotToSlack( screenshotOfFailedTest ) {
const pr = initializeSlack();
if ( ! pr ) {
return;
@ -154,3 +154,8 @@ export async function sendFailedTestScreenshotToSlack( screenshotOfFailedTest )
}
}
}
module.exports = {
sendFailedTestMessageToSlack,
sendFailedTestScreenshotToSlack,
};

View File

@ -24,7 +24,7 @@ const takeScreenshotFor = async ( message ) => {
});
} catch ( error ) {
return {
title: 'no screenshot',
title,
filePath: '',
};
}

View File

@ -18,7 +18,9 @@ import {
waitForSelectorWithoutThrow,
} from './page-utils';
import factories from './factories';
import { Coupon } from '@woocommerce/api';
const client = factories.api.withDefaultPermalinks;
const config = require( 'config' );
const simpleProductName = config.get( 'products.simple.name' );
const simpleProductPrice = config.has('products.simple.price') ? config.get('products.simple.price') : '9.99';
@ -429,7 +431,8 @@ const addProductToOrder = async ( orderId, productName ) => {
await expect( page ).toClick( 'button.add-order-item' );
await page.waitForSelector( '.wc-backbone-modal-header' );
await expect( page ).toClick( '.wc-backbone-modal-content .wc-product-search' );
await expect( page ).toFill( '#wc-backbone-modal-dialog + .select2-container .select2-search__field', productName );
await expect( page ).toFill('#wc-backbone-modal-dialog + .select2-container .select2-search__field', productName);
await page.waitForSelector( 'li[aria-selected="true"]', { timeout: 10000 } );
await expect( page ).toClick( 'li[aria-selected="true"]' );
await page.click( '.wc-backbone-modal-content #btn-ok' );
@ -446,23 +449,29 @@ const addProductToOrder = async ( orderId, productName ) => {
* @param discountType Type of a coupon. Defaults to Fixed cart discount.
*/
const createCoupon = async ( couponAmount = '5', discountType = 'Fixed cart discount' ) => {
await merchant.openNewCoupon();
let couponType;
switch ( discountType ) {
case "Fixed cart discount":
couponType = 'fixed_cart';
break;
case "Fixed product discount":
couponType = 'fixed_product';
break;
case "Percentage discount":
couponType = 'percent';
break;
default:
couponType = discountType;
}
// Fill in coupon code
let couponCode = 'Code-' + discountType + new Date().getTime().toString();
await expect(page).toFill( '#title', couponCode );
// Set general coupon data
await clickTab( 'General' );
await expect(page).toSelect( '#discount_type', discountType );
await expect(page).toFill( '#coupon_amount', couponAmount );
// Publish coupon
await expect( page ).toClick( '#publish' );
await page.waitForSelector( '.updated.notice' );
// Verify
await expect( page ).toMatchElement( '.updated.notice', { text: 'Coupon updated.' } );
let couponCode = 'code-' + couponType + new Date().getTime().toString();
const repository = Coupon.restRepository( client );
await repository.create( {
code: couponCode,
discountType: couponType,
amount: couponAmount,
});
return couponCode;
};

View File

@ -247,9 +247,8 @@ export const selectOptionInSelect2 = async ( value, selector = 'input.select2-se
export const searchForOrder = async (value, orderId, customerName) => {
await clearAndFillInput('#post-search-input', value);
await expect(page).toMatchElement('#post-search-input', value);
await expect(page).toClick('#search-submit');
await page.waitForSelector('#the-list');
await page.waitFor(1000);
await expect(page).toClick('#search-submit' );
await page.waitForSelector('#the-list', { timeout: 10000 } );
await expect(page).toMatchElement('.order_number > a.order-view', {text: `#${orderId} ${customerName}`});
};