mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2024-10-01 01:35:42 -04:00
update test instructions to use configured wallet RPC port
This commit is contained in:
parent
edc0f04498
commit
e0e800a472
@ -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`
|
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`
|
5. `cd haveno-ui-poc`
|
||||||
6. `npm install`
|
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.
|
7. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name.
|
||||||
8. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name.
|
|
||||||
|
|
||||||
## How to Update the Protobuf Client
|
## 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.
|
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`
|
2. Install protobuf for your system, e.g. on mac: `brew install protobuf`
|
||||||
3. `./bin/build_protobuf.sh`
|
3. `./bin/build_protobuf.sh`
|
||||||
|
@ -29,7 +29,7 @@ const havenoVersion = "1.6.2";
|
|||||||
const aliceDaemonUrl = "http://localhost:8080";
|
const aliceDaemonUrl = "http://localhost:8080";
|
||||||
const aliceDaemonPassword = "apitest";
|
const aliceDaemonPassword = "apitest";
|
||||||
const alice: HavenoDaemon = new HavenoDaemon(aliceDaemonUrl, aliceDaemonPassword);
|
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 aliceWalletUsername = "rpc_user";
|
||||||
const aliceWalletPassword = "abc123";
|
const aliceWalletPassword = "abc123";
|
||||||
let aliceWallet: any;
|
let aliceWallet: any;
|
||||||
@ -532,4 +532,4 @@ function testCryptoPaymentAccount(paymentAccount: PaymentAccount) {
|
|||||||
function testOffer(offer: OfferInfo) {
|
function testOffer(offer: OfferInfo) {
|
||||||
expect(offer.getId().length).toBeGreaterThan(0);
|
expect(offer.getId().length).toBeGreaterThan(0);
|
||||||
// TODO: test rest of offer
|
// TODO: test rest of offer
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user