diff --git a/api/.eslintrc b/api/.eslintrc index ad7852234..7ef33e08b 100644 --- a/api/.eslintrc +++ b/api/.eslintrc @@ -115,6 +115,12 @@ "caseInsensitive": true } } + ], + "no-restricted-imports": [ + "warn", + { + "patterns": ["^[a-zA-Z]"] + } ] } } diff --git a/e2e-test/cypress/integration/project_edit_spec.js b/e2e-test/cypress/integration/project_edit_spec.js index a574bb1a1..a4e265d2a 100644 --- a/e2e-test/cypress/integration/project_edit_spec.js +++ b/e2e-test/cypress/integration/project_edit_spec.js @@ -310,7 +310,8 @@ describe("Project Edit", function () { .then((additionalData) => { previousAddtionalData = additionalData; }); - cy.get(".jse-value").click().type("-changed{enter}"); + cy.get(".jse-value").click(); + cy.get(".jse-value").type("-changed{enter}"); }); cy.get(`[data-test=project-additional-data]`).click(); diff --git a/e2e-test/cypress/support/commands.js b/e2e-test/cypress/support/commands.js index 49aaa87d5..5e8ebc789 100644 --- a/e2e-test/cypress/support/commands.js +++ b/e2e-test/cypress/support/commands.js @@ -33,7 +33,7 @@ beforeEach(() => { }); Cypress.Commands.add("login", (username = "mstein", password = "test", opts = { language: "en-gb" }) => { - const loginRequest = (retries = 3) => { + const loginRequest = (retries = 5) => { return cy .request({ url: `${baseUrl}/api/user.authenticate`, @@ -46,7 +46,8 @@ Cypress.Commands.add("login", (username = "mstein", password = "test", opts = { }) .then((response) => { if (response.status === 502 && retries > 0) { - cy.wait(1000); + console.log("api/user.authenticate responded with 502. Retrying login request."); + cy.wait(3000); return loginRequest(retries - 1); } else if (response.status >= 400) { throw new Error(`Request failed with status ${response.status}`); diff --git a/provisioning/src/index.js b/provisioning/src/index.js index dab47daf3..0104f728d 100644 --- a/provisioning/src/index.js +++ b/provisioning/src/index.js @@ -709,8 +709,12 @@ if (isBeta) { process.exit(0); }); } else { - provisionBlockchain(protocol, host, port, rootSecret, organization).then(() => { - log.info("\x1b[32m%s\x1b[0m", "Successfully provisioned Trubudget!"); + (async () => { + for (let i = 0; i < 5; i++) { + await provisionBlockchain(protocol, host, port, rootSecret, organization); + log.info("\x1b[32m%s\x1b[0m", `Successfully provisioned Trubudget! Iteration: ${i + 1}`); + await new Promise(resolve => setTimeout(resolve, 20000)); // Wait for 20 seconds + } process.exit(0); - }); + })(); }