Merge branch 'develop' into labday/integrations
This commit is contained in:
commit
cf1e378b6e
|
@ -5,7 +5,6 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 5 * * *" # every day at 5AM
|
- cron: "0 5 * * *" # every day at 5AM
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -15,7 +15,7 @@ version: 0.2.8
|
||||||
appVersion: 1.0.48
|
appVersion: 1.0.48
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: couchdb
|
- name: couchdb
|
||||||
version: 3.3.4
|
version: 3.6.1
|
||||||
repository: https://apache.github.io/couchdb-helm
|
repository: https://apache.github.io/couchdb-helm
|
||||||
condition: services.couchdb.enabled
|
condition: services.couchdb.enabled
|
||||||
- name: ingress-nginx
|
- name: ingress-nginx
|
||||||
|
|
|
@ -42,13 +42,25 @@ http {
|
||||||
client_max_body_size 1000m;
|
client_max_body_size 1000m;
|
||||||
ignore_invalid_headers off;
|
ignore_invalid_headers off;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
# port_in_redirect off;
|
|
||||||
|
set $csp_default "default-src 'self'";
|
||||||
|
set $csp_script "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io";
|
||||||
|
set $csp_style "style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me https://maxcdn.bootstrapcdn.com";
|
||||||
|
set $csp_object "object-src 'none'";
|
||||||
|
set $csp_base_uri "base-uri 'self'";
|
||||||
|
set $csp_connect "connect-src 'self' https://api-iam.intercom.io https://api-iam.intercom.io https://api-ping.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io wss://nexus-websocket-b.intercom.io https://nexus-websocket-a.intercom.io https://nexus-websocket-b.intercom.io https://uploads.intercomcdn.com https://uploads.intercomusercontent.com";
|
||||||
|
set $csp_font "font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me https://maxcdn.bootstrapcdn.com https://js.intercomcdn.com https://fonts.intercomcdn.com";
|
||||||
|
set $csp_frame "frame-src 'self' https:";
|
||||||
|
set $csp_img "img-src http: https: data: blob:";
|
||||||
|
set $csp_manifest "manifest-src 'self'";
|
||||||
|
set $csp_media "media-src 'self' https://js.intercomcdn.com";
|
||||||
|
set $csp_worker "worker-src 'none'";
|
||||||
|
|
||||||
# Security Headers
|
# Security Headers
|
||||||
add_header X-Frame-Options SAMEORIGIN always;
|
add_header X-Frame-Options SAMEORIGIN always;
|
||||||
add_header X-Content-Type-Options nosniff always;
|
add_header X-Content-Type-Options nosniff always;
|
||||||
add_header X-XSS-Protection "1; mode=block" always;
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.budi.live https://js.intercomcdn.com https://widget.intercom.io; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://fonts.googleapis.com https://rsms.me https://maxcdn.bootstrapcdn.com; object-src 'none'; base-uri 'self'; connect-src 'self' https://api-iam.intercom.io https://app.posthog.com wss://nexus-websocket-a.intercom.io ; font-src 'self' data: https://cdn.jsdelivr.net https://fonts.gstatic.com https://rsms.me https://maxcdn.bootstrapcdn.com; frame-src 'self' https:; img-src http: https: data:; manifest-src 'self'; media-src 'self'; worker-src 'none';" always;
|
add_header Content-Security-Policy "${csp_default}; ${csp_script}; ${csp_style}; ${csp_object}; ${csp_base_uri}; ${csp_connect}; ${csp_font}; ${csp_frame}; ${csp_img}; ${csp_manifest}; ${csp_media}; ${csp_worker};" always;
|
||||||
|
|
||||||
# upstreams
|
# upstreams
|
||||||
set $apps {{ apps }};
|
set $apps {{ apps }};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "^1.0.98-alpha.9",
|
"@budibase/string-templates": "^1.0.105-alpha.0",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -6,10 +6,6 @@ filterTests(['all'], () => {
|
||||||
cy.login()
|
cy.login()
|
||||||
})
|
})
|
||||||
|
|
||||||
after(() => {
|
|
||||||
cy.deleteAllApps()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should change the icon and colour for an application", () => {
|
it("should change the icon and colour for an application", () => {
|
||||||
// Search for test application
|
// Search for test application
|
||||||
cy.applicationInAppTable("Cypress Tests")
|
cy.applicationInAppTable("Cypress Tests")
|
||||||
|
|
|
@ -3,10 +3,12 @@ import filterTests from '../support/filterTests'
|
||||||
filterTests(['smoke', 'all'], () => {
|
filterTests(['smoke', 'all'], () => {
|
||||||
context("Create an Application", () => {
|
context("Create an Application", () => {
|
||||||
|
|
||||||
beforeEach(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
|
cy.deleteApp("Cypress Tests")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!(Cypress.env("TEST_ENV"))) {
|
||||||
it("should show the new user UI/UX", () => {
|
it("should show the new user UI/UX", () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.get(`[data-cy="create-app-btn"]`).contains('Start from scratch').should("exist")
|
cy.get(`[data-cy="create-app-btn"]`).contains('Start from scratch').should("exist")
|
||||||
|
@ -17,11 +19,16 @@ filterTests(['smoke', 'all'], () => {
|
||||||
|
|
||||||
cy.get(".appTable").should("not.exist")
|
cy.get(".appTable").should("not.exist")
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
it("should provide filterable templates", () => {
|
it("should provide filterable templates", () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
|
if (Cypress.env("TEST_ENV")) {
|
||||||
|
cy.get(".spectrum-Button").contains("Templates").click({force: true})
|
||||||
|
}
|
||||||
|
|
||||||
cy.get(".template-category-filters").should("exist")
|
cy.get(".template-category-filters").should("exist")
|
||||||
cy.get(".template-categories").should("exist")
|
cy.get(".template-categories").should("exist")
|
||||||
|
|
||||||
|
@ -39,14 +46,22 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
const appName = "A New App"
|
// Start create app process. If apps already exist, click second button
|
||||||
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
||||||
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
||||||
|
.its("body")
|
||||||
|
.then(val => {
|
||||||
|
if (val.length > 0) {
|
||||||
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
cy.get(`[data-cy="create-app-btn"]`).contains('Start from scratch').click({force: true})
|
const appName = "Cypress Tests"
|
||||||
cy.get(".spectrum-Modal").within(() => {
|
cy.get(".spectrum-Modal").within(() => {
|
||||||
|
|
||||||
//Auto fill
|
//Auto fill
|
||||||
cy.get("input").eq(0).type(appName).should("have.value", appName).blur()
|
cy.get("input").eq(0).type(appName).should("have.value", appName).blur()
|
||||||
cy.get("input").eq(1).should("have.value", "/a-new-app")
|
cy.get("input").eq(1).should("have.value", "/cypress-tests")
|
||||||
cy.get(".spectrum-ButtonGroup").contains("Create app").should('not.be.disabled')
|
cy.get(".spectrum-ButtonGroup").contains("Create app").should('not.be.disabled')
|
||||||
|
|
||||||
//Empty the app url - disabled create
|
//Empty the app url - disabled create
|
||||||
|
@ -69,8 +84,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
|
|
||||||
it("should create the first application from scratch", () => {
|
it("should create the first application from scratch", () => {
|
||||||
const appName = "Cypress Tests"
|
const appName = "Cypress Tests"
|
||||||
cy.deleteApp(appName)
|
cy.createApp(appName)
|
||||||
cy.createApp(appName, "This app is used for Cypress testing.")
|
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
@ -83,10 +97,19 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
|
// Navigate to Create new app section if apps already exist
|
||||||
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
||||||
|
.its("body")
|
||||||
|
.then(val => {
|
||||||
|
if (val.length > 0) {
|
||||||
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
cy.get(".template-category-filters").should("exist")
|
cy.get(".template-category-filters").should("exist")
|
||||||
cy.get(".template-categories").should("exist")
|
cy.get(".template-categories").should("exist")
|
||||||
|
|
||||||
//### Select nth template and choose to create?
|
// Select template
|
||||||
cy.get('.template-category').eq(0).within(() => {
|
cy.get('.template-category').eq(0).within(() => {
|
||||||
const card = cy.get('.template-card').eq(0).should("exist");
|
const card = cy.get('.template-card').eq(0).should("exist");
|
||||||
const cardOverlay = card.get('.template-thumbnail-action-overlay').should("exist")
|
const cardOverlay = card.get('.template-thumbnail-action-overlay').should("exist")
|
||||||
|
@ -94,7 +117,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cardOverlay.get("button").contains("Use template").should("exist").click({force: true})
|
cardOverlay.get("button").contains("Use template").should("exist").click({force: true})
|
||||||
})
|
})
|
||||||
|
|
||||||
//### CMD Create app from theme card
|
// CMD Create app from theme card
|
||||||
cy.get(".spectrum-Modal").should('be.visible')
|
cy.get(".spectrum-Modal").should('be.visible')
|
||||||
|
|
||||||
const templateName = cy.get(".spectrum-Modal .template-thumbnail-text")
|
const templateName = cy.get(".spectrum-Modal .template-thumbnail-text")
|
||||||
|
@ -111,27 +134,22 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
|
||||||
cy.applicationInAppTable(templateNameText)
|
cy.applicationInAppTable(templateNameText)
|
||||||
cy.deleteAllApps()
|
cy.deleteApp(templateNameText)
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should display a second application and app filtering", () => {
|
it("should display a second application and app filtering", () => {
|
||||||
|
// Create first app
|
||||||
const appName = "Cypress Tests"
|
const appName = "Cypress Tests"
|
||||||
cy.deleteApp(appName)
|
cy.createApp(appName)
|
||||||
cy.createApp(appName, "This app is used for Cypress testing.")
|
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
|
// Create second app
|
||||||
const secondAppName = "Second App Demo"
|
const secondAppName = "Second App Demo"
|
||||||
cy.deleteApp(secondAppName)
|
cy.createApp(secondAppName)
|
||||||
|
|
||||||
cy.get(`[data-cy="create-app-btn"]`).contains('Create new app').click({force: true})
|
|
||||||
cy.wait(500)
|
|
||||||
cy.url().should('include', '/builder/portal/apps/create')
|
|
||||||
|
|
||||||
cy.createAppFromScratch(secondAppName)
|
|
||||||
|
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
@ -140,7 +158,7 @@ filterTests(['smoke', 'all'], () => {
|
||||||
cy.searchForApplication(appName)
|
cy.searchForApplication(appName)
|
||||||
cy.searchForApplication(secondAppName)
|
cy.searchForApplication(secondAppName)
|
||||||
|
|
||||||
cy.deleteAllApps()
|
cy.deleteApp(secondAppName)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,10 +7,6 @@ filterTests(["smoke", "all"], () => {
|
||||||
cy.createTestApp()
|
cy.createTestApp()
|
||||||
})
|
})
|
||||||
|
|
||||||
after(() => {
|
|
||||||
cy.deleteAllApps()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should create a new Table", () => {
|
it("should create a new Table", () => {
|
||||||
cy.createTable("dog")
|
cy.createTable("dog")
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
|
|
@ -4,9 +4,6 @@ filterTests(["smoke", "all"], () => {
|
||||||
context("Create a User and Assign Roles", () => {
|
context("Create a User and Assign Roles", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
|
||||||
cy.wait(500)
|
|
||||||
cy.createAppFromScratch("Initial App")
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should create a user", () => {
|
it("should create a user", () => {
|
||||||
|
|
|
@ -4,7 +4,6 @@ filterTests(['smoke', 'all'], () => {
|
||||||
context("Create a View", () => {
|
context("Create a View", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.deleteAllApps()
|
|
||||||
|
|
||||||
cy.createTestApp()
|
cy.createTestApp()
|
||||||
cy.createTable("data")
|
cy.createTable("data")
|
||||||
|
|
|
@ -4,7 +4,6 @@ filterTests(["smoke", "all"], () => {
|
||||||
context("REST Datasource Testing", () => {
|
context("REST Datasource Testing", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.deleteAllApps()
|
|
||||||
cy.createTestApp()
|
cy.createTestApp()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,7 @@ filterTests(["smoke", "all"], () => {
|
||||||
context("Query Level Transformers", () => {
|
context("Query Level Transformers", () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.login()
|
cy.login()
|
||||||
cy.deleteAllApps()
|
cy.createTestApp()
|
||||||
cy.createApp("Cypress Tests")
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should write a transformer function", () => {
|
it("should write a transformer function", () => {
|
||||||
|
|
|
@ -11,10 +11,12 @@ filterTests(['all'], () => {
|
||||||
const appName = "Cypress Tests"
|
const appName = "Cypress Tests"
|
||||||
const appRename = "Cypress Renamed"
|
const appRename = "Cypress Renamed"
|
||||||
// Rename app, Search for app, Confirm name was changed
|
// Rename app, Search for app, Confirm name was changed
|
||||||
cy.get(".home-logo").click()
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
cy.wait(500)
|
||||||
renameApp(appName, appRename)
|
renameApp(appName, appRename)
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
|
cy.searchForApplication(appRename)
|
||||||
cy.get(".appTable").find(".title").should("have.length", 1)
|
cy.get(".appTable").find(".title").should("have.length", 1)
|
||||||
cy.applicationInAppTable(appRename)
|
cy.applicationInAppTable(appRename)
|
||||||
// Set app name back to Cypress Tests
|
// Set app name back to Cypress Tests
|
||||||
|
@ -36,7 +38,8 @@ filterTests(['all'], () => {
|
||||||
cy.get(".spectrum-Button").contains("Publish").click({ force: true })
|
cy.get(".spectrum-Button").contains("Publish").click({ force: true })
|
||||||
})
|
})
|
||||||
// Rename app, Search for app, Confirm name was changed
|
// Rename app, Search for app, Confirm name was changed
|
||||||
cy.get(".home-logo").click()
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
cy.wait(500)
|
||||||
renameApp(appName, appRename, true)
|
renameApp(appName, appRename, true)
|
||||||
cy.get(".appTable").find(".wrapper").should("have.length", 1)
|
cy.get(".appTable").find(".wrapper").should("have.length", 1)
|
||||||
cy.applicationInAppTable(appRename)
|
cy.applicationInAppTable(appRename)
|
||||||
|
@ -44,7 +47,8 @@ filterTests(['all'], () => {
|
||||||
|
|
||||||
it("Should try to rename an application to have no name", () => {
|
it("Should try to rename an application to have no name", () => {
|
||||||
const appName = "Cypress Tests"
|
const appName = "Cypress Tests"
|
||||||
cy.get(".home-logo").click()
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
cy.wait(500)
|
||||||
renameApp(appName, " ", false, true)
|
renameApp(appName, " ", false, true)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
// Close modal and confirm name has not been changed
|
// Close modal and confirm name has not been changed
|
||||||
|
@ -52,8 +56,6 @@ filterTests(['all'], () => {
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
cy.applicationInAppTable(appName)
|
cy.applicationInAppTable(appName)
|
||||||
cy.get(".appTable").find(".title").should("have.length", 1)
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
xit("Should create two applications with the same name", () => {
|
xit("Should create two applications with the same name", () => {
|
||||||
|
@ -77,12 +79,12 @@ filterTests(['all'], () => {
|
||||||
const appName = "Cypress Tests"
|
const appName = "Cypress Tests"
|
||||||
const numberName = 12345
|
const numberName = 12345
|
||||||
const specialCharName = "£$%^"
|
const specialCharName = "£$%^"
|
||||||
cy.get(".home-logo").click()
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
cy.wait(500)
|
||||||
renameApp(appName, numberName)
|
renameApp(appName, numberName)
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
cy.applicationInAppTable(numberName)
|
cy.applicationInAppTable(numberName)
|
||||||
cy.get(".appTable").find(".title").should("have.length", 1)
|
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
renameApp(numberName, specialCharName)
|
renameApp(numberName, specialCharName)
|
||||||
|
@ -94,11 +96,7 @@ filterTests(['all'], () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const renameApp = (originalName, changedName, published, noName) => {
|
const renameApp = (originalName, changedName, published, noName) => {
|
||||||
cy.applicationInAppTable(originalName)
|
cy.searchForApplication(originalName)
|
||||||
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
|
||||||
.its("body")
|
|
||||||
.then(val => {
|
|
||||||
if (val.length > 0) {
|
|
||||||
cy.get(".appTable")
|
cy.get(".appTable")
|
||||||
.within(() => {
|
.within(() => {
|
||||||
cy.get(".spectrum-Icon").eq(1).click()
|
cy.get(".spectrum-Icon").eq(1).click()
|
||||||
|
@ -127,7 +125,4 @@ filterTests(['all'], () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -35,9 +35,17 @@ Cypress.Commands.add("login", () => {
|
||||||
Cypress.Commands.add("createApp", name => {
|
Cypress.Commands.add("createApp", name => {
|
||||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
cy.wait(500)
|
cy.wait(500)
|
||||||
|
|
||||||
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
||||||
|
|
||||||
|
// If apps already exist
|
||||||
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
||||||
|
.its("body")
|
||||||
|
.then(val => {
|
||||||
|
if (val.length > 0) {
|
||||||
|
cy.get(`[data-cy="create-app-btn"]`).click({ force: true })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
cy.get(".spectrum-Modal").within(() => {
|
cy.get(".spectrum-Modal").within(() => {
|
||||||
cy.get("input").eq(0).type(name).should("have.value", name).blur()
|
cy.get("input").eq(0).type(name).should("have.value", name).blur()
|
||||||
cy.get(".spectrum-ButtonGroup").contains("Create app").click()
|
cy.get(".spectrum-ButtonGroup").contains("Create app").click()
|
||||||
|
@ -53,6 +61,12 @@ Cypress.Commands.add("deleteApp", name => {
|
||||||
.its("body")
|
.its("body")
|
||||||
.then(val => {
|
.then(val => {
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
|
if (Cypress.env("TEST_ENV")) {
|
||||||
|
cy.searchForApplication(name)
|
||||||
|
cy.get(".appTable").within(() => {
|
||||||
|
cy.get(".spectrum-Icon").eq(1).click()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
const appId = val.reduce((acc, app) => {
|
const appId = val.reduce((acc, app) => {
|
||||||
if (name === app.name) {
|
if (name === app.name) {
|
||||||
acc = app.appId
|
acc = app.appId
|
||||||
|
@ -69,6 +83,7 @@ Cypress.Commands.add("deleteApp", name => {
|
||||||
cy.get(actionEleId).within(() => {
|
cy.get(actionEleId).within(() => {
|
||||||
cy.get(".spectrum-Icon").eq(0).click()
|
cy.get(".spectrum-Icon").eq(0).click()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
cy.get(".spectrum-Menu").then($menu => {
|
cy.get(".spectrum-Menu").then($menu => {
|
||||||
if ($menu.text().includes("Unpublish")) {
|
if ($menu.text().includes("Unpublish")) {
|
||||||
|
@ -327,7 +342,16 @@ Cypress.Commands.add("addCustomSourceOptions", totalOptions => {
|
||||||
|
|
||||||
//Filters visible with 1 or more
|
//Filters visible with 1 or more
|
||||||
Cypress.Commands.add("searchForApplication", appName => {
|
Cypress.Commands.add("searchForApplication", appName => {
|
||||||
cy.wait(1000)
|
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||||
|
cy.wait(2000)
|
||||||
|
|
||||||
|
// No app filter functionality if only 1 app exists
|
||||||
|
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
|
||||||
|
.its("body")
|
||||||
|
.then(val => {
|
||||||
|
if (val.length < 2) {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
// Searches for the app
|
// Searches for the app
|
||||||
cy.get(".filter").then(() => {
|
cy.get(".filter").then(() => {
|
||||||
cy.get(".spectrum-Textfield").within(() => {
|
cy.get(".spectrum-Textfield").within(() => {
|
||||||
|
@ -335,8 +359,8 @@ Cypress.Commands.add("searchForApplication", appName => {
|
||||||
cy.get("input").eq(0).type(appName)
|
cy.get("input").eq(0).type(appName)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// Confirms app exists after search
|
}
|
||||||
cy.applicationInAppTable(appName)
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
//Assumes there are no others
|
//Assumes there are no others
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.98-alpha.9",
|
"@budibase/bbui": "^1.0.105-alpha.0",
|
||||||
"@budibase/client": "^1.0.98-alpha.9",
|
"@budibase/client": "^1.0.105-alpha.0",
|
||||||
"@budibase/frontend-core": "^1.0.98-alpha.9",
|
"@budibase/frontend-core": "^1.0.105-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.98-alpha.9",
|
"@budibase/string-templates": "^1.0.105-alpha.0",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.98-alpha.9",
|
"@budibase/bbui": "^1.0.105-alpha.0",
|
||||||
"@budibase/frontend-core": "^1.0.98-alpha.9",
|
"@budibase/frontend-core": "^1.0.105-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.98-alpha.9",
|
"@budibase/string-templates": "^1.0.105-alpha.0",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.98-alpha.9",
|
"@budibase/bbui": "^1.0.105-alpha.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -68,9 +68,9 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "^10.0.3",
|
"@apidevtools/swagger-parser": "^10.0.3",
|
||||||
"@budibase/backend-core": "^1.0.98-alpha.9",
|
"@budibase/backend-core": "^1.0.105-alpha.0",
|
||||||
"@budibase/client": "^1.0.98-alpha.9",
|
"@budibase/client": "^1.0.105-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.98-alpha.9",
|
"@budibase/string-templates": "^1.0.105-alpha.0",
|
||||||
"@bull-board/api": "^3.7.0",
|
"@bull-board/api": "^3.7.0",
|
||||||
"@bull-board/koa": "^3.7.0",
|
"@bull-board/koa": "^3.7.0",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -14,6 +14,7 @@ CREATE TABLE Tasks (
|
||||||
TaskID int NOT NULL AUTO_INCREMENT,
|
TaskID int NOT NULL AUTO_INCREMENT,
|
||||||
PersonID INT,
|
PersonID INT,
|
||||||
TaskName varchar(255),
|
TaskName varchar(255),
|
||||||
|
CreatedAt DATE,
|
||||||
PRIMARY KEY (TaskID),
|
PRIMARY KEY (TaskID),
|
||||||
CONSTRAINT fkPersons
|
CONSTRAINT fkPersons
|
||||||
FOREIGN KEY(PersonID)
|
FOREIGN KEY(PersonID)
|
||||||
|
@ -25,6 +26,6 @@ CREATE TABLE Products (
|
||||||
updated time
|
updated time
|
||||||
);
|
);
|
||||||
INSERT INTO Persons (FirstName, LastName, Age, Address, City, CreatedAt) VALUES ('Mike', 'Hughes', 28.2, '123 Fake Street', 'Belfast', '2021-01-19 03:14:07');
|
INSERT INTO Persons (FirstName, LastName, Age, Address, City, CreatedAt) VALUES ('Mike', 'Hughes', 28.2, '123 Fake Street', 'Belfast', '2021-01-19 03:14:07');
|
||||||
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'assembling');
|
INSERT INTO Tasks (PersonID, TaskName, CreatedAt) VALUES (1, 'assembling', '2020-01-01');
|
||||||
INSERT INTO Tasks (PersonID, TaskName) VALUES (1, 'processing');
|
INSERT INTO Tasks (PersonID, TaskName, CreatedAt) VALUES (2, 'processing', '2019-12-31');
|
||||||
INSERT INTO Products (name, updated) VALUES ('Meat', '11:00:22'), ('Fruit', '10:00:00');
|
INSERT INTO Products (name, updated) VALUES ('Meat', '11:00:22'), ('Fruit', '10:00:00');
|
||||||
|
|
|
@ -14,6 +14,7 @@ import {
|
||||||
finaliseExternalTables,
|
finaliseExternalTables,
|
||||||
} from "./utils"
|
} from "./utils"
|
||||||
import { DatasourcePlus } from "./base/datasourcePlus"
|
import { DatasourcePlus } from "./base/datasourcePlus"
|
||||||
|
import dayjs from "dayjs"
|
||||||
|
|
||||||
module MySQLModule {
|
module MySQLModule {
|
||||||
const mysql = require("mysql2/promise")
|
const mysql = require("mysql2/promise")
|
||||||
|
@ -86,10 +87,16 @@ module MySQLModule {
|
||||||
if (typeof binding !== "string") {
|
if (typeof binding !== "string") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const matches = binding.match(/^\d*/g)
|
const matches = binding.match(/^\d*$/g)
|
||||||
|
// check if number first
|
||||||
if (matches && matches[0] !== "" && !isNaN(Number(matches[0]))) {
|
if (matches && matches[0] !== "" && !isNaN(Number(matches[0]))) {
|
||||||
bindings[i] = parseFloat(binding)
|
bindings[i] = parseFloat(binding)
|
||||||
}
|
}
|
||||||
|
// if not a number, see if it is a date - important to do in this order as any
|
||||||
|
// integer will be considered a valid date
|
||||||
|
else if (dayjs(binding).isValid()) {
|
||||||
|
bindings[i] = dayjs(binding).toDate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return bindings
|
return bindings
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.98-alpha.9",
|
"version": "1.0.105-alpha.0",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.0.98-alpha.9",
|
"@budibase/backend-core": "^1.0.105-alpha.0",
|
||||||
"@budibase/string-templates": "^1.0.98-alpha.9",
|
"@budibase/string-templates": "^1.0.105-alpha.0",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"@sentry/node": "^6.0.0",
|
"@sentry/node": "^6.0.0",
|
||||||
"@techpass/passport-openidconnect": "^0.3.0",
|
"@techpass/passport-openidconnect": "^0.3.0",
|
||||||
|
|
Loading…
Reference in New Issue