forked from tsai/budibase
Browse Source
* cypress test setup * running cypress in CI * fixing tests after first time setup wizard * bb api key * API Key in right place * adding env in cypress.json * env var in setup * lint * API key not working * fill in API key form if present * allow more time for creation * cypress server for debug * video recording, better debugging * Adding debug logs * set node env * cypress env * cancel irrelevant testgh-pages
committed by
GitHub
32 changed files with 132 additions and 107 deletions
@ -1,4 +1,5 @@ |
|||||
{ |
{ |
||||
"baseUrl": "http://localhost:4001/_builder/", |
"baseUrl": "http://localhost:4001/_builder/", |
||||
"video": false |
"video": true, |
||||
} |
"projectId": "bmbemn" |
||||
|
} |
||||
|
|||||
@ -0,0 +1,3 @@ |
|||||
|
{ |
||||
|
"budibase": "CB373643-3FC4-4902-9E31-449C0ED066B6" |
||||
|
} |
||||
@ -1,17 +1,23 @@ |
|||||
// What this script does:
|
// What this script does:
|
||||
// 1. Removes the old test folder if it exists (.budibase-cypress)
|
// 1. Removes the old test folder if it exists (.budibase)
|
||||
// 2. Initialises using `.budibase-cypress`
|
// 2. Initialises using `.budibase`
|
||||
// 3. Runs the server using said folder
|
// 3. Runs the server using said folder
|
||||
|
|
||||
const rimraf = require("rimraf") |
const rimraf = require("rimraf") |
||||
const { join } = require("path") |
const { join } = require("path") |
||||
const homedir = join(require("os").homedir(), ".budibase-cypress") |
|
||||
const init = require("../../cli/src/commands/init/initHandler") |
|
||||
const run = require("../../cli/src/commands/run/runHandler") |
const run = require("../../cli/src/commands/run/runHandler") |
||||
|
const initialiseBudibase = require("../../server/src/utilities/initialiseBudibase") |
||||
|
|
||||
|
const homedir = join(require("os").homedir(), ".budibase") |
||||
|
|
||||
rimraf.sync(homedir) |
rimraf.sync(homedir) |
||||
|
|
||||
init({ dir: homedir, clientId: "cypress-test" }).then(() => { |
process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE" |
||||
delete require.cache[require.resolve("../../server/src/environment")] |
process.env.NODE_ENV = "cypress" |
||||
run({ dir: homedir }) |
|
||||
}) |
initialiseBudibase({ dir: homedir, clientId: "cypress-test" }) |
||||
|
.then(() => { |
||||
|
delete require.cache[require.resolve("../../server/src/environment")] |
||||
|
run({ dir: homedir }) |
||||
|
}) |
||||
|
.catch(e => console.error(e)) |
||||
|
|||||
Loading…
Reference in new issue