From 30a526b29569e99d5e808eb4566f3f511dc89e9e Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 06:41:09 +0300 Subject: [PATCH 01/11] 1. add first test 2. separate click from realClick --- README.md | 4 + cypress.config.ts | 39 +++++ package.json | 8 +- src/cypress-helper-spec.cy.ts | 11 ++ src/cypress-helper.ts | 15 +- tsconfig.json | 3 +- yarn.lock | 258 ++++++++++++++++++++++++++++++---- 7 files changed, 300 insertions(+), 38 deletions(-) create mode 100644 cypress.config.ts create mode 100644 src/cypress-helper-spec.cy.ts diff --git a/README.md b/README.md index d53e8dc..3fb78a7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Making TDD fun in the modular UI area. CypressHelper makes it saner to write UI testing. It enables creating component drivers that will work on all testing levels (component, integration, e2e). +Cypress Helpers can help you develop tests faster +CypressHelper is designed to be used in any test level, and holds common methods used in Cypress tests +CypressComponent helpers are designed to be used in component tests and are NOT framework agnostic. + ## Component Drivers Testing UI is hard. There are many reasons for that, but a big one relies in the fact that unlike functions or services, where the API is clearly defined, when dealing with graphical user interfaces, it's up for the developer to transform it into an "API" for testing purposes. diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000..a789b34 --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,39 @@ +import { defineConfig } from "cypress"; + +export default defineConfig({ + retries: { + // Configure retry attempts for `cypress run` + // Default is 0 + runMode: 2, + // Configure retry attempts for `cypress open` + // Default is 0 + openMode: 0 + }, + reporter: "mochawesome", + reporterOptions: + { + "reportDir": "cypress/results/json", + "overwrite": false, + "html": false, + "json": true, + suiteTitleSeparatedBy: " > ", + testCaseSwitchClassnameAndName: false, + rootSuiteTitle: "Angular Tests", + toConsole: true, + }, + e2e: { + setupNodeEvents(on, config) { + return config; + }, + supportFile:false, + baseUrl: "http://localhost:4200", + viewportHeight: 1000, + viewportWidth: 1600, + specPattern: "**/*.cy.{js,jsx,ts,tsx}", + excludeSpecPattern: "cypress/**/*.driver.{js,jsx,ts,tsx}", + defaultCommandTimeout: 50000, + experimentalStudio: true + }, + + +}); diff --git a/package.json b/package.json index 77bf472..df457dd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@shellygo/cypress-test-utils", "description": "Test Automation Utilities", - "version": "1.0.23", + "version": "1.0.24", "author": "Shelly Goldblit", "private": false, "license": "MIT", @@ -30,7 +30,7 @@ "@cypress/mount-utils": "^4.0.0", "@types/chai-subset": "^1.3.3", "chai-subset": "^1.6.0", - "cypress": "^12.5.1", + "cypress": "^12.17.3", "cypress-real-events": "^1.7.6", "cypress-wait-if-happens": "^1.3.3", "cypress-wait-until": "^1.7.2" @@ -43,11 +43,13 @@ "cross-var": "^1.1.0", "gh-pages": "^5.0.0", "lit": "^2.7.4", + "mochawesome": "^7.1.3", "react": "^18.2.0", "typedoc": "^0.24.8", "typedoc-plugin-markdown": "^3.15.3", "typedoc-plugin-merge-modules": "^5.0.1", - "typescript": "^4.6.4" + "typescript": "^4.6.4", + "yarn": "^1.22.19" }, "compilerOptions": { "target": "es5", diff --git a/src/cypress-helper-spec.cy.ts b/src/cypress-helper-spec.cy.ts new file mode 100644 index 0000000..a510a83 --- /dev/null +++ b/src/cypress-helper-spec.cy.ts @@ -0,0 +1,11 @@ +import { CypressHelper } from "./cypress-helper"; + +describe("cypress helper tests", () => { + const { beforeAndAfter, given, when, get } = new CypressHelper(); + beforeAndAfter(); + + it("should intercept request and mock response", async () => { + given.interceptAndMockResponse({url: "**/shellygo/whatever", response: {shelly: "go"}}) + expect(await(await fetch("https:/shellygo/whatever")).json()).to.include({shelly: "go"}) + }) +}) \ No newline at end of file diff --git a/src/cypress-helper.ts b/src/cypress-helper.ts index f648512..325d111 100644 --- a/src/cypress-helper.ts +++ b/src/cypress-helper.ts @@ -161,11 +161,22 @@ export class CypressHelper { * @example * ```ts * + * helper.when.realClick('move-right') + * ``` + */ + realClick: (selector: string, index: number = 0) => + this.get.elementByTestId(selector, index).realClick(), + /** + * Click a DOM element. + * + * @example + * ```ts + * * helper.when.click('move-right') * ``` */ click: (selector: string, index: number = 0) => - this.get.elementByTestId(selector, index).realClick(), + this.get.elementByTestId(selector, index).click(), /** * overrides native global functions related to time * allowing them to be controlled synchronously via helper.when.tick() @@ -273,7 +284,7 @@ export class CypressHelper { /** * Scopes all subsequent cy commands to within this element * @example - * helper.when.within(() => expect(get.emcLogo()).to.exist, 'company-logo) + * helper.when.within(() => expect(get.emcLogo()).to.exist, 'company-logo') */ within: (fn: () => void, selector: string, index: number = 0) => this.get.elementByTestId(selector, index).within(fn) diff --git a/tsconfig.json b/tsconfig.json index 57b750e..8f18331 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,8 +14,7 @@ "skipLibCheck": true, "skipDefaultLibCheck": false, "rootDir": ".", - "types": ["node"], - "typeRoots": ["node_modules/@types"], + "types": ["node", "cypress"], "lib": ["es2018", "dom"], "baseUrl": "./", "module": "ESNext", diff --git a/yarn.lock b/yarn.lock index 1bc202c..3ae8521 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,10 +19,10 @@ resolved "https://registry.yarnpkg.com/@cypress/mount-utils/-/mount-utils-4.0.0.tgz#647c24158caddc656741648291c77dfa1b6b1621" integrity sha512-4w8WZpOALz5+vhJmPfh2HkT4NMsRP2DgVqSXxXu46GR5yUGfqJ0+WgUrmVuujtKKY6n1mDiO1L4AfZ+4bsEYGQ== -"@cypress/request@^2.88.10": - version "2.88.11" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.11.tgz#5a4c7399bc2d7e7ed56e92ce5acb620c8b187047" - integrity sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w== +"@cypress/request@^2.88.11": + version "2.88.12" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590" + integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -39,7 +39,7 @@ performance-now "^2.1.0" qs "~6.10.3" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -80,10 +80,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.3.tgz#329842940042d2b280897150e023e604d11657d6" integrity sha512-wheIYdr4NYML61AjC8MKj/2jrR/kDQri/CIpVoZwldwhnIrD/j9jIU5bJ8yBKuB2VhpFV7Ab6G2XkBjv9r9Zzw== -"@types/node@^14.14.31": - version "14.18.53" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.53.tgz#42855629b8773535ab868238718745bf56c56219" - integrity sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A== +"@types/node@^16.18.39": + version "16.18.39" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.39.tgz#aa39a1a87a40ef6098ee69689a1acb0c1b034832" + integrity sha512-8q9ZexmdYYyc5/cfujaXb4YOucpQxAV4RMG0himLyDUOEr8Mr79VrqsFI+cQ2M2h89YIuy95lbxuYjxT4Hk4kQ== "@types/prop-types@*": version "15.7.5" @@ -1120,7 +1120,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^4.1.0: +chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1193,6 +1193,15 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -1346,14 +1355,14 @@ cypress-wait-until@^1.7.2: resolved "https://registry.yarnpkg.com/cypress-wait-until/-/cypress-wait-until-1.7.2.tgz#7f534dd5a11c89b65359e7a0210f20d3dfc22107" integrity sha512-uZ+M8/MqRcpf+FII/UZrU7g1qYZ4aVlHcgyVopnladyoBrpoaMJ4PKZDrdOJ05H5RHbr7s9Tid635X3E+ZLU/Q== -cypress@^12.5.1: - version "12.16.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.16.0.tgz#d0dcd0725a96497f4c60cf54742242259847924c" - integrity sha512-mwv1YNe48hm0LVaPgofEhGCtLwNIQEjmj2dJXnAkY1b4n/NE9OtgPph4TyS+tOtYp5CKtRmDvBzWseUXQTjbTg== +cypress@^12.17.3: + version "12.17.3" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.3.tgz#1e2b19037236fc60e4a4b3a14f0846be17a1fc0e" + integrity sha512-/R4+xdIDjUSLYkiQfwJd630S81KIgicmQOLXotFxVXkl+eTeVO+3bHXxdi5KBh/OgC33HWN33kHX+0tQR/ZWpg== dependencies: - "@cypress/request" "^2.88.10" + "@cypress/request" "^2.88.11" "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" + "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" @@ -1388,7 +1397,7 @@ cypress@^12.5.1: pretty-bytes "^5.6.0" proxy-from-env "1.0.0" request-progress "^3.0.0" - semver "^7.3.2" + semver "^7.5.3" supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" @@ -1401,6 +1410,11 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +dateformat@^4.5.1: + version "4.6.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" + integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== + dayjs@^1.10.4: version "1.11.9" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.9.tgz#9ca491933fadd0a60a2c19f6c237c03517d71d1a" @@ -1466,6 +1480,11 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +diff@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + duplexer@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -1503,6 +1522,16 @@ enquirer@^2.3.6: dependencies: ansi-colors "^4.1.1" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1748,6 +1777,15 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -1780,11 +1818,21 @@ fsevents@^1.0.0: bindings "^1.5.0" nan "^2.12.1" +fsu@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsu/-/fsu-1.1.1.tgz#bd36d3579907c59d85b257a75b836aa9e0c31834" + integrity sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-intrinsic@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" @@ -2269,7 +2317,7 @@ json-schema@0.4.0: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== -json-stringify-safe@~5.0.1: +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== @@ -2385,6 +2433,26 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.isempty@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + integrity sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg== + +lodash.isfunction@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" + integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== + +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" + integrity sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.once@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" @@ -2413,7 +2481,7 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -loose-envify@^1.0.0, loose-envify@^1.1.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -2563,6 +2631,40 @@ mkdirp@^0.5.1: dependencies: minimist "^1.2.6" +mochawesome-report-generator@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz#65a30a11235ba7a68e1cf0ca1df80d764b93ae78" + integrity sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg== + dependencies: + chalk "^4.1.2" + dateformat "^4.5.1" + escape-html "^1.0.3" + fs-extra "^10.0.0" + fsu "^1.1.1" + lodash.isfunction "^3.0.9" + opener "^1.5.2" + prop-types "^15.7.2" + tcomb "^3.2.17" + tcomb-validation "^3.3.0" + validator "^13.6.0" + yargs "^17.2.1" + +mochawesome@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/mochawesome/-/mochawesome-7.1.3.tgz#07b358138f37f5b07b51a1b255d84babfa36fa83" + integrity sha512-Vkb3jR5GZ1cXohMQQ73H3cZz7RoxGjjUo0G5hu0jLaW+0FdUxUwg3Cj29bqQdh0rFcnyV06pWmqmi5eBPnEuNQ== + dependencies: + chalk "^4.1.2" + diff "^5.0.0" + json-stringify-safe "^5.0.1" + lodash.isempty "^4.4.0" + lodash.isfunction "^3.0.9" + lodash.isobject "^3.0.2" + lodash.isstring "^4.0.1" + mochawesome-report-generator "^6.2.0" + strip-ansi "^6.0.1" + uuid "^8.3.2" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -2619,7 +2721,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -object-assign@^4.0.1: +object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -2674,6 +2776,11 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" +opener@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" + integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -2809,6 +2916,15 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +prop-types@^15.7.2: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + proxy-from-env@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" @@ -2819,7 +2935,7 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== -psl@^1.1.28: +psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== @@ -2844,6 +2960,11 @@ qs@~6.10.3: dependencies: side-channel "^1.0.4" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + randomatic@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" @@ -2853,6 +2974,11 @@ randomatic@^3.0.0: kind-of "^6.0.0" math-random "^1.0.1" +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + react@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" @@ -2966,6 +3092,16 @@ request-progress@^3.0.0: dependencies: throttleit "^1.0.0" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -3039,10 +3175,10 @@ semver@^6.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.2: - version "7.5.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" - integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== +semver@^7.5.3: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" @@ -3225,7 +3361,7 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3298,6 +3434,18 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tcomb-validation@^3.3.0: + version "3.4.1" + resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65" + integrity sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA== + dependencies: + tcomb "^3.0.0" + +tcomb@^3.0.0, tcomb@^3.2.17: + version "3.2.29" + resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-3.2.29.tgz#32404fe9456d90c2cf4798682d37439f1ccc386c" + integrity sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ== + throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" @@ -3345,13 +3493,15 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== +tough-cookie@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== dependencies: - psl "^1.1.28" + psl "^1.1.33" punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" trim-repeated@^1.0.0: version "1.0.0" @@ -3434,6 +3584,11 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -3457,6 +3612,14 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -3472,6 +3635,11 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +validator@^13.6.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" + integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -3533,6 +3701,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -3543,6 +3716,29 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.2.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yarn@^1.22.19: + version "1.22.19" + resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.19.tgz#4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" + integrity sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ== + yauzl@^2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" From b21c6bb511d67877acb4af78da0c62c3e83042d2 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 06:45:09 +0300 Subject: [PATCH 02/11] run tests as part of the build --- .github/workflows/npm-build.yml | 1 + package.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 6c636ee..db2db33 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -18,6 +18,7 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npx yarn install --frozen-lockfile - run: npm run build + - run: npm run cy:run - run: npm run generate-md-docs diff --git a/package.json b/package.json index df457dd..b15659b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,8 @@ "scripts": { "build": "rm -rf dist/* && tsc && mv dist/out-tsc/src/lit dist/out-tsc/lit && mv dist/out-tsc/src/angular dist/out-tsc/angular && mv dist/out-tsc/src/react dist/out-tsc/react", "package": "node --max-old-space-size=4400 && npm run build", + "cy:run": "npx cypress run", + "cy:open": "npx cypress open", "copy-readme": "cp README.md dist/out-tsc", "publish-package": "npm run copy-readme && cd dist/out-tsc && npm publish", "generate-md-docs": "npx typedoc --includeVersion --plugin typedoc-plugin-markdown --plugin typedoc-plugin-merge-modules --options typedoc.md.json", From a468d23bce588b9536ae7f0fac3f2a763ea215f0 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 06:47:11 +0300 Subject: [PATCH 03/11] fake base url --- cypress.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index a789b34..6de8688 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ return config; }, supportFile:false, - baseUrl: "http://localhost:4200", + baseUrl: "https://shellydcms.github.io/cypress-test-utils/modules.html", viewportHeight: 1000, viewportWidth: 1600, specPattern: "**/*.cy.{js,jsx,ts,tsx}", From 1c13645dc5321324ee0d0d535a2256292edf5916 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 06:53:57 +0300 Subject: [PATCH 04/11] publish test results --- .github/workflows/npm-build.yml | 9 ++++++++- .gitignore | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index db2db33..7c5f70f 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -20,5 +20,12 @@ jobs: - run: npm run build - run: npm run cy:run - run: npm run generate-md-docs - + - name: Angular Tests Report + uses: phoenix-actions/test-reporting@v8 + id: test-report + if: always() + with: + name: Cypress Tests + path: ${{ github.workspace }}/cypress/results/json/mochawesome.json + reporter: mochawesome-json diff --git a/.gitignore b/.gitignore index 7558d8d..3b0b8cc 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /node/ /cypress/videos /cypress/screenshots +/cypress/results /instrumented .nyc_output .external-resources From 48d1b0c8f439bf61592c7741deceea2946115906 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 06:56:46 +0300 Subject: [PATCH 05/11] update tests pattern --- cypress.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress.config.ts b/cypress.config.ts index 6de8688..08910ce 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -29,7 +29,7 @@ export default defineConfig({ baseUrl: "https://shellydcms.github.io/cypress-test-utils/modules.html", viewportHeight: 1000, viewportWidth: 1600, - specPattern: "**/*.cy.{js,jsx,ts,tsx}", + specPattern: "src/**/*.cy.{js,jsx,ts,tsx}", excludeSpecPattern: "cypress/**/*.driver.{js,jsx,ts,tsx}", defaultCommandTimeout: 50000, experimentalStudio: true From 98888f195a87d75f0347436cdfec37d3eecacc34 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 07:00:07 +0300 Subject: [PATCH 06/11] try to get test report --- .github/workflows/npm-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 7c5f70f..21861a5 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -20,12 +20,12 @@ jobs: - run: npm run build - run: npm run cy:run - run: npm run generate-md-docs - - name: Angular Tests Report + - name: Tests Report uses: phoenix-actions/test-reporting@v8 id: test-report if: always() with: name: Cypress Tests - path: ${{ github.workspace }}/cypress/results/json/mochawesome.json + path: /cypress/results/json/mochawesome.json reporter: mochawesome-json From 9b26926fe3cfd6a7899f6809289961bff97f57d3 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 07:03:04 +0300 Subject: [PATCH 07/11] wtf --- .github/workflows/npm-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 21861a5..76c9799 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -26,6 +26,6 @@ jobs: if: always() with: name: Cypress Tests - path: /cypress/results/json/mochawesome.json + path: ${{ github.workspace }}/cypress/results/json/mochawesome.json reporter: mochawesome-json From 45cd7778f2343ddbdd358d6d432a1040682f9979 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 07:06:08 +0300 Subject: [PATCH 08/11] add permissions --- .github/workflows/npm-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 76c9799..2b194e2 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -7,6 +7,10 @@ on: pull_request: workflow_dispatch: +permissions: + checks: write + pull-requests: write + jobs: build: runs-on: ubuntu-latest From 26864c73d6ab41ef69da7cf4e3c939c9b98ad768 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 14:45:47 +0300 Subject: [PATCH 09/11] add html for tests --- src/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/index.html diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..9ad19d3 --- /dev/null +++ b/src/index.html @@ -0,0 +1,9 @@ + + + + +

My First Heading

+

My first paragraph.

+ + + From a944b266463286193492d0c03afbfe73e3b3cf69 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 14:46:59 +0300 Subject: [PATCH 10/11] run tests from main branch as well --- .github/workflows/npm-publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index fb914fd..d142ed3 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -19,6 +19,7 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npx yarn install --frozen-lockfile - run: npm run build + - run: npm run cy:run - run: npm run generate-md-docs - name: Generate html docs run: npm run generate-docs @@ -29,8 +30,17 @@ jobs: dir: docs branch: gh-pages token: ${{ secrets.ACCESS_TOKEN }} + - name: Tests Report + uses: phoenix-actions/test-reporting@v8 + id: test-report + if: always() + with: + name: Cypress Tests + path: ${{ github.workspace }}/cypress/results/json/mochawesome.json + reporter: mochawesome-json - run: npm run publish-package env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + From 37857a88c890e7a629f5184013d6dd3fc55aa925 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Fri, 4 Aug 2023 15:00:00 +0300 Subject: [PATCH 11/11] move index.html --- src/index.html => index.html | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/index.html => index.html (100%) diff --git a/src/index.html b/index.html similarity index 100% rename from src/index.html rename to index.html