1
0
Fork 0
mirror of synced 2024-06-15 17:05:11 +12:00

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()
@ -21,5 +21,5 @@ filterTests(['smoke', 'all'], () => {
cy.contains("/test-with-spaces").should("exist")
})
})
})
})
})

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 (found) {
runTest();
}
} else {
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 (found) {
runTest()
}
};
export default filterTests;
} else {
runTest()
}
}
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)
)
}
/**