lint changes

This commit is contained in:
Mitch-Budibase 2022-01-21 13:12:16 +00:00
parent 7e834f3aa5
commit 9fe8a8c687
4 changed files with 35 additions and 21 deletions

1
.gitignore vendored
View File

@ -95,3 +95,4 @@ hosting/.generated-envoy.dev.yaml
*.sublime-workspace
bin/
packages/builder/cypress.env.json

View File

@ -1,6 +1,6 @@
import filterTests from "../support/filterTests"
filterTests(['smoke', 'all'], () => {
filterTests(["smoke", "all"], () => {
context("Screen Tests", () => {
before(() => {
cy.login()

View File

@ -1,16 +1,16 @@
const filterTests = (testTags, runTest) => {
// testTags is an array of tags
// runTest is all tests
if (Cypress.env('TEST_TAGS')) {
const tags = Cypress.env('TEST_TAGS').split('/');
const found = testTags.some(($testTags) => tags.includes($testTags));
if (Cypress.env("TEST_TAGS")) {
const tags = Cypress.env("TEST_TAGS").split("/")
const found = testTags.some($testTags => tags.includes($testTags))
if (found) {
runTest();
runTest()
}
} else {
runTest();
runTest()
}
};
}
export default filterTests;
export default filterTests

View File

@ -153,8 +153,15 @@ export function isIsoDateString(str: string) {
* @param column The column to check, to see if it is a valid relationship.
* @param tableIds The IDs of the tables which currently exist.
*/
function shouldCopyRelationship(column: { type: string, tableId?: string }, tableIds: [string]) {
return column.type === FieldTypes.LINK && column.tableId && tableIds.includes(column.tableId)
function shouldCopyRelationship(
column: { type: string; tableId?: string },
tableIds: [string]
) {
return (
column.type === FieldTypes.LINK &&
column.tableId &&
tableIds.includes(column.tableId)
)
}
/**
@ -165,9 +172,15 @@ function shouldCopyRelationship(column: { type: string, tableId?: string }, tabl
* @param column The column to check for options or boolean type.
* @param fetchedColumn The fetched column to check for the type in the external database.
*/
function shouldCopySpecialColumn(column: { type: string }, fetchedColumn: { type: string } | undefined) {
return column.type === FieldTypes.OPTIONS ||
((!fetchedColumn || fetchedColumn.type === FieldTypes.NUMBER) && column.type === FieldTypes.BOOLEAN)
function shouldCopySpecialColumn(
column: { type: string },
fetchedColumn: { type: string } | undefined
) {
return (
column.type === FieldTypes.OPTIONS ||
((!fetchedColumn || fetchedColumn.type === FieldTypes.NUMBER) &&
column.type === FieldTypes.BOOLEAN)
)
}
/**