@cardano-sdk/e2e 0.55.25 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cardano-sdk/e2e",
3
- "version": "0.55.25",
3
+ "version": "0.56.0",
4
4
  "description": "End to end tests for the cardano-js-sdk packages.",
5
5
  "repository": "https://github.com/input-output-hk/cardano-js-sdk",
6
6
  "license": "Apache-2.0",
@@ -76,20 +76,20 @@
76
76
  "dependencies": {
77
77
  "@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.4",
78
78
  "@cardano-ogmios/client": "6.9.0",
79
- "@cardano-sdk/cardano-services": "~0.35.36",
80
- "@cardano-sdk/cardano-services-client": "~0.26.34",
81
- "@cardano-sdk/core": "~0.46.14",
82
- "@cardano-sdk/crypto": "~0.4.6",
83
- "@cardano-sdk/hardware-ledger": "~0.16.25",
84
- "@cardano-sdk/hardware-trezor": "~0.7.35",
85
- "@cardano-sdk/input-selection": "~0.14.31",
86
- "@cardano-sdk/key-management": "~0.29.15",
87
- "@cardano-sdk/ogmios": "~0.18.56",
88
- "@cardano-sdk/tx-construction": "~0.28.13",
89
- "@cardano-sdk/util": "~0.17.1",
90
- "@cardano-sdk/util-dev": "~0.25.34",
91
- "@cardano-sdk/util-rxjs": "~0.9.33",
92
- "@cardano-sdk/wallet": "~0.54.6",
79
+ "@cardano-sdk/cardano-services": "~0.35.39",
80
+ "@cardano-sdk/cardano-services-client": "~0.26.37",
81
+ "@cardano-sdk/core": "~0.47.0",
82
+ "@cardano-sdk/crypto": "~0.4.7",
83
+ "@cardano-sdk/hardware-ledger": "~0.16.28",
84
+ "@cardano-sdk/hardware-trezor": "~0.7.38",
85
+ "@cardano-sdk/input-selection": "~0.14.34",
86
+ "@cardano-sdk/key-management": "~0.29.18",
87
+ "@cardano-sdk/ogmios": "~0.18.59",
88
+ "@cardano-sdk/tx-construction": "~0.29.0",
89
+ "@cardano-sdk/util": "~0.17.2",
90
+ "@cardano-sdk/util-dev": "~0.25.37",
91
+ "@cardano-sdk/util-rxjs": "~0.9.36",
92
+ "@cardano-sdk/wallet": "~0.55.0",
93
93
  "@dcspark/cardano-multiplatform-lib-nodejs": "^3.1.1",
94
94
  "@emurgo/cardano-message-signing-nodejs": "^1.0.1",
95
95
  "@shiroyasha9/axios-fetch-adapter": "1.0.3",
@@ -112,7 +112,7 @@
112
112
  "ts-log": "^2.2.4",
113
113
  "ts-node": "^10.8.1",
114
114
  "ts-stopwatch": "0.0.4",
115
- "uuid": "^8.3.2",
115
+ "uuid": "^11.1.1",
116
116
  "webextension-polyfill": "^0.8.0",
117
117
  "ws": "^8.5.0"
118
118
  },
@@ -120,10 +120,10 @@
120
120
  "@babel/core": "^7.18.2",
121
121
  "@babel/preset-env": "^7.18.2",
122
122
  "@babel/preset-typescript": "^7.17.12",
123
- "@cardano-sdk/dapp-connector": "~0.13.28",
124
- "@cardano-sdk/projection": "~0.13.17",
125
- "@cardano-sdk/projection-typeorm": "~0.10.17",
126
- "@cardano-sdk/web-extension": "~0.39.42",
123
+ "@cardano-sdk/dapp-connector": "~0.13.30",
124
+ "@cardano-sdk/projection": "~0.13.20",
125
+ "@cardano-sdk/projection-typeorm": "~0.10.20",
126
+ "@cardano-sdk/web-extension": "~0.39.45",
127
127
  "@dcspark/cardano-multiplatform-lib-browser": "^3.1.1",
128
128
  "@emurgo/cardano-message-signing-asmjs": "^1.0.1",
129
129
  "@types/bunyan": "^1.8.8",
@@ -135,32 +135,29 @@
135
135
  "@types/k6": "^0.53.1",
136
136
  "@types/lodash": "^4.14.182",
137
137
  "@types/ora": "^3.2.0",
138
- "@types/uuid": "^8.3.4",
139
138
  "@types/webextension-polyfill": "^0.8.0",
140
- "@wdio/cli": "^7.19.5",
141
- "@wdio/local-runner": "^7.19.5",
142
- "@wdio/mocha-framework": "^7.19.5",
143
- "@wdio/spec-reporter": "^7.19.5",
144
- "@wdio/static-server-service": "^7.19.5",
145
- "artillery": "^2.0.0-35",
139
+ "@wdio/cli": "^9.29.0",
140
+ "@wdio/local-runner": "^9.29.0",
141
+ "@wdio/mocha-framework": "^9.29.0",
142
+ "@wdio/spec-reporter": "^9.29.0",
143
+ "@wdio/static-server-service": "^9.29.0",
144
+ "artillery": "^2.0.33",
146
145
  "axios-mock-adapter": "^2.0.0",
147
146
  "babel-loader": "^8.2.5",
148
147
  "blake2b-no-wasm": "2.1.4",
149
148
  "buffer": "^6.0.3",
150
- "chromedriver": "^127.0.0",
151
149
  "copy-webpack-plugin": "^10.2.4",
152
150
  "crypto-browserify": "^3.12.0",
153
151
  "delay": "^5.0.0",
154
- "dockerode": "^3.3.1",
152
+ "dockerode": "^4.0.7",
155
153
  "dockerode-utils": "^0.0.7",
156
154
  "eslint": "^7.32.0",
157
155
  "events": "^3.3.0",
158
- "expect-webdriverio": "^3.2.1",
156
+ "expect-webdriverio": "^5.6.8",
159
157
  "jest": "^28.1.3",
160
158
  "jest-webextension-mock": "^3.7.22",
161
159
  "json-bigint": "^1.0.0",
162
160
  "madge": "^5.0.1",
163
- "mock-browser": "^0.92.14",
164
161
  "npm-run-all": "^4.1.5",
165
162
  "null-loader": "^4.0.1",
166
163
  "readable-stream": "^3.6.0",
@@ -170,19 +167,19 @@
170
167
  "typeorm": "^0.3.15",
171
168
  "typeorm-extension": "^2.7.0",
172
169
  "typescript": "^4.7.4",
170
+ "url": "^0.11.4",
173
171
  "util": "^0.12.4",
174
- "wdio-chromedriver-service": "^7.3.2",
175
172
  "webassembly-loader-sw": "^1.1.0",
176
- "webdriverio": "^7.20.5",
173
+ "webdriverio": "^9.29.0",
177
174
  "webpack": "^5.72.0",
178
175
  "webpack-cli": "^4.9.2",
179
176
  "webpack-merge": "^5.8.0"
180
177
  },
181
178
  "engines": {
182
- "node": ">=16.20.2"
179
+ "node": ">=22"
183
180
  },
184
181
  "publishConfig": {
185
182
  "access": "public"
186
183
  },
187
- "gitHead": "8788405df909bf761664ed85d2666f5153cd0a36"
184
+ "gitHead": "8fb86af308d2045d71b0c18d78abaf0336902983"
188
185
  }
@@ -102,7 +102,10 @@ export class MeasurementUtil<T extends string> {
102
102
 
103
103
  for (const measureEntry of performance
104
104
  .getEntriesByType('measure')
105
- .map(({ duration, detail }) => ({ duration, target: (detail as MarkerDetail<T>).target }))
105
+ .map((entry) => ({
106
+ duration: entry.duration,
107
+ target: (entry as unknown as { detail: MarkerDetail<T> }).detail.target
108
+ }))
106
109
  .filter(({ target }) => targets?.some((t) => t === target))) {
107
110
  const data = measurementData[measureEntry.target];
108
111
  if (!data.time) {
@@ -125,8 +128,8 @@ export class MeasurementUtil<T extends string> {
125
128
  // Count all the start markers. They all have the 'target' detail added. Stop markers don't have it
126
129
  for (const targetName of performance
127
130
  .getEntriesByType('mark')
128
- .map(({ detail }) => (detail as MarkerDetail<T>)?.target)
129
- .filter((target) => target && targets?.some((t) => t === target))) {
131
+ .map((entry) => (entry as unknown as { detail?: MarkerDetail<T> }).detail?.target)
132
+ .filter((target): target is T => !!target && !!targets?.some((t) => t === target))) {
130
133
  measurementData[targetName].calls_count++;
131
134
  }
132
135
 
@@ -19,7 +19,7 @@ jest.mock('perf_hooks', () => ({
19
19
  type measureTargets = 't1' | 't2';
20
20
  describe('MeasurementUtil', () => {
21
21
  let measurementUtil: MeasurementUtil<measureTargets>;
22
- let mockData: Partial<PerformanceEntry>[];
22
+ let mockData: (Partial<PerformanceEntry> & { detail: { id: number; target: string } })[];
23
23
 
24
24
  beforeEach(() => {
25
25
  measurementUtil = new MeasurementUtil<measureTargets>();
@@ -135,7 +135,6 @@ describe('PersonalWallet/phase2validation', () => {
135
135
 
136
136
  const unsignedTx = await wallet.initializeTx(txProps);
137
137
  const finalizeProps: FinalizeTxProps = {
138
- isValid: false,
139
138
  tx: unsignedTx,
140
139
  witness: { redeemers: [scriptRedeemer], scripts: [alwaysFailScript] }
141
140
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as Crypto from '@cardano-sdk/crypto';
4
4
  import { BaseWallet } from '@cardano-sdk/wallet';
5
- import { Cardano, StakePoolProvider, setInConwayEra } from '@cardano-sdk/core';
5
+ import { Cardano, StakePoolProvider } from '@cardano-sdk/core';
6
6
  import { logger } from '@cardano-sdk/util-dev';
7
7
 
8
8
  import { firstValueFrom, map } from 'rxjs';
@@ -232,9 +232,6 @@ describe('PersonalWallet/conwayTransactions', () => {
232
232
  };
233
233
 
234
234
  beforeAll(async () => {
235
- // TODO: remove once mainnet hardforks to conway-era, and this becomes "the norm"
236
- setInConwayEra(true);
237
-
238
235
  [
239
236
  {
240
237
  wallet,
@@ -262,9 +259,6 @@ describe('PersonalWallet/conwayTransactions', () => {
262
259
 
263
260
  wallet.shutdown();
264
261
  dRepWallet.shutdown();
265
-
266
- // TODO: remove once mainnet hardforks to conway-era, and this becomes "the norm"
267
- setInConwayEra(false);
268
262
  });
269
263
 
270
264
  it('can register a stake key and delegate stake using a combo certificate', async () => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as Crypto from '@cardano-sdk/crypto';
4
4
  import { BaseWallet } from '@cardano-sdk/wallet';
5
- import { Cardano, StakePoolProvider, setInConwayEra } from '@cardano-sdk/core';
5
+ import { Cardano, StakePoolProvider } from '@cardano-sdk/core';
6
6
  import { logger } from '@cardano-sdk/util-dev';
7
7
 
8
8
  import { filter, firstValueFrom, map } from 'rxjs';
@@ -151,9 +151,6 @@ describe('PersonalWallet/drepRetirement', () => {
151
151
  };
152
152
 
153
153
  beforeAll(async () => {
154
- // TODO: remove once mainnet hardforks to conway-era, and this becomes "the norm"
155
- setInConwayEra(true);
156
-
157
154
  [
158
155
  {
159
156
  wallet: delegatingWallet,
@@ -204,9 +201,6 @@ describe('PersonalWallet/drepRetirement', () => {
204
201
  delegatingWallet.shutdown();
205
202
  dRepWallet1.shutdown();
206
203
  dRepWallet2.shutdown();
207
-
208
- // TODO: remove once mainnet hardforks to conway-era, and this becomes "the norm"
209
- setInConwayEra(false);
210
204
  });
211
205
 
212
206
  it('emits drepDelegatees after delegating voting power', async () => {
@@ -24,7 +24,7 @@ describe('dapp/cip30', () => {
24
24
  });
25
25
 
26
26
  it('dapp should detect test wallet', async () => {
27
- await expect($(pWalletFound)).toHaveTextContaining('true');
27
+ await expect($(pWalletFound)).toHaveText('true', { containing: true });
28
28
  });
29
29
 
30
30
  describe('dapp can use cip30 wallet api', () => {
@@ -50,14 +50,14 @@ describe('dapp/cip30', () => {
50
50
  });
51
51
 
52
52
  it('dapp gets correct addresses from cip30 wallet api', async () => {
53
- await expect($(dappChangeAddress)).toHaveTextContaining(walletAddr);
54
- await expect($(dappStakeAddress)).toHaveTextContaining(walletStakeAddr);
55
- await expect($(dappUsedAddress)).toHaveTextContaining(walletAddr);
53
+ await expect($(dappChangeAddress)).toHaveText(walletAddr, { containing: true });
54
+ await expect($(dappStakeAddress)).toHaveText(walletStakeAddr, { containing: true });
55
+ await expect($(dappUsedAddress)).toHaveText(walletAddr, { containing: true });
56
56
  });
57
57
 
58
58
  it('dapp can build and send a transaction using cip30 WalletApi', async () => {
59
59
  await $(dappBtnRun).click();
60
- await expect($(dappSubmittedTxConfirmation)).toHaveTextContaining('check your wallet');
60
+ await expect($(dappSubmittedTxConfirmation)).toHaveText('check your wallet', { containing: true });
61
61
  });
62
62
  });
63
63
  });
@@ -42,7 +42,7 @@ describe('dapp/cip95', () => {
42
42
  });
43
43
 
44
44
  it('dapp should detect test wallet', async () => {
45
- await expect($(pWalletFound)).toHaveTextContaining('true');
45
+ await expect($(pWalletFound)).toHaveText('true', { containing: true });
46
46
  });
47
47
 
48
48
  describe('dapp can use cip95 wallet api', () => {
@@ -68,9 +68,9 @@ describe('dapp/cip95', () => {
68
68
  });
69
69
 
70
70
  it('dapp gets correct addresses from cip95 wallet api', async () => {
71
- await expect($(dappChangeAddress)).toHaveTextContaining(walletAddr);
72
- await expect($(dappStakeAddress)).toHaveTextContaining(walletStakeAddr);
73
- await expect($(dappUsedAddress)).toHaveTextContaining(walletAddr);
71
+ await expect($(dappChangeAddress)).toHaveText(walletAddr, { containing: true });
72
+ await expect($(dappStakeAddress)).toHaveText(walletStakeAddr, { containing: true });
73
+ await expect($(dappUsedAddress)).toHaveText(walletAddr, { containing: true });
74
74
  });
75
75
 
76
76
  it('getRegisteredPubStakeKeys gets active public stake keys from cip95 wallet api', async () => {
@@ -81,12 +81,12 @@ describe('dapp/cip95', () => {
81
81
  it('getPubDRepKey gets the DRep key from cip95 wallet api', async () => {
82
82
  const dappDrepKey = await $(dappGetPubDrepKey).getText();
83
83
  expect(dappDrepKey.length).toBeGreaterThan(0);
84
- await expect($(dappDrepId)).toHaveTextContaining('drep');
84
+ await expect($(dappDrepId)).toHaveText('drep', { containing: true });
85
85
  });
86
86
 
87
87
  it('supportedExtensions and getExtensions both return cip95', async () => {
88
- await expect($(liSupportedExtensions)).toHaveTextContaining('95');
89
- await expect($(liGetExtensions)).toHaveTextContaining('95');
88
+ await expect($(liSupportedExtensions)).toHaveText('95', { containing: true });
89
+ await expect($(liGetExtensions)).toHaveText('95', { containing: true });
90
90
  });
91
91
  });
92
92
  });
@@ -76,8 +76,8 @@ describe('wallet', () => {
76
76
  });
77
77
  walletAddr1 = await $(spanAddress).getText();
78
78
  walletStakeAddr1 = await $(spanStakeAddress).getText();
79
- expect(walletAddr1).toHaveTextContaining('addr');
80
- expect(walletStakeAddr1).toHaveTextContaining('stake');
79
+ expect(walletAddr1).toContain('addr');
80
+ expect(walletStakeAddr1).toContain('stake');
81
81
  await expect($(activeWalletName)).toHaveText(getObservableWalletName(0));
82
82
  });
83
83
  });
@@ -102,14 +102,14 @@ describe('wallet', () => {
102
102
 
103
103
  // Delegation transaction was submitted successfully
104
104
  const txId = await $('#multiDelegation .delegateTxId').getText();
105
- expect(txId).toHaveTextContaining('TxId');
105
+ expect(txId).toContain('TxId');
106
106
 
107
107
  // Wallet reports delegating to 3 pools
108
108
  await browser.waitUntil(
109
109
  async () => {
110
110
  try {
111
- const delegatedPools = await $$(liPools);
112
- return delegatedPools.length === NUM_POOLS;
111
+ const delegatedPoolCount = await $$(liPools).length;
112
+ return delegatedPoolCount === NUM_POOLS;
113
113
  } catch {
114
114
  return false;
115
115
  }
@@ -125,8 +125,8 @@ describe('wallet', () => {
125
125
  it('can switch to another wallet', async () => {
126
126
  // Automatically deactivates first wallet, but keeps the store available for future activation
127
127
  await $(btnActivateWallet2).click();
128
- await expect($(spanAddress)).not.toHaveTextContaining(walletAddr1);
129
- await expect($(spanAddress)).toHaveTextContaining('addr');
128
+ await expect($(spanAddress)).not.toHaveText(walletAddr1, { containing: true });
129
+ await expect($(spanAddress)).toHaveText('addr', { containing: true });
130
130
  await expect($(activeWalletName)).toHaveText(getObservableWalletName(1));
131
131
  });
132
132
 
@@ -138,10 +138,10 @@ describe('wallet', () => {
138
138
  it('can destroy second wallet before switching back to the first wallet', async () => {
139
139
  // Destroy also clears associated store. Store will be rebuilt during future activation of same wallet
140
140
  await $(destroyWallet).click();
141
- await expect($(spanAddress)).toHaveTextContaining('-');
141
+ await expect($(spanAddress)).toHaveText('-', { containing: true });
142
142
 
143
143
  await $(btnActivateWallet1).click();
144
- await expect($(spanAddress)).toHaveTextContaining(walletAddr1);
144
+ await expect($(spanAddress)).toHaveText(walletAddr1, { containing: true });
145
145
  await expect($(activeWalletName)).toHaveText(getObservableWalletName(0));
146
146
  });
147
147
 
@@ -4,7 +4,7 @@
4
4
  "baseUrl": "./extension",
5
5
  "types": [
6
6
  "node",
7
- "webdriverio/async",
7
+ "@wdio/globals/types",
8
8
  "@wdio/mocha-framework",
9
9
  "expect-webdriverio"
10
10
  ]
@@ -2,13 +2,6 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  config: {
5
- autoCompileOpts: {
6
- autoCompile: true,
7
- tsNodeOpts: {
8
- project: 'test/web-extension/tsconfig.json',
9
- transpileOnly: true
10
- }
11
- },
12
5
  bail: 0,
13
6
  baseUrl: 'http://localhost:4567',
14
7
  capabilities: [
@@ -51,10 +44,11 @@ module.exports = {
51
44
  { mount: '/cip95-cardano-wallet-connector', path: path.join(__dirname, 'dapp-cip95/build') }
52
45
  ]
53
46
  }
54
- ],
55
- 'chromedriver'
47
+ ]
56
48
  ],
57
49
  specs: ['./**/*.spec.ts'],
50
+ // WebdriverIO v8+ auto-compiles TS via tsx; point it at the local tsconfig
51
+ tsConfigPath: path.join(__dirname, 'tsconfig.json'),
58
52
  waitforTimeout: 10_000
59
53
  }
60
54
  };
@@ -88,6 +88,7 @@ module.exports = {
88
88
  perf_hooks: false,
89
89
  process: false,
90
90
  stream: require.resolve('readable-stream'),
91
+ url: require.resolve('url/'),
91
92
  util: require.resolve('util/')
92
93
  }
93
94
  },