From 47913b45e2e321d716bbc75922c52adf145c48eb Mon Sep 17 00:00:00 2001 From: Darren Kelly Date: Wed, 5 Jun 2024 10:56:27 +0100 Subject: [PATCH] fix: e2e tests --- examples/sample-angular-app/package.json | 2 +- .../src/app/app.component.ts | 6 +- examples/sample-next-app/package.json | 2 +- examples/sample-next-app/src/app/layout.tsx | 1 - examples/sample-react-app/package.json | 2 +- ....timestamp-1717581106765-94da019aa2702.mjs | 40 ++ examples/sample-remix-app/package.json | 2 +- examples/sample-svelte-app/package.json | 2 +- examples/sample-svelte-app/src/lib/index.ts | 1 - examples/sample-vanilla-app/package.json | 2 +- examples/sample-vanilla-app/src/main.ts | 1 - examples/sample-vue-app/package.json | 2 +- examples/sample-vue-app/src/App.vue | 5 +- package.json | 4 +- packages/dapp-kit-ui/README.md | 6 +- packages/dapp-kit-ui/index.js | 1 - tests/e2e/package.json | 2 +- tests/e2e/src/config/hooks/ContainerHooks.ts | 6 +- tests/e2e/src/extension/selenium/WebDriver.ts | 50 +-- .../utils/AddressUtils/AddressUtils.ts | 6 +- yarn.lock | 344 +++++++++--------- 21 files changed, 252 insertions(+), 235 deletions(-) create mode 100644 examples/sample-react-app/vite.config.ts.timestamp-1717581106765-94da019aa2702.mjs diff --git a/examples/sample-angular-app/package.json b/examples/sample-angular-app/package.json index de6368ce..9ce206eb 100644 --- a/examples/sample-angular-app/package.json +++ b/examples/sample-angular-app/package.json @@ -58,6 +58,6 @@ "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", - "typescript": "~4.9.5" + "typescript": "5.1.6" } } diff --git a/examples/sample-angular-app/src/app/app.component.ts b/examples/sample-angular-app/src/app/app.component.ts index eb2cca39..301b597f 100644 --- a/examples/sample-angular-app/src/app/app.component.ts +++ b/examples/sample-angular-app/src/app/app.component.ts @@ -1,6 +1,7 @@ // Angular modules -import { CUSTOM_ELEMENTS_SCHEMA, Component, type OnInit } from '@angular/core'; -import { DAppKitUI, DAppKitUIOptions } from '@vechain/dapp-kit-ui'; +import { Component, CUSTOM_ELEMENTS_SCHEMA, type OnInit } from '@angular/core'; +import type { DAppKitUIOptions } from '@vechain/dapp-kit-ui'; +import { DAppKitUI } from '@vechain/dapp-kit-ui'; @Component({ selector: 'app-root', @@ -26,7 +27,6 @@ export class AppComponent implements OnInit { const vechainDAppKitOptions: DAppKitUIOptions = { nodeUrl: 'https://testnet.vechain.org/', - genesis: 'test', walletConnectOptions, usePersistence: true, }; diff --git a/examples/sample-next-app/package.json b/examples/sample-next-app/package.json index 7b24aaa0..c481f5b9 100644 --- a/examples/sample-next-app/package.json +++ b/examples/sample-next-app/package.json @@ -25,6 +25,6 @@ "@types/react-dom": "^18", "eslint": "^8", "eslint-config-next": "14.1.4", - "typescript": "5.3.3" + "typescript": "5.1.6" } } diff --git a/examples/sample-next-app/src/app/layout.tsx b/examples/sample-next-app/src/app/layout.tsx index 0bb83fd2..da9a331f 100644 --- a/examples/sample-next-app/src/app/layout.tsx +++ b/examples/sample-next-app/src/app/layout.tsx @@ -46,7 +46,6 @@ export default function RootLayout({ { + return { + plugins: [nodePolyfills(), react()], + build: { + commonjsOptions: { + transformMixedEsModules: true + } + }, + preview: { + port: 5001, + strictPort: true + }, + server: { + port: 5001, + strictPort: true, + host: true, + origin: "http://0.0.0.0:5001" + }, + //vitest + test: { + globals: true, + environment: "jsdom", + setupFiles: [ + resolve(__vite_injected_original_dirname, "test/setup/setup.ts"), + resolve(__vite_injected_original_dirname, "test/setup/resizeObserverMock.ts") + ] + }, + base: mode === "production" ? "/vechain-dapp-kit/react/" : "/" + }; +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZGFycmVuL3dvcmtzc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FBQ2IseUJBQXlCO0FBQUEsTUFDN0I7QUFBQSxJQUNKO0FBQUEsSUFDQSxTQUFTO0FBQUEsTUFDTCxNQUFNO0FBQUEsTUFDTixZQUFZO0FBQUEsSUFDaEI7QUFBQSxJQUNBLFFBQVE7QUFBQSxNQUNKLE1BQU07QUFBQSxNQUNOLFlBQVk7QUFBQSxNQUNaLE1BQU07QUFBQSxNQUNOLFFBQVE7QUFBQSxJQUNaO0FBQUE7QUFBQSxJQUVBLE1BQU07QUFBQSxNQUNGLFNBQVM7QUFBQSxNQUNULGFBQWE7QUFBQSxNQUNiLFlBQVk7QUFBQSxRQUNSLFFBQVEsa0NBQVcscUJBQXFCO0FBQUEsUUFDeEMsUUFBUSxrQ0FBVyxrQ0FBa0M7QUFBQSxNQUN6RDtBQUFBLElBQ0o7QUFBQSxJQUNBLE1BQU0sU0FBUyxlQUFlLDZCQUE2QjtBQUFBLEVBQy9EO0FBQ0osQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K diff --git a/examples/sample-remix-app/package.json b/examples/sample-remix-app/package.json index 376a0b24..670ea0fa 100644 --- a/examples/sample-remix-app/package.json +++ b/examples/sample-remix-app/package.json @@ -35,7 +35,7 @@ "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "typescript": "^5.1.6", + "typescript": "5.1.6", "vite": "^5.1.0", "vite-plugin-node-polyfills": "^0.21.0", "vite-tsconfig-paths": "^4.2.1" diff --git a/examples/sample-svelte-app/package.json b/examples/sample-svelte-app/package.json index a5634b88..f57c1ca5 100644 --- a/examples/sample-svelte-app/package.json +++ b/examples/sample-svelte-app/package.json @@ -32,7 +32,7 @@ "svelte": "^4.0.5", "svelte-check": "^3.6.0", "tslib": "^2.4.1", - "typescript": "^5.0.0", + "typescript": "5.1.6", "vite": "^4.5.2", "vite-plugin-node-polyfills": "^0.16.0" } diff --git a/examples/sample-svelte-app/src/lib/index.ts b/examples/sample-svelte-app/src/lib/index.ts index 98f9f3dd..2b5be2d2 100644 --- a/examples/sample-svelte-app/src/lib/index.ts +++ b/examples/sample-svelte-app/src/lib/index.ts @@ -12,7 +12,6 @@ const walletConnectOptions = { const vechainDAppKitOptions = { nodeUrl: 'https://testnet.vechain.org/', - genesis: 'test', walletConnectOptions, usePersistence: true, }; diff --git a/examples/sample-vanilla-app/package.json b/examples/sample-vanilla-app/package.json index 76645e6a..040f1a8f 100644 --- a/examples/sample-vanilla-app/package.json +++ b/examples/sample-vanilla-app/package.json @@ -15,7 +15,7 @@ "@vechain/dapp-kit-ui": "*" }, "devDependencies": { - "typescript": "^5.2.2", + "typescript": "5.1.6", "vite": "^5.2.0" } } diff --git a/examples/sample-vanilla-app/src/main.ts b/examples/sample-vanilla-app/src/main.ts index 3a702de8..f07ba008 100644 --- a/examples/sample-vanilla-app/src/main.ts +++ b/examples/sample-vanilla-app/src/main.ts @@ -22,7 +22,6 @@ const walletConnectOptions = { const vechainDAppKitOptions = { nodeUrl: 'https://testnet.vechain.org/', - genesis: 'test', walletConnectOptions, usePersistence: true, }; diff --git a/examples/sample-vue-app/package.json b/examples/sample-vue-app/package.json index add05caf..d0232f2c 100644 --- a/examples/sample-vue-app/package.json +++ b/examples/sample-vue-app/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", - "typescript": "^5.2.2", + "typescript": "5.1.6", "vite": "^5.0.12", "vite-plugin-node-polyfills": "^0.17.0", "vue-tsc": "^2.0.6" diff --git a/examples/sample-vue-app/src/App.vue b/examples/sample-vue-app/src/App.vue index 4a0847f4..183f3bdf 100644 --- a/examples/sample-vue-app/src/App.vue +++ b/examples/sample-vue-app/src/App.vue @@ -13,7 +13,6 @@