update test instructions to use configured wallet RPC port

This commit is contained in:
premek 2021-11-15 18:13:28 +01:00 committed by woodser
parent edc0f04498
commit e0e800a472
2 changed files with 5 additions and 5 deletions

View File

@ -30,8 +30,8 @@ Running the [top-level API tests](./src/HavenoDaemon.test.tsx) is a great way to
4. In a new terminal, start an instance of monero-wallet-rpc at port 38084. This wallet will be automatically funded in order to fund Alice and Bob during the tests.<br>For example: `cd ~/git/haveno/.localnet/ && ./monero-wallet-rpc --daemon-address http://localhost:38081 --daemon-login superuser:abctesting123 --stagenet --rpc-bind-port 38084 --rpc-login rpc_user:abc123 --wallet-dir ./ --rpc-access-control-origins http://localhost:8080`
5. `cd haveno-ui-poc`
6. `npm install`
7. Modify test config as needed in [HavenoDaemon.test.ts](./src/HavenoDaemon.test.ts).<br>The tests need to know the port of Alice's wallet, which is printed to Alice's console. Currently the port needs to be manually copied to the test configuration.
8. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name.
7. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name.
## How to Update the Protobuf Client
@ -39,4 +39,4 @@ If the protobuf definitions in haveno-dex/haveno are updated, the typescript imp
1. Copy grpc.proto and pb.proto from Haveno's [protobuf definitions](https://github.com/haveno-dex/haveno/tree/master/proto/src/main/proto) to ./config.
2. Install protobuf for your system, e.g. on mac: `brew install protobuf`
3. `./bin/build_protobuf.sh`
3. `./bin/build_protobuf.sh`

View File

@ -29,7 +29,7 @@ const havenoVersion = "1.6.2";
const aliceDaemonUrl = "http://localhost:8080";
const aliceDaemonPassword = "apitest";
const alice: HavenoDaemon = new HavenoDaemon(aliceDaemonUrl, aliceDaemonPassword);
const aliceWalletUrl = "http://127.0.0.1:64840"; // alice's internal haveno wallet for direct testing // TODO (woodser): make configurable rather than randomly generated
const aliceWalletUrl = "http://127.0.0.1:38091"; // alice's internal haveno wallet for direct testing
const aliceWalletUsername = "rpc_user";
const aliceWalletPassword = "abc123";
let aliceWallet: any;
@ -532,4 +532,4 @@ function testCryptoPaymentAccount(paymentAccount: PaymentAccount) {
function testOffer(offer: OfferInfo) {
expect(offer.getId().length).toBeGreaterThan(0);
// TODO: test rest of offer
}
}