Skip to content

Commit

Permalink
test: add myNode & Start9 e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dylancom committed Jun 13, 2022
1 parent 45d8ed7 commit a65be8c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tests/e2e/createWallets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,50 @@ test.describe("Create or connect wallets", () => {
await commonCreateWalletSuccessCheck({ browser, welcomePage, $document });
});

test("successfully connects to myNode", async () => {
const { browser, welcomePage, $document } =
await commonCreateWalletUserCreate();

const connectButton = await getByText($document, "myNode");
connectButton.click();

// wait for the field label instead of headline (headline text already exists on the page before)
await waitFor(() => getByText($document, "lndconnect REST URL"));

const macaroon =
"AgEDbG5kAvgBAwoQ4hM6HKwsW01W5E4y3GTIVRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgxPl4Pghz-lCiCRgG9eu5GcXcQy4zgAtAFGOtpkhd8O0";
const restApiUrl = `lndconnect://lnd1.regtest.getalby.com?cert=&macaroon=${macaroon}`;
const lndConnectUrlField = await getByLabelText(
$document,
"lndconnect REST URL"
);
await lndConnectUrlField.type(restApiUrl);

await commonCreateWalletSuccessCheck({ browser, welcomePage, $document });
});

test("successfully connects to Start9", async () => {
const { browser, welcomePage, $document } =
await commonCreateWalletUserCreate();

const connectButton = await getByText($document, "Start9");
connectButton.click();

// wait for the field label instead of headline (headline text already exists on the page before)
await waitFor(() => getByText($document, "lndconnect REST URL"));

const macaroon =
"AgEDbG5kAvgBAwoQ4hM6HKwsW01W5E4y3GTIVRIBMBoWCgdhZGRyZXNzEgRyZWFkEgV3cml0ZRoTCgRpbmZvEgRyZWFkEgV3cml0ZRoXCghpbnZvaWNlcxIEcmVhZBIFd3JpdGUaIQoIbWFjYXJvb24SCGdlbmVyYXRlEgRyZWFkEgV3cml0ZRoWCgdtZXNzYWdlEgRyZWFkEgV3cml0ZRoXCghvZmZjaGFpbhIEcmVhZBIFd3JpdGUaFgoHb25jaGFpbhIEcmVhZBIFd3JpdGUaFAoFcGVlcnMSBHJlYWQSBXdyaXRlGhgKBnNpZ25lchIIZ2VuZXJhdGUSBHJlYWQAAAYgxPl4Pghz-lCiCRgG9eu5GcXcQy4zgAtAFGOtpkhd8O0";
const restApiUrl = `lndconnect://lnd1.regtest.getalby.com?cert=&macaroon=${macaroon}`;
const lndConnectUrlField = await getByLabelText(
$document,
"lndconnect REST URL"
);
await lndConnectUrlField.type(restApiUrl);

await commonCreateWalletSuccessCheck({ browser, welcomePage, $document });
});

test("successfully connects to Eclair", async () => {
const { browser, welcomePage, $document } =
await commonCreateWalletUserCreate();
Expand Down

0 comments on commit a65be8c

Please sign in to comment.