diff --git a/examples/web/hello.html b/examples/web/hello.html index 9b3af5e5b..3167094ba 100644 --- a/examples/web/hello.html +++ b/examples/web/hello.html @@ -115,7 +115,7 @@

Results

await glm.connect(); appendResults("Request for renting a provider machine"); const rental = await glm.oneOf({ order }); - appendResults("Rented resources from", rental.agreement.provider.name); + appendResults("Rented resources from " + rental.agreement.provider.name); await rental .getExeUnit() .then(async (exe) => diff --git a/examples/web/transfer-data.html b/examples/web/transfer-data.html new file mode 100644 index 000000000..f5abf62df --- /dev/null +++ b/examples/web/transfer-data.html @@ -0,0 +1,150 @@ + + + + + Requestor in browser + + + +
+

Transfer some data to the provider, process it there and download the result

+
+

Options

+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+
+

Actions

+
+ +
+
+
+ +

Results

+
+
    +
    +
    +
    + + + + diff --git a/tests/cypress/ui/transfer-data.cy.ts b/tests/cypress/ui/transfer-data.cy.ts new file mode 100644 index 000000000..a8069ac3f --- /dev/null +++ b/tests/cypress/ui/transfer-data.cy.ts @@ -0,0 +1,13 @@ +describe("Transfer data example", () => { + it("should run the example", () => { + cy.visit("/transfer-data"); + cy.get("#YAGNA_APPKEY").clear().type(Cypress.env("YAGNA_APPKEY")); + cy.get("#YAGNA_API_BASEPATH").clear().type(Cypress.env("YAGNA_API_BASEPATH")); + cy.get("#SUBNET_TAG").clear().type(Cypress.env("YAGNA_SUBNET")); + cy.get("#PAYMENT_NETWORK").clear().type(Cypress.env("PAYMENT_NETWORK")); + cy.get("#DATA").clear().type("Hello Golem!"); + cy.get("#transfer-data").click(); + cy.get("#results").should("include.text", "hELLO gOLEM!", { timeout: 60000 }); + cy.get("#results").should("include.text", "Finalized renting process", { timeout: 10000 }); + }); +});