mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
import { loginPage } from "../../support/page_objects/navigation"; |
|
import { isTestSuiteActive } from "../../support/page_objects/projectConstants"; |
|
|
|
export const genTest = (apiType, dbType) => { |
|
// if (!isTestSuiteActive(apiType, dbType)) return; |
|
|
|
describe(`${apiType.toUpperCase()} api - Login & Open project`, () => { |
|
// Run once before test- create project (rest/graphql) |
|
// |
|
before(() => { |
|
// loginPage.loginAndOpenProject(apiType, dbType); |
|
// open a table to work on views |
|
// cy.openTableTab('City'); |
|
}); |
|
|
|
it(``, () => { |
|
cy.log("Test-1"); |
|
|
|
let projId = ""; |
|
let query = `SELECT prefix from nc_projects_v2 where title = "sampleREST"; `; |
|
cy.task("sqliteExecReturnValue", query) |
|
.then((resolve) => { |
|
cy.log(resolve); |
|
projId = resolve.prefix.split("_")[1]; |
|
cy.log(projId); |
|
}) |
|
.then(() => { |
|
let query = `ALTER TABLE "actor" RENAME TO "${projId}actor"`; |
|
cy.task("sqliteExec", query); |
|
}); |
|
}); |
|
}); |
|
}; |
|
|
|
// genTest("rest", "mysql");
|
|
|