Browse Source

test: CY xcdb path corrections

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3404/head
Raju Udava 2 years ago
parent
commit
3b9dc5df4e
  1. 8
      .github/workflows/ci-cd-v2.yml
  2. 2
      package.json
  3. 6
      scripts/cypress-v2/plugins/index.js

8
.github/workflows/ci-cd-v2.yml

@ -224,7 +224,7 @@ jobs:
# uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
# with: # with:
# start: | # start: |
# npm run start:xcdb-api:cache # npm run start:xcdb-api:cache-v2
# npm run start:web-v2 # npm run start:web-v2
# docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
# spec: "./scripts/cypress-v2/integration/test/xcdb-restTableOps.js" # spec: "./scripts/cypress-v2/integration/test/xcdb-restTableOps.js"
@ -268,7 +268,7 @@ jobs:
# uses: cypress-io/github-action@v2 # uses: cypress-io/github-action@v2
# with: # with:
# start: | # start: |
# npm run start:xcdb-api:cache # npm run start:xcdb-api:cache-v2
# npm run start:web-v2 # npm run start:web-v2
# docker-compose -f ./scripts/docker-compose-cypress.yml up -d # docker-compose -f ./scripts/docker-compose-cypress.yml up -d
# spec: "./scripts/cypress-v2/integration/test/xcdb-restViews.js" # spec: "./scripts/cypress-v2/integration/test/xcdb-restViews.js"
@ -312,7 +312,7 @@ jobs:
uses: cypress-io/github-action@v2 uses: cypress-io/github-action@v2
with: with:
start: | start: |
npm run start:xcdb-api:cache npm run start:xcdb-api:cache-v2
npm run start:web-v2 npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js" spec: "./scripts/cypress-v2/integration/test/xcdb-restRoles.js"
@ -356,7 +356,7 @@ jobs:
uses: cypress-io/github-action@v2 uses: cypress-io/github-action@v2
with: with:
start: | start: |
npm run start:xcdb-api:cache npm run start:xcdb-api:cache-v2
npm run start:web-v2 npm run start:web-v2
docker-compose -f ./scripts/docker-compose-cypress.yml up -d docker-compose -f ./scripts/docker-compose-cypress.yml up -d
spec: "./scripts/cypress-v2/integration/test/xcdb-restMisc.js" spec: "./scripts/cypress-v2/integration/test/xcdb-restMisc.js"

2
package.json

@ -17,10 +17,12 @@
"install:common": "cd ./packages/nocodb; npm install ../nocodb-sdk; cd ../nc-gui; npm install ../nocodb-sdk", "install:common": "cd ./packages/nocodb; npm install ../nocodb-sdk; cd ../nc-gui; npm install ../nocodb-sdk",
"start:api": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_CACHE=true NC_DISABLE_TELE=true npm run watch:run:cypress", "start:api": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_CACHE=true NC_DISABLE_TELE=true npm run watch:run:cypress",
"start:xcdb-api": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk;npm install; NC_DISABLE_CACHE=true NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress", "start:xcdb-api": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk;npm install; NC_DISABLE_CACHE=true NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:xcdb-api-v2": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk;npm install; NC_DISABLE_CACHE=true NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:api:cache": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk;npm install; NC_DISABLE_TELE=true npm run watch:run:cypress", "start:api:cache": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk;npm install; NC_DISABLE_TELE=true npm run watch:run:cypress",
"start:api:cache:pg": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true npm run watch:run:cypress:pg", "start:api:cache:pg": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true npm run watch:run:cypress:pg",
"start:api:cache:pg:cyquick": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true npm run watch:run:cypress:pg:cyquick", "start:api:cache:pg:cyquick": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true npm run watch:run:cypress:pg:cyquick",
"start:xcdb-api:cache": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress", "start:xcdb-api:cache": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:xcdb-api:cache-v2": "npm run build:common ; cd ./packages/nocodb; npm install ../nocodb-sdk; npm install; NC_DISABLE_TELE=true NC_INFLECTION=camelize DATABASE_URL=sqlite:../../../scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db npm run watch:run:cypress",
"start:web": "npm run build:common ; cd ./packages/nc-gui; npm install ../nocodb-sdk; npm install; npm run dev", "start:web": "npm run build:common ; cd ./packages/nc-gui; npm install ../nocodb-sdk; npm install; npm run dev",
"start:web-v2": "npm run build:common ; cd ./packages/nc-gui-v2; npm install ../nocodb-sdk; npm install; npm run dev", "start:web-v2": "npm run build:common ; cd ./packages/nc-gui-v2; npm install ../nocodb-sdk; npm install; npm run dev",
"cypress:run": "cypress run --config-file ./scripts/cypress/cypress.json", "cypress:run": "cypress run --config-file ./scripts/cypress/cypress.json",

6
scripts/cypress-v2/plugins/index.js

@ -29,7 +29,7 @@ module.exports = (on, config) => {
copyFile() { copyFile() {
console.log("copyFile", __dirname) console.log("copyFile", __dirname)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
copyFile("./scripts/cypress/fixtures/quickTest/noco_0_91_7.db", "./packages/nocodb/noco.db", (err) => { copyFile("./scripts/cypress-v2/fixtures/quickTest/noco_0_91_7.db", "./packages/nocodb/noco.db", (err) => {
if(err) { if(err) {
console.log(err) console.log(err)
return reject(err) return reject(err)
@ -129,7 +129,7 @@ function _sqliteExecReturnValue(query) {
// open the database // open the database
console.log("Current directory: " + process.cwd()); console.log("Current directory: " + process.cwd());
let db = new sqlite3.Database( let db = new sqlite3.Database(
"./scripts/cypress/fixtures/sqlite-sakila/sakila.db", "./scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db",
sqlite3.OPEN_READWRITE, sqlite3.OPEN_READWRITE,
(err) => { (err) => {
if (err) { if (err) {
@ -157,7 +157,7 @@ function _sqliteExec(query) {
// open the database // open the database
console.log("Current directory: " + process.cwd()); console.log("Current directory: " + process.cwd());
let db = new sqlite3.Database( let db = new sqlite3.Database(
"./scripts/cypress/fixtures/sqlite-sakila/sakila.db", "./scripts/cypress-v2/fixtures/sqlite-sakila/sakila.db",
sqlite3.OPEN_READWRITE, sqlite3.OPEN_READWRITE,
(err) => { (err) => {
if (err) { if (err) {

Loading…
Cancel
Save