From e7438c7dd4f61e8972efa299516ab17e76b99318 Mon Sep 17 00:00:00 2001 From: shelly_goldblit Date: Thu, 21 Mar 2024 07:02:14 +0200 Subject: [PATCH] update to latest test utils --- examples/angular/pokemon-catalog/package.json | 2 +- .../pokemon-catalog.component.driver.ts | 18 ++--- .../pokemon-catalog.component.spec.cy.ts | 4 +- examples/angular/pokemon-catalog/yarn.lock | 29 ++++---- examples/lit/pokemon-catalog/package.json | 2 +- .../pokemon-catalog.component.driver.ts | 20 ++---- examples/lit/pokemon-catalog/yarn.lock | 29 ++++---- examples/react/pokemon-catalog/package.json | 2 +- .../pokemon-catalog.component.driver.tsx | 16 +---- examples/react/pokemon-catalog/yarn.lock | 29 ++++---- package.json | 4 +- yarn.lock | 69 ++++++++++++++++++- 12 files changed, 140 insertions(+), 84 deletions(-) diff --git a/examples/angular/pokemon-catalog/package.json b/examples/angular/pokemon-catalog/package.json index 45b7c322..c91ac5a6 100644 --- a/examples/angular/pokemon-catalog/package.json +++ b/examples/angular/pokemon-catalog/package.json @@ -43,7 +43,7 @@ "@cypress/webpack-dev-server": "^3.4.1", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@jsdevtools/coverage-istanbul-loader": "^3.0.5", - "@shellygo/cypress-test-utils": "^2.0.37", + "@shellygo/cypress-test-utils": "^2.0.52", "@types/chance": "^1.1.3", "@types/jasmine": "~4.0.0", "builder-pattern": "^2.2.0", diff --git a/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.driver.ts b/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.driver.ts index af07d067..27ce91e8 100644 --- a/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.driver.ts +++ b/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.driver.ts @@ -12,10 +12,7 @@ export class PokemonCatalogComponentDriver { private pokemonImageDriver: PokemonImageComponentDriver = new PokemonImageComponentDriver(); private componentProperties: Partial = {}; - private pokemonServiceMock: Partial = { - getPokemon: url => Promise.reject(), - getPokemonByOffset: offset => Promise.reject() - }; + private pokemonServiceMock = this.helper.given.stubbedInstance(PokemonService); beforeAndAfter = () => { this.helper.beforeAndAfter(); @@ -25,22 +22,15 @@ export class PokemonCatalogComponentDriver { given = { image: this.pokemonImageDriver.given, pokemon: (value: PokemonList) => { - this.pokemonServiceMock.getPokemon = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemon!.name) - .returns(value); - - this.pokemonServiceMock.getPokemonByOffset = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemonByOffset!.name) - .returns(value); + this.pokemonServiceMock.getPokemon.returns(value); + this.pokemonServiceMock.getPokemonByOffset.returns(value); } }; when = { image: this.pokemonImageDriver.when, render: (type: Type, config: MountConfig) => { - this.angularComponentHelper.when.mount(type, config, { + return this.angularComponentHelper.when.mount(type, config, { ...this.componentProperties }); }, diff --git a/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.spec.cy.ts b/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.spec.cy.ts index 82d6264f..3ef005c3 100644 --- a/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.spec.cy.ts +++ b/examples/angular/pokemon-catalog/src/app/components/pokemon-catalog/pokemon-catalog.component.spec.cy.ts @@ -32,10 +32,10 @@ describe("PokemonCatalogComponent Tests", () => { .previous(chance.url()) .build(); - beforeEach(() => { + beforeEach(async () => { given.pokemon(pokemon); given.image.mockImageResponse("default.png"); - when.render(PokemonCatalog, testConfig); + const fixture = (await when.render(PokemonCatalog, testConfig)).componentInstance; }); it("should show picture given pokemon provided as input", () => { diff --git a/examples/angular/pokemon-catalog/yarn.lock b/examples/angular/pokemon-catalog/yarn.lock index 180ffa34..db209531 100644 --- a/examples/angular/pokemon-catalog/yarn.lock +++ b/examples/angular/pokemon-catalog/yarn.lock @@ -1268,7 +1268,7 @@ 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.12": +"@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== @@ -1794,19 +1794,20 @@ "@angular-devkit/schematics" "16.2.9" jsonc-parser "3.2.0" -"@shellygo/cypress-test-utils@^2.0.37": - version "2.0.37" - resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.37.tgz#5147ce0e7f3a6c83a0cb002ce2f0b823c91a4904" - integrity sha512-EkrI6laP7xmme1BpvEPvWx0BUgfg9eO83h6ztn8DLWsYKZUVHH6uKH60PweaBWE+GsIpUqEKx/vFPIYu7u/48g== +"@shellygo/cypress-test-utils@^2.0.52": + version "2.0.52" + resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.52.tgz#5c765d4840fb67d6478be1cad46da7f59a191ced" + integrity sha512-TtB0wv1Ms9fxHNYDPXL8ki8sPSrHNrDgEs5Fjtw4jqXdf2VXTfhU6cX1lNBhRHVKTzBL5Zx5zg2VNt+zGvq2vg== dependencies: "@cypress/mount-utils" "^4.0.0" "@types/chai-subset" "^1.3.3" chai-subset "^1.6.0" - cypress "^12.17.3" + cypress "12.17.3" cypress-pipe "^2.0.0" cypress-real-events "^1.7.6" cypress-wait-if-happens "^1.3.3" cypress-wait-until "^1.7.2" + ts-stubber "^1.0.1" "@sigstore/bundle@^1.1.0": version "1.1.0" @@ -3468,12 +3469,12 @@ 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.17.3: - version "12.17.4" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" - integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== +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.12" + "@cypress/request" "^2.88.11" "@cypress/xvfb" "^1.2.4" "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" @@ -3508,7 +3509,6 @@ cypress@^12.17.3: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" - process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" semver "^7.5.3" @@ -8353,6 +8353,11 @@ ts-node@^10.0.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +ts-stubber@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ts-stubber/-/ts-stubber-1.0.1.tgz#7363ffd81118638e88e25db2068d4ea3839d7441" + integrity sha512-TnOCDvxg2w+TKgqwbPv5o188yjn6udE2XobtVldLjbOV/2VFOwJhyyug+9UZ4N0lSlijdoXs+j8lSuv5FKqXgA== + tsconfig-paths@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" diff --git a/examples/lit/pokemon-catalog/package.json b/examples/lit/pokemon-catalog/package.json index a6a658ac..e1a932f1 100644 --- a/examples/lit/pokemon-catalog/package.json +++ b/examples/lit/pokemon-catalog/package.json @@ -28,7 +28,7 @@ "@babel/core": "7.22.5", "@babel/preset-env": "7.22.5", "@cypress/code-coverage": "^3.12.1", - "@shellygo/cypress-test-utils": "^2.0.37", + "@shellygo/cypress-test-utils": "^2.0.52", "babel-loader": "9.1.2", "builder-pattern": "^2.2.0", "chance": "^1.1.11", diff --git a/examples/lit/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.ts b/examples/lit/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.ts index dc03745e..d1cba611 100644 --- a/examples/lit/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.ts +++ b/examples/lit/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.ts @@ -32,10 +32,11 @@ export class PokemonCatalogComponentDriver { onNext: () => {} }; - private pokemonServiceMock: Partial = { - getPokemon: url => Promise.reject(), - getPokemonByOffset: offset => Promise.reject() - }; + private pokemonServiceMock = this.helper.given.stubbedInstance(PokemonInternalService); + // { + // getPokemon: url => Promise.reject(), + // getPokemonByOffset: offset => Promise.reject() + // }; private pokemonImageDriver: PokemonImageComponentDriver = new PokemonImageComponentDriver(); beforeAndAfter = () => { @@ -46,15 +47,8 @@ export class PokemonCatalogComponentDriver { given = { image: this.pokemonImageDriver.given, pokemon: (value: PokemonList) => { - this.pokemonServiceMock.getPokemon = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemon!.name) - .returns(value); - - this.pokemonServiceMock.getPokemonByOffset = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemonByOffset!.name) - .returns(value); + this.pokemonServiceMock.getPokemon.returns(value); + this.pokemonServiceMock.getPokemonByOffset.returns(value); }, onNextSpy: (): Cypress.Agent> => (this.props.onNext = this.helper.given.spy("onNext")), onPrevSpy: (): Cypress.Agent> => (this.props.onPrev = this.helper.given.spy("onPrev")) diff --git a/examples/lit/pokemon-catalog/yarn.lock b/examples/lit/pokemon-catalog/yarn.lock index 95ef8f57..5e1a3da9 100644 --- a/examples/lit/pokemon-catalog/yarn.lock +++ b/examples/lit/pokemon-catalog/yarn.lock @@ -990,7 +990,7 @@ 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.12": +"@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== @@ -1418,19 +1418,20 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@shellygo/cypress-test-utils@^2.0.37": - version "2.0.37" - resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.37.tgz#5147ce0e7f3a6c83a0cb002ce2f0b823c91a4904" - integrity sha512-EkrI6laP7xmme1BpvEPvWx0BUgfg9eO83h6ztn8DLWsYKZUVHH6uKH60PweaBWE+GsIpUqEKx/vFPIYu7u/48g== +"@shellygo/cypress-test-utils@^2.0.52": + version "2.0.52" + resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.52.tgz#5c765d4840fb67d6478be1cad46da7f59a191ced" + integrity sha512-TtB0wv1Ms9fxHNYDPXL8ki8sPSrHNrDgEs5Fjtw4jqXdf2VXTfhU6cX1lNBhRHVKTzBL5Zx5zg2VNt+zGvq2vg== dependencies: "@cypress/mount-utils" "^4.0.0" "@types/chai-subset" "^1.3.3" chai-subset "^1.6.0" - cypress "^12.17.3" + cypress "12.17.3" cypress-pipe "^2.0.0" cypress-real-events "^1.7.6" cypress-wait-if-happens "^1.3.3" cypress-wait-until "^1.7.2" + ts-stubber "^1.0.1" "@sideway/address@^4.1.3": version "4.1.4" @@ -2771,12 +2772,12 @@ 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.17.3: - version "12.17.4" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" - integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== +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.12" + "@cypress/request" "^2.88.11" "@cypress/xvfb" "^1.2.4" "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" @@ -2811,7 +2812,6 @@ cypress@^12.17.3: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" - process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" semver "^7.5.3" @@ -6366,6 +6366,11 @@ transform-ast@^2.4.4: merge-source-map "1.0.4" nanobench "^2.1.1" +ts-stubber@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ts-stubber/-/ts-stubber-1.0.1.tgz#7363ffd81118638e88e25db2068d4ea3839d7441" + integrity sha512-TnOCDvxg2w+TKgqwbPv5o188yjn6udE2XobtVldLjbOV/2VFOwJhyyug+9UZ4N0lSlijdoXs+j8lSuv5FKqXgA== + tslib@^2.0.3, tslib@^2.1.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" diff --git a/examples/react/pokemon-catalog/package.json b/examples/react/pokemon-catalog/package.json index c37b5522..a1bd1193 100644 --- a/examples/react/pokemon-catalog/package.json +++ b/examples/react/pokemon-catalog/package.json @@ -53,7 +53,7 @@ "devDependencies": { "@cypress/code-coverage": "^3.12.4", "@cypress/instrument-cra": "^1.4.0", - "@shellygo/cypress-test-utils": "^2.0.37", + "@shellygo/cypress-test-utils": "^2.0.52", "@types/chance": "^1.1.5", "builder-pattern": "^2.2.0", "chance": "^1.1.11", diff --git a/examples/react/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.tsx b/examples/react/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.tsx index 74889d33..e91823ca 100644 --- a/examples/react/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.tsx +++ b/examples/react/pokemon-catalog/src/components/pokemon-catalog/pokemon-catalog.component.driver.tsx @@ -9,10 +9,7 @@ export class PokemonCatalogComponentDriver { private reactComponentHelper = new CypressReactComponentHelper(); private pokemonImageDriver: PokemonImageComponentDriver = new PokemonImageComponentDriver(); - private pokemonServiceMock: IPokemonService = { - getPokemon: url => Promise.reject(), - getPokemonByOffset: offset => Promise.reject() - }; + private pokemonServiceMock = this.helper.given.stubbedInterface("IPokemonService"); private props: IPokemonCatalogPros = { onNext: () => {}, @@ -30,15 +27,8 @@ export class PokemonCatalogComponentDriver { onNextSpy: () => (this.props.onNext = this.helper.given.spy("onNext")), onPrevSpy: () => (this.props.onPrev = this.helper.given.spy("onPrev")), pokemon: (value: PokemonList) => { - this.pokemonServiceMock.getPokemon = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemon!.name) - .returns(value); - - this.pokemonServiceMock.getPokemonByOffset = this.helper.given - .stub() - .as(this.pokemonServiceMock.getPokemonByOffset!.name) - .returns(value); + this.pokemonServiceMock.getPokemon.returns(value); + this.pokemonServiceMock.getPokemonByOffset.returns(value); } }; diff --git a/examples/react/pokemon-catalog/yarn.lock b/examples/react/pokemon-catalog/yarn.lock index 49459a8a..dee13c61 100644 --- a/examples/react/pokemon-catalog/yarn.lock +++ b/examples/react/pokemon-catalog/yarn.lock @@ -1292,7 +1292,7 @@ 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.12": +"@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== @@ -1776,19 +1776,20 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz#5f1b518ec5fa54437c0b7c4a821546c64fed6922" integrity sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA== -"@shellygo/cypress-test-utils@^2.0.37": - version "2.0.37" - resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.37.tgz#5147ce0e7f3a6c83a0cb002ce2f0b823c91a4904" - integrity sha512-EkrI6laP7xmme1BpvEPvWx0BUgfg9eO83h6ztn8DLWsYKZUVHH6uKH60PweaBWE+GsIpUqEKx/vFPIYu7u/48g== +"@shellygo/cypress-test-utils@^2.0.52": + version "2.0.52" + resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.52.tgz#5c765d4840fb67d6478be1cad46da7f59a191ced" + integrity sha512-TtB0wv1Ms9fxHNYDPXL8ki8sPSrHNrDgEs5Fjtw4jqXdf2VXTfhU6cX1lNBhRHVKTzBL5Zx5zg2VNt+zGvq2vg== dependencies: "@cypress/mount-utils" "^4.0.0" "@types/chai-subset" "^1.3.3" chai-subset "^1.6.0" - cypress "^12.17.3" + cypress "12.17.3" cypress-pipe "^2.0.0" cypress-real-events "^1.7.6" cypress-wait-if-happens "^1.3.3" cypress-wait-until "^1.7.2" + ts-stubber "^1.0.1" "@sideway/address@^4.1.3": version "4.1.4" @@ -3961,12 +3962,12 @@ 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.17.3: - version "12.17.4" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" - integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== +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.12" + "@cypress/request" "^2.88.11" "@cypress/xvfb" "^1.2.4" "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" @@ -4001,7 +4002,6 @@ cypress@^12.17.3: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" - process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" semver "^7.5.3" @@ -10048,6 +10048,11 @@ ts-loader@^9.5.0: semver "^7.3.4" source-map "^0.7.4" +ts-stubber@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ts-stubber/-/ts-stubber-1.0.1.tgz#7363ffd81118638e88e25db2068d4ea3839d7441" + integrity sha512-TnOCDvxg2w+TKgqwbPv5o188yjn6udE2XobtVldLjbOV/2VFOwJhyyug+9UZ4N0lSlijdoXs+j8lSuv5FKqXgA== + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" diff --git a/package.json b/package.json index 4993e407..41c5e83a 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "copy-build:react": "mkdir -p build/react && cp -r examples/react/pokemon-catalog/build/* build/react/", "copy-build:angular": "mkdir -p build/angular && cp -r examples/angular/pokemon-catalog/dist/pokemon-catalog/* build/angular/", "copy-build:examples": "mkdir -p build && npm run copy-build:react && npm run copy-build:angular && npm run copy-build:lit ", - "predeploy:examples": "npm run predeploy:react && npm run predeploy:angular && npm run predeploy:lit && cp examples/index.html build/ && cp examples/favicon.ico build/" , + "predeploy:examples": "npm run predeploy:react && npm run predeploy:angular && npm run predeploy:lit && cp examples/index.html build/ && cp examples/favicon.ico build/", "predeploy": "npm run predeploy:examples && npm run copy-build:examples", "deploy": "gh-pages -d build" }, "devDependencies": { - "@shellygo/cypress-test-utils": "^2.0.37", + "@shellygo/cypress-test-utils": "../cypress-test-utils/shellygo-cypress-test-utils-2.0.51.tgz", "concurrently": "^8.2.0", "gh-pages": "^5.0.0", "lit": "^2.7.4", diff --git a/yarn.lock b/yarn.lock index bb77cdac..7b11f795 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,7 +19,7 @@ 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.12": +"@cypress/request@2.88.12", "@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== @@ -63,6 +63,20 @@ dependencies: "@lit-labs/ssr-dom-shim" "^1.0.0" +"@shellygo/cypress-test-utils@../cypress-test-utils/shellygo-cypress-test-utils-2.0.51.tgz": + version "2.0.51" + resolved "../cypress-test-utils/shellygo-cypress-test-utils-2.0.51.tgz#19226037670794cb0ad54923f3a68439c3bf66df" + dependencies: + "@cypress/mount-utils" "^4.0.0" + "@types/chai-subset" "^1.3.3" + chai-subset "^1.6.0" + cypress "12.17.3" + cypress-pipe "^2.0.0" + cypress-real-events "^1.7.6" + cypress-wait-if-happens "^1.3.3" + cypress-wait-until "^1.7.2" + ts-stubber "^1.0.1" + "@shellygo/cypress-test-utils@^2.0.37": version "2.0.37" resolved "https://registry.yarnpkg.com/@shellygo/cypress-test-utils/-/cypress-test-utils-2.0.37.tgz#5147ce0e7f3a6c83a0cb002ce2f0b823c91a4904" @@ -440,6 +454,54 @@ 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.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.11" + "@cypress/xvfb" "^1.2.4" + "@types/node" "^16.18.39" + "@types/sinonjs__fake-timers" "8.1.1" + "@types/sizzle" "^2.3.2" + arch "^2.2.0" + blob-util "^2.0.2" + bluebird "^3.7.2" + buffer "^5.6.0" + cachedir "^2.3.0" + chalk "^4.1.0" + check-more-types "^2.24.0" + cli-cursor "^3.1.0" + cli-table3 "~0.6.1" + commander "^6.2.1" + common-tags "^1.8.0" + dayjs "^1.10.4" + debug "^4.3.4" + enquirer "^2.3.6" + eventemitter2 "6.4.7" + execa "4.1.0" + executable "^4.1.1" + extract-zip "2.0.1" + figures "^3.2.0" + fs-extra "^9.1.0" + getos "^3.2.1" + is-ci "^3.0.0" + is-installed-globally "~0.4.0" + lazy-ass "^1.6.0" + listr2 "^3.8.3" + lodash "^4.17.21" + log-symbols "^4.0.0" + minimist "^1.2.8" + ospath "^1.2.2" + pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" + request-progress "^3.0.0" + semver "^7.5.3" + supports-color "^8.1.1" + tmp "~0.2.1" + untildify "^4.0.0" + yauzl "^2.10.0" + cypress@^12.17.3: version "12.17.4" resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" @@ -1588,6 +1650,11 @@ trim-repeated@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +ts-stubber@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ts-stubber/-/ts-stubber-1.0.1.tgz#7363ffd81118638e88e25db2068d4ea3839d7441" + integrity sha512-TnOCDvxg2w+TKgqwbPv5o188yjn6udE2XobtVldLjbOV/2VFOwJhyyug+9UZ4N0lSlijdoXs+j8lSuv5FKqXgA== + tslib@^2.1.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"