You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -106,6 +107,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
106
107
-`Provider` (previously called `QueryHandle`) is extracted to its own package [purescript-cardano-provider](https://github.com/mlabs-haskell/purescript-cardano-provider) using module names in the format `Cardano.Provider.*` ([#1671](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1671))
107
108
- Switched from WebSocket to HTTP when interfacing with Ogmios. Note: Mempool functionality still uses WebSocket, as it requires a persistent connection to track state. ([#1575](https://github.com/Plutonomicon/cardano-transaction-lib/issues/1575))
108
109
- Blockfrost Provider has been extracted to a separate package [purescript-cardano-blockfrost-provider](https://github.com/mlabs-haskell/purescript-cardano-blockfrost-provider) using module names in the format `Cardano.Blockfrost.*` ([#1661](https://github.com/Plutonomicon/cardano-transaction-lib/issues/1661))
110
+
- Made adjustments to the [E2E testing documentation page](./doc/e2e-testing.md). Updated the [template](./templates/ctl-scaffold) to use the newly introduced `e2eConfigs` helper function that allows to define E2E configurations without unnecessary boilerplate. ([#1674](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1674))
111
+
112
+
### Removed
113
+
114
+
- References to the discontinued Nami and Flint wallets ([#1674](https://github.com/Plutonomicon/cardano-transaction-lib/pull/1674))
Copy file name to clipboardExpand all lines: doc/e2e-testing.md
+95-35Lines changed: 95 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ For purposes of testing, there are two parts to using a wallet: providing the ri
65
65
### Where to Find the Installed Extensions
66
66
67
67
1. Locate your browser profile directory. Commonly used locations include: `~/.config/{google-chrome,chromium}/Default` (where `Default` is the profile name), `~/snap/chromium/common/chromium/Default`.
68
-
2. Make sure that inside the profile, your desired extension is unpacked. Nami should be in `Extensions/lpfcbjknijpeeillifnkikgncikgfhdo`, Gero (testnet version) in `Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc`.
68
+
2. Make sure that inside the profile, your desired extension is unpacked. Gero (testnet version) should be in `Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc`.
69
69
3. Add the version as a subdirectory, too. The final path may look like `/home/user/.config/google-chrome/Default/Extensions/iifeegfcfhlhhnilhfoeihllenamcfgc/1.10.9_0`
70
70
71
71
### How to Use a Different User Wallet
@@ -125,14 +125,6 @@ The tests can set up using CLI arguments, environment variables, or both. CLI ar
125
125
| Lode CRX URL |`--lode-crx-url`|`LODE_CRX_URL`|
126
126
| Lode password |`--lode-password`|`LODE_PASSWORD`|
, "eternl-mock" /\ testnetConfig' Eternl /\ Just Eternl
269
+
, "gero-mock" /\ testnetConfig' Gero /\ Just Gero
270
+
, "lode-mock" /\ testnetConfig' Lode /\ Just Lode
271
+
, "localnet-eternl-mock" /\ testnetConfig' Eternl /\ Just Eternl
272
+
, "localnet-gero-mock" /\ testnetConfig' Gero /\ Just Gero
273
+
, "localnet-lode-mock" /\ testnetConfig' Lode /\ Just Lode
274
+
]
275
+
where
276
+
testnetConfig' :: KnownWallet -> ContractParams
277
+
testnetConfig' wallet =
278
+
testnetConfig
279
+
{ walletSpec =
280
+
Just $ ConnectToGenericCip30 (walletName wallet) { cip95: false }
281
+
}
282
+
283
+
tests :: Map E2ETestName (Contract Unit)
284
+
tests = Map.fromFoldable
285
+
[ "Contract" /\ Scaffold.contract
286
+
-- Add more `Contract`s here
243
287
]
244
288
245
289
tests :: Map E2ETestName (Contract Unit)
@@ -253,11 +297,11 @@ Now, the `Scaffold.contract` can be used as a test:
253
297
254
298
```bash
255
299
E2E_TESTS="
256
-
nami:http://localhost:4008/?nami:Contract
300
+
eternl:http://localhost:4008/?eternl:Contract
257
301
"
258
302
```
259
303
260
-
The `nami:` prefix specifies which browser extension to load for the test, and the query parameter is for the router to be able to find the appropriate config.
304
+
The `eternl:` prefix specifies which browser extension to load for the test, and the query parameter is for the router to be able to find the appropriate config.
261
305
262
306
Refer to the docs for `Contract.Test.E2E.route` function for an overview of the URL structure.
263
307
@@ -286,39 +330,55 @@ As a result, you will get json files that look like this:
286
330
Simply copy the `cborHex` from payment and stake signing keys (the order is important), and add them to the URL, separating by `:`:
The `nami:` prefix should not be specified, otherwise CTL will refuse to overwrite the existing wallet with a mock.
336
+
The `eternl:` prefix should not be specified, otherwise CTL will refuse to overwrite the existing wallet with a mock.
293
337
294
338
In order to use the keys, their corresponding address must be pre-funded using the [faucet](https://docs.cardano.org/cardano-testnet/tools/faucet) (beware of IP-based rate-limiting) or from another wallet. Most contracts require at least two UTxOs to run (one will be used as collateral), so it's best to make two transactions.
295
339
296
340
### Using CIP-30 mock with Cardano Testnet
297
341
298
342
It's possible to run headless browser tests on top of a Cardano Testnet cluster.
299
343
300
-
To do that, it's enough to define a config name that:
301
-
302
-
- uses a `ContractParams` value with `networkId` set to `MainnetId`.
303
-
- Specifies a wallet mock (e.g. `MockNami`)
344
+
To do that, it's enough to define a config that specifies a wallet mock.
345
+
For `e2eConfigs`, the name config must include the `-mock` suffix.
0 commit comments