Skip to content

Commit f50489d

Browse files
author
Kirill Maksimov
committed
Fix browser test
1 parent 4401e60 commit f50489d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

e2e/browser/browser.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ describe("E2E browser", () => {
5757
await gammeDriver.stop();
5858
});
5959

60-
it("should create Orbs.Client instance", async () => {
61-
await clickOnElement("#create-orbs-client");
62-
const orbsClientResult = await getElementText("#orbs-client-result");
63-
expect(orbsClientResult).toEqual("Created");
64-
});
65-
6660
it("should create the sender account", async () => {
6761
await clickOnElement("#create-sender-account");
6862
const senderAccountId = await getElementText("#sender-account-id");
6963
const accountIdLength = senderAccountId.split(",").length;
7064
expect(accountIdLength).toEqual(32);
7165
});
7266

67+
it("should create Orbs.Client instance", async () => {
68+
await clickOnElement("#create-orbs-client");
69+
const orbsClientResult = await getElementText("#orbs-client-result");
70+
expect(orbsClientResult).toEqual("Created");
71+
});
72+
7373
it("should create the receiver account", async () => {
7474
await clickOnElement("#create-receiver-account");
7575
const receiverAccountId = await getElementText("#receiver-account-id");

e2e/browser/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
try {
3131
const endpoint = document.querySelector("#endpoint").value;
3232
const virtualChainId = document.querySelector("#virtual-chain-id").value;
33-
window.orbsClient = new Orbs.Client(endpoint, virtualChainId, "TEST_NET");
33+
window.orbsClient = new Orbs.Client(endpoint, virtualChainId, "TEST_NET", new Orbs.DefaultSigner(window.senderAccount));
3434
result = "Created";
3535
} catch (e) {
3636
result = "Failed";
@@ -49,7 +49,7 @@
4949
}
5050

5151
function CreateTx() {
52-
const [tx, txId] = window.orbsClient.createTransaction(window.senderAccount.publicKey, window.senderAccount.privateKey, "BenchmarkToken", "transfer", [Orbs.argUint64(10), Orbs.argAddress(window.receiverAccount.address)]);
52+
const [tx, txId] = window.orbsClient.createTransaction("BenchmarkToken", "transfer", [Orbs.argUint64(10), Orbs.argAddress(window.receiverAccount.address)]);
5353
window.tx = tx;
5454
window.txId = txId;
5555
document.querySelector("#tx-id").innerText = txId;
@@ -82,7 +82,7 @@
8282
}
8383

8484
function SendQuery() {
85-
const query = window.orbsClient.createQuery(window.receiverAccount.publicKey, "BenchmarkToken", "getBalance", [Orbs.argAddress(window.receiverAccount.address)]);
85+
const query = window.orbsClient.createQuery("BenchmarkToken", "getBalance", [Orbs.argAddress(window.receiverAccount.address)]);
8686
window.orbsClient.sendQuery(query).then(balanceResponse => {
8787
document.querySelector("#balance-response-request-status").innerText = balanceResponse.requestStatus;
8888
document.querySelector("#balance-response-execution-result").innerText = balanceResponse.executionResult;

0 commit comments

Comments
 (0)