1
0
Fork 0
mirror of synced 2024-06-26 18:10:51 +12:00

Merge remote-tracking branch 'origin/develop' into feat/user-groups-tab

This commit is contained in:
Peter Clement 2022-07-25 15:09:42 +01:00
commit 5e4f6ed3b7
36 changed files with 307 additions and 1873 deletions

View file

@ -31,6 +31,9 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**App Export**
If possible - please attach an export of your budibase application for debugging/reproduction purposes.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]

View file

@ -108,7 +108,7 @@ RUN chmod +x install.sh && ./install.sh
WORKDIR /
ADD hosting/single/runner.sh .
RUN chmod +x ./runner.sh
ADD hosting/scripts/healthcheck.sh .
ADD hosting/single/healthcheck.sh .
RUN chmod +x ./healthcheck.sh
ADD hosting/scripts/build-target-paths.sh .

View file

@ -1,6 +1,10 @@
#!/usr/bin/env bash
healthy=true
if [ -f "/data/.env" ]; then
export $(cat /data/.env | xargs)
fi
if [[ $(curl -Lfk -s -w "%{http_code}\n" http://localhost/ -o /dev/null) -ne 200 ]]; then
echo 'ERROR: Budibase is not running';
healthy=false

View file

@ -1,5 +1,5 @@
{
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -20,7 +20,7 @@
"test:watch": "jest --watchAll"
},
"dependencies": {
"@budibase/types": "^1.1.18-alpha.4",
"@budibase/types": "^1.1.22-alpha.0",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
"@budibase/string-templates": "^1.1.18-alpha.4",
"@budibase/string-templates": "^1.1.22-alpha.0",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View file

@ -17,16 +17,15 @@ filterTests(['all'], () => {
it("should add form with multi select picker, containing 5 options", () => {
cy.navigateToFrontend()
// Add data provider
cy.get(interact.CATEGORY_DATA, { timeout: 500 }).click()
cy.get(interact.COMPONENT_DATA_PROVIDER).click()
cy.searchAndAddComponent("Data Provider")
cy.get(interact.DATASOURCE_PROP_CONTROL).click()
cy.get(interact.DROPDOWN).contains("Multi Data").click()
// Add Form with schema to match table
cy.addComponent("Form", "Form")
cy.searchAndAddComponent("Form")
cy.get(interact.DATASOURCE_PROP_CONTROL).click()
cy.get(interact.DROPDOWN).contains("Multi Data").click()
// Add multi-select picker to form
cy.addComponent("Form", "Multi-select Picker").then(componentId => {
cy.searchAndAddComponent("Multi-select Picker").then(componentId => {
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("Test Data").type("{enter}")
cy.wait(1000)
cy.getComponent(componentId).contains("Choose some options").click()

View file

@ -10,15 +10,13 @@ filterTests(['all'], () => {
it("should add Radio Buttons options picker on form, add data, and confirm", () => {
cy.navigateToFrontend()
cy.wait(500)
cy.addComponent("Form", "Form")
cy.addComponent("Form", "Options Picker").then((componentId) => {
// Provide field setting
cy.searchAndAddComponent("Form")
cy.searchAndAddComponent("Options Picker").then((componentId) => {
// Provide field setting
cy.get(interact.DATASOURCE_FIELD_CONTROL).type("1")
// Open dropdown and select Radio buttons
cy.get(interact.OPTION_TYPE_PROP_CONTROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Radio buttons')
.wait(500)
.click()
})
const radioButtonsTotal = 3
@ -32,8 +30,8 @@ filterTests(['all'], () => {
const addRadioButtonData = (totalRadioButtons) => {
cy.get(interact.OPTION_SOURCE_PROP_CONROL).click().then(() => {
cy.get(interact.SPECTRUM_POPOVER).contains('Custom')
.wait(500)
.click()
.wait(1000)
})
cy.addCustomSourceOptions(totalRadioButtons)
}

View file

@ -205,7 +205,7 @@ filterTests(["all"], () => {
cy.navigateToFrontend()
cy.addComponent("Elements", "Headline").then(componentId => {
cy.searchAndAddComponent("Headline").then(componentId => {
cy.getComponent(componentId).should("exist")
})

View file

@ -14,11 +14,8 @@ filterTests(['smoke', 'all'], () => {
cy.closeModal();
cy.contains("Design").click()
cy.get(interact.LABEL_ADD_CIRCLE).click()
cy.get(interact.SPECTRUM_MODAL).within(() => {
cy.get(interact.ITEM_DISABLED).contains("Autogenerated screens")
cy.get(interact.CONFIRM_WRAP_SPE_BUTTON).should('be.disabled')
})
cy.navigateToAutogeneratedModal()
cy.get(interact.CONFIRM_WRAP_SPE_BUTTON).should('be.disabled')
cy.deleteAllApps()
});
@ -45,25 +42,25 @@ filterTests(['smoke', 'all'], () => {
// Create Autogenerated screens from the internal table
cy.createDatasourceScreen(["Cypress Tests"])
// Confirm screens have been auto generated
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").click({ force: true })
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'cypress-tests/:id')
cy.get(interact.BODY).should('contain', "cypress-tests")
.and('contain', 'cypress-tests/:id')
.and('contain', 'cypress-tests/new/row')
})
it("should generate multiple internal table screens at once", () => {
// Create a second internal table
const initialTable = "Cypress Tests"
const secondTable = "Table Two"
// Create a second internal table
cy.createTable(secondTable)
// Create Autogenerated screens from the internal tables
cy.createDatasourceScreen([initialTable, secondTable])
// Confirm screens have been auto generated
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").click({ force: true })
// Previously generated tables are suffixed with numbers - as expected
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'cypress-tests-2/:id')
cy.get(interact.BODY).should('contain', 'cypress-tests-2')
.and('contain', 'cypress-tests-2/:id')
.and('contain', 'cypress-tests-2/new/row')
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-two").click()
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-two/:id')
.and('contain', 'table-two')
.and('contain', 'table-two/:id')
.and('contain', 'table-two/new/row')
})
@ -73,17 +70,17 @@ filterTests(['smoke', 'all'], () => {
cy.createTable("Table Four")
cy.createDatasourceScreen(["Table Three", "Table Four"], "Admin")
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-three").click()
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-three/:id')
// Filter screens to Admin
cy.filterScreensAccessLevel('Admin')
cy.get(interact.BODY).should('contain', 'table-three')
.and('contain', 'table-three/:id')
.and('contain', 'table-three/new/row')
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-four").click()
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'table-four/:id')
.and('contain', 'table-four')
.and('contain', 'table-four/:id')
.and('contain', 'table-four/new/row')
//The access level should now be set to admin. Previous screens should be filtered.
cy.get(interact.NAV_ITEMS_CONTAINER).contains("table-two").should('not.exist')
cy.get(interact.NAV_ITEMS_CONTAINER).contains("cypress-tests").should('not.exist')
.and('not.contain', 'table-two')
.and('not.contain', 'cypress-tests')
})
if (Cypress.env("TEST_ENV")) {
@ -96,8 +93,8 @@ filterTests(['smoke', 'all'], () => {
// Create Autogenerated screens from a MySQL table - MySQL contains books table
cy.createDatasourceScreen(["books"])
cy.get(interact.NAV_ITEMS_CONTAINER).contains("books").click()
cy.get(interact.NAV_ITEMS_CONTAINER).should('contain', 'books/:id')
cy.get(interact.BODY).should('contain', 'books')
.and('contain', 'books/:id')
.and('contain', 'books/new/row')
})
}

View file

@ -13,7 +13,7 @@ filterTests(['smoke', 'all'], () => {
it("should show the new user UI/UX", () => {
cy.visit(`${Cypress.config().baseUrl}/builder/portal/apps/create`, { timeout: 5000 }) //added /portal/apps/create
cy.wait(1000)
cy.get(interact.CREATE_APP_BUTTON).contains('Start from scratch').should("exist")
cy.get(interact.CREATE_APP_BUTTON, { timeout: 10000 }).contains('Start from scratch').should("exist")
cy.get(interact.TEMPLATE_CATEGORY_FILTER).should("exist")
cy.get(interact.TEMPLATE_CATEGORY).should("exist")

View file

@ -9,13 +9,13 @@ filterTests(['smoke', 'all'], () => {
})
it("should add a current user binding", () => {
cy.addComponent("Elements", "Paragraph").then(() => {
cy.searchAndAddComponent("Paragraph").then(() => {
addSettingBinding("text", "Current User._id")
})
})
it("should handle an invalid binding", () => {
cy.addComponent("Elements", "Paragraph").then(componentId => {
cy.searchAndAddComponent("Paragraph").then(componentId => {
// Cypress needs to escape curly brackets
cy.get("[data-cy=setting-text] input")
.type("{{}{{}{{} Current User._id {}}{}}")
@ -27,7 +27,7 @@ filterTests(['smoke', 'all'], () => {
xit("should add a URL param binding", () => {
const paramName = "foo"
cy.createScreen(`/test/:${paramName}`)
cy.addComponent("Elements", "Paragraph").then(componentId => {
cy.searchAndAddComponent("Paragraph").then(componentId => {
addSettingBinding("text", `URL.${paramName}`)
// The builder preview pages don't have a real URL, so all we can do
// is check that we were able to bind to the property, and that the
@ -37,7 +37,7 @@ filterTests(['smoke', 'all'], () => {
})
it("should add a binding with a handlebars helper", () => {
cy.addComponent("Elements", "Paragraph").then(componentId => {
cy.searchAndAddComponent("Paragraph").then(componentId => {
// Cypress needs to escape curly brackets
cy.get("[data-cy=setting-text] input")
.type("{{}{{} add 1 2 {}}{}}")

View file

@ -31,13 +31,13 @@ filterTests(["all"], () => {
}
it("should add a container", () => {
cy.addComponent("Layout", "Container").then(componentId => {
cy.searchAndAddComponent("Container").then(componentId => {
cy.getComponent(componentId).should("exist")
})
})
it("should add a headline", () => {
cy.addComponent("Elements", "Headline").then(componentId => {
cy.searchAndAddComponent("Headline").then(componentId => {
headlineId = componentId
cy.getComponent(headlineId).should("exist")
})
@ -63,11 +63,11 @@ filterTests(["all"], () => {
})
it("should create a form and reset to match schema", () => {
cy.addComponent("Form", "Form").then(() => {
cy.searchAndAddComponent("Form").then(() => {
cy.get("[data-cy=setting-dataSource]").contains("Custom").click()
cy.get(interact.DROPDOWN).contains("dog").click()
cy.wait(500)
cy.addComponent("Form", "Field Group").then(fieldGroupId => {
cy.searchAndAddComponent("Field Group").then(fieldGroupId => {
cy.contains("Update form fields").click()
cy.get(".spectrum-Modal")
.get(".confirm-wrap .spectrum-Button")
@ -88,7 +88,7 @@ filterTests(["all"], () => {
})
it("deletes a component", () => {
cy.addComponent("Elements", "Paragraph").then(componentId => {
cy.searchAndAddComponent("Paragraph").then(componentId => {
cy.get("[data-cy=setting-_instanceName] input").type(componentId).blur()
cy.get(
".nav-items-container .nav-item.selected .actions > div > .icon"
@ -104,7 +104,7 @@ filterTests(["all"], () => {
})
it("should clear the iframe place holder when a form field has been set", () => {
cy.addComponent("Form", "Form").then(formId => {
cy.searchAndAddComponent("Form").then(formId => {
//For deletion
cy.get("[data-cy=setting-_instanceName] input")
.clear()
@ -123,10 +123,7 @@ filterTests(["all"], () => {
const testFieldFocusOnCreate = componentLabel => {
cy.log("Adding: " + componentLabel)
return cy.addComponent("Form", componentLabel).then(componentId => {
cy.getComponent(componentId)
.find(".component-placeholder")
.should("exist")
return cy.searchAndAddComponent(componentLabel).then(componentId => {
cy.get("[data-cy=setting-field] button.spectrum-Picker").click()
//Click the first appropriate field. They are filtered by type
@ -157,7 +154,7 @@ filterTests(["all"], () => {
})
it("should populate the provider for charts with a data provider in its path", () => {
cy.addComponent("Data", "Data Provider").then(providerId => {
cy.searchAndAddComponent("Data Provider").then(providerId => {
//For deletion
cy.get("[data-cy=setting-_instanceName] input")
.clear()
@ -181,7 +178,7 @@ filterTests(["all"], () => {
const testFocusOnCreate = chartLabel => {
cy.log("Adding: " + chartLabel)
cy.addComponent("Chart", chartLabel).then(componentId => {
cy.searchAndAddComponent(chartLabel).then(componentId => {
cy.get(
"[data-cy=dataProvider-prop-control] .spectrum-Picker"
).should("not.have.class", "is-focused")
@ -207,7 +204,7 @@ filterTests(["all"], () => {
})
it("should replace the placeholder when a url is set on an image", () => {
cy.addComponent("Elements", "Image").then(imageId => {
cy.searchAndAddComponent("Image").then(imageId => {
cy.get("[data-cy=setting-_instanceName] input")
.clear()
.type(imageId)
@ -229,7 +226,7 @@ filterTests(["all"], () => {
})
it("should add a markdown component.", () => {
cy.addComponent("Elements", "Markdown Viewer").then(markdownId => {
cy.searchAndAddComponent("Markdown Viewer").then(markdownId => {
cy.get("[data-cy=setting-_instanceName] input")
.clear()
.type(markdownId)
@ -253,8 +250,7 @@ filterTests(["all"], () => {
})
it("should direct the user when adding an Icon component.", () => {
cy.addComponent("Elements", "Icon").then(iconId => {
cy.getComponent(iconId).find(".component-placeholder").should("exist")
cy.searchAndAddComponent("Icon").then(iconId => {
cy.get("[data-cy=setting-_instanceName] input")
.clear()
.type(iconId)

View file

@ -1,4 +1,5 @@
import filterTests from "../support/filterTests"
const interact = require('../support/interact')
filterTests(["smoke", "all"], () => {
context("Screen Tests", () => {
@ -10,32 +11,44 @@ filterTests(["smoke", "all"], () => {
it("Should successfully create a screen", () => {
cy.createScreen("test")
cy.get(".nav-items-container").within(() => {
cy.get(interact.BODY).within(() => {
cy.contains("/test").should("exist")
})
})
it("Should update the url", () => {
cy.createScreen("test with spaces")
cy.get(".nav-items-container").within(() => {
cy.get(interact.BODY).within(() => {
cy.contains("/test-with-spaces").should("exist")
})
})
it("Should create a blank screen with the selected access level", () => {
cy.createScreen("admin only", "Admin")
it("should delete all screens then create first screen via button", () => {
cy.deleteAllScreens()
cy.contains("Create first screen").click()
cy.get(interact.BODY, { timeout: 2000 }).should('contain', '/home')
})
cy.get(".nav-items-container").within(() => {
cy.contains("/admin-only").should("exist")
})
it("Should create and filter screens by access level", () => {
const accessLevels = ["Basic", "Admin", "Public", "Power"]
cy.createScreen("open to all", "Public")
for (const access of accessLevels){
// Create screen with specified access level
cy.createScreen(access, access)
// Filter by access level and confirm screen visible
cy.filterScreensAccessLevel(access)
cy.get(interact.BODY).within(() => {
cy.get(interact.NAV_ITEM).should('contain', access.toLowerCase())
})
}
cy.get(".nav-items-container").within(() => {
cy.contains("/open-to-all").should("exist")
//The access level should now be set to admin. Previous screens should be filtered.
cy.get(".nav-item").contains("/test-screen").should("not.exist")
})
// Filter by All screens - Confirm all screens visible
cy.filterScreensAccessLevel("All screens")
cy.get(interact.BODY).should('contain', accessLevels[0])
.and('contain', accessLevels[1])
.and('contain', accessLevels[2])
.and('contain', accessLevels[3])
})
})
})

View file

@ -108,7 +108,7 @@ filterTests(["all"], () => {
})
it("should delete a relationship", () => {
cy.get(".hierarchy-items-container").contains("PostgreSQL").click()
cy.get(".hierarchy-items-container").contains("PostgreSQL").click({ force: true })
cy.reload()
// Delete one relationship
cy.get(".spectrum-Table")
@ -156,7 +156,7 @@ filterTests(["all"], () => {
it("should switch to schema with no tables", () => {
// Switch Schema - To one without any tables
cy.get(".hierarchy-items-container").contains("PostgreSQL").click()
cy.get(".hierarchy-items-container").contains("PostgreSQL").click({ force: true })
switchSchema("randomText")
// No tables displayed
@ -219,7 +219,7 @@ filterTests(["all"], () => {
// Access query
cy.get(".hierarchy-items-container", { timeout: 2000 })
.contains(queryName + " (1)")
.click()
.click({ force: true })
// Rename query
cy.wait(1000)

View file

@ -30,7 +30,7 @@ filterTests(['smoke', 'all'], () => {
cy.navigateToFrontend()
// Add initial component - Paragraph
cy.addComponent("Elements", "Paragraph")
cy.searchAndAddComponent("Paragraph")
// Publish app
cy.get(interact.SPECTRUM_BUTTON).contains("Publish").click({ force: true })
cy.get(interact.SPECTRUM_BUTTON_GROUP).within(() => {
@ -42,7 +42,7 @@ filterTests(['smoke', 'all'], () => {
})
// Add second component - Button
cy.addComponent("Elements", "Button")
cy.searchAndAddComponent("Button")
// Click Revert
cy.get(interact.TOP_RIGHT_NAV).within(() => {
cy.get(interact.AREA_LABEL_REVERT).click({ force: true })

View file

@ -4,7 +4,7 @@ Cypress.on("uncaught:exception", () => {
// ACCOUNTS & USERS
Cypress.Commands.add("login", (email, password) => {
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 })
cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 })
cy.wait(2000)
cy.url().then(url => {
if (url.includes("builder/admin")) {
@ -210,7 +210,7 @@ Cypress.Commands.add("deleteApp", name => {
cy.get(".app-overview-actions-icon").within(() => {
cy.get(".spectrum-Icon").click({ force: true })
})
cy.get(".spectrum-Menu").contains("Delete").click()
cy.get(".spectrum-Menu").contains("Delete").click({ force: true })
cy.get(".spectrum-Dialog-grid").within(() => {
cy.get("input").type(name)
})
@ -491,26 +491,44 @@ Cypress.Commands.add("selectTable", tableName => {
})
Cypress.Commands.add("addCustomSourceOptions", totalOptions => {
cy.get(".spectrum-ActionButton")
.contains("Define Options")
.click()
.then(() => {
for (let i = 0; i < totalOptions; i++) {
// Add radio button options
cy.get(".spectrum-Button")
.contains("Add Option")
.click({ force: true })
.then(() => {
cy.get("[placeholder='Label']", { timeout: 500 }).eq(i).type(i)
cy.get("[placeholder='Value']").eq(i).type(i)
})
}
// Save options
cy.get(".spectrum-Button").contains("Save").click({ force: true })
})
cy.get('[data-cy="customOptions-prop-control"]').within(() => {
cy.get(".spectrum-ActionButton-label").click({ force: true })
})
for (let i = 0; i < totalOptions; i++) {
// Add radio button options
cy.get(".spectrum-Button-label", { timeout: 1000 })
.contains("Add Option")
.click({ force: true })
.then(() => {
cy.get("[placeholder='Label']", { timeout: 500 }).eq(i).type(i)
cy.get("[placeholder='Value']").eq(i).type(i)
})
}
// Save options
cy.get(".spectrum-Button").contains("Save").click({ force: true })
})
// DESIGN SECTION
Cypress.Commands.add("searchAndAddComponent", component => {
// Open component menu
cy.get(".spectrum-Button").contains("Component").click({ force: true })
// Search and add component
cy.get(".spectrum-Textfield-input").wait(500).clear().type(component)
cy.get(".body").within(() => {
cy.get(".component")
.contains(new RegExp("^" + component + "$"), { timeout: 3000 })
.click({ force: true })
})
cy.wait(1000)
cy.location().then(loc => {
const params = loc.pathname.split("/")
const componentId = params[params.length - 1]
cy.getComponent(componentId, { timeout: 3000 }).should("exist")
return cy.wrap(componentId)
})
})
// DESIGN AREA
Cypress.Commands.add("addComponent", (category, component) => {
if (category) {
cy.get(`[data-cy="category-${category}"]`, { timeout: 3000 }).click({
@ -546,7 +564,7 @@ Cypress.Commands.add("getComponent", componentId => {
Cypress.Commands.add("createScreen", (route, accessLevelLabel) => {
// Blank Screen
cy.contains("Design").click()
cy.get("[aria-label=AddCircle]").click()
cy.get(".header > .add-button").click()
cy.get(".spectrum-Modal").within(() => {
cy.get("[data-cy='blank-screen']").click()
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
@ -571,7 +589,7 @@ Cypress.Commands.add(
"createDatasourceScreen",
(datasourceNames, accessLevelLabel) => {
cy.contains("Design").click()
cy.get("[aria-label=AddCircle]").click()
cy.get(".header > .add-button").click()
cy.get(".spectrum-Modal").within(() => {
cy.get(".item").contains("Autogenerated screens").click()
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
@ -626,13 +644,60 @@ Cypress.Commands.add(
}
)
Cypress.Commands.add("filterScreensAccessLevel", accessLevel => {
// Filters screens by access level dropdown
cy.get(".body").within(() => {
cy.get(".spectrum-Form-item").eq(1).click()
})
cy.get(".spectrum-Menu").within(() => {
cy.contains(accessLevel).click()
})
})
Cypress.Commands.add("deleteScreen", screen => {
// Navigates to Design section and deletes specified screen
cy.contains("Design").click()
cy.get(".body").within(() => {
cy.contains(screen)
.siblings(".actions")
.within(() => {
cy.get(".spectrum-Icon").click({ force: true })
})
})
cy.get(".spectrum-Menu > .spectrum-Menu-item > .spectrum-Menu-itemLabel")
.contains("Delete")
.click()
cy.get(
".spectrum-Dialog-grid > .spectrum-ButtonGroup > .confirm-wrap > .spectrum-Button"
).click({ force: true })
cy.get(".spectrum-Dialog-grid", { timeout: 10000 }).should("not.exist")
})
Cypress.Commands.add("deleteAllScreens", () => {
// Deletes all screens
cy.get(".body")
.find(".nav-item")
.its("length")
.then(len => {
for (let i = 0; i < len; i++) {
cy.get(".body > .nav-item")
.eq(0)
.invoke("text")
.then(text => {
cy.deleteScreen(text.trim())
})
}
})
})
// NAVIGATION
Cypress.Commands.add("navigateToFrontend", () => {
// Clicks on Design tab and then the Home nav item
cy.wait(500)
cy.contains("Design").click()
cy.get(".spectrum-Search", { timeout: 2000 }).type("/")
cy.get(".nav-item", { timeout: 2000 }).contains("home").click()
cy.get(".nav-item", { timeout: 2000 }).contains("home").click({ force: true })
})
Cypress.Commands.add("navigateToDataSection", () => {
@ -644,9 +709,11 @@ Cypress.Commands.add("navigateToDataSection", () => {
Cypress.Commands.add("navigateToAutogeneratedModal", () => {
// Screen name must already exist within data source
cy.contains("Design").click()
cy.get("[aria-label=AddCircle]").click()
cy.get(".header > .add-button").click()
cy.get(".spectrum-Modal").within(() => {
cy.get(".item").contains("Autogenerated screens").click()
cy.get(".item", { timeout: 2000 })
.contains("Autogenerated screens")
.click({ force: true })
cy.get(".spectrum-Button").contains("Continue").click({ force: true })
cy.wait(500)
})

View file

@ -12,7 +12,7 @@ export const APP_NAME_INPUT = "input" // we need to update this with atribute cy
export const SPECTRUM_BUTTON_GROUP = ".spectrum-ButtonGroup"
export const SPECTRUM_MODAL_INPUT = ".spectrum-Modal input"
//AddMultiOptionDatatype test
//AddMultiOptionDatatype
export const CATEGORY_DATA = '[data-cy="category-Data"]'
export const COMPONENT_DATA_PROVIDER = '[data-cy="component-Data Provider"]'
export const DATASOURCE_PROP_CONTROL = '[data-cy="dataSource-prop-control"]'
@ -51,7 +51,7 @@ export const LABEL_ADD_CIRCLE = "[aria-label=AddCircle]"
export const ITEM_DISABLED = ".item.disabled"
export const CONFIRM_WRAP_SPE_BUTTON = ".confirm-wrap .spectrum-Button"
export const DATA_SOURCE_ENTRY = ".data-source-entry"
export const NAV_ITEMS_CONTAINER = ".nav-items-container"
export const BODY = ".body"
//publishWorkFlow
export const DEPLOY_APP_MODAL = ".spectrum-Modal [data-cy=deploy-app-modal]"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -69,10 +69,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^1.1.18-alpha.4",
"@budibase/client": "^1.1.18-alpha.4",
"@budibase/frontend-core": "^1.1.18-alpha.4",
"@budibase/string-templates": "^1.1.18-alpha.4",
"@budibase/bbui": "^1.1.22-alpha.0",
"@budibase/client": "^1.1.22-alpha.0",
"@budibase/frontend-core": "^1.1.22-alpha.0",
"@budibase/string-templates": "^1.1.22-alpha.0",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View file

@ -58,7 +58,7 @@
thin
disabled={bindable}
on:change={evt => onBindingChange(binding.name, evt.detail)}
value={runtimeToReadableBinding(bindings, binding.default)}
bind:value={binding.default}
/>
{#if bindable}
<DrawerBindableInput

View file

@ -16,7 +16,7 @@
// Get root li element
const el = document.getElementById(`component-${component?._id}`)
// Get inner nav item content element
const child = el?.childNodes[0]?.childNodes[0]
const child = el?.children[0]?.children[0]
if (!el) {
return
}

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
@ -26,7 +26,7 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "^1.1.18-alpha.4",
"@budibase/backend-core": "^1.1.22-alpha.0",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "^1.1.18-alpha.4",
"@budibase/frontend-core": "^1.1.18-alpha.4",
"@budibase/string-templates": "^1.1.18-alpha.4",
"@budibase/bbui": "^1.1.22-alpha.0",
"@budibase/frontend-core": "^1.1.22-alpha.0",
"@budibase/string-templates": "^1.1.22-alpha.0",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View file

@ -401,7 +401,7 @@
}
const scrollIntoView = () => {
const node = document.getElementsByClassName(id)?.[0]?.childNodes[0]
const node = document.getElementsByClassName(id)?.[0]?.children[0]
if (!node) {
return
}

View file

@ -35,8 +35,8 @@
const getDOMNodeForComponent = component => {
const parent = component.closest(".component")
const children = Array.from(parent.childNodes)
return children?.find(node => node?.nodeType === 1)
const children = Array.from(parent.children)
return children[0]
}
// Callback when initially starting a drag on a draggable component

View file

@ -71,8 +71,7 @@
// Extract valid children
// Sanity limit of 100 active indicators
const children = Array.from(parents)
.map(parent => parent?.childNodes?.[0])
.filter(node => node?.nodeType === 1)
.map(parent => parent?.children?.[0])
.slice(0, 100)
// If there aren't any nodes then reset

View file

@ -37,7 +37,7 @@
}
const id = $builderStore.selectedComponentId
const parent = document.getElementsByClassName(id)?.[0]
const element = parent?.childNodes?.[0]
const element = parent?.children?.[0]
// The settings bar is higher in the dom tree than the selection indicators
// as we want to be able to render the settings bar wider than the screen,

View file

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "^1.1.18-alpha.4",
"@budibase/bbui": "^1.1.22-alpha.0",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "^1.1.18-alpha.4",
"@budibase/client": "^1.1.18-alpha.4",
"@budibase/pro": "1.1.18-alpha.4",
"@budibase/string-templates": "^1.1.18-alpha.4",
"@budibase/types": "^1.1.18-alpha.4",
"@budibase/backend-core": "^1.1.22-alpha.0",
"@budibase/client": "^1.1.22-alpha.0",
"@budibase/pro": "1.1.22-alpha.0",
"@budibase/string-templates": "^1.1.22-alpha.0",
"@budibase/types": "^1.1.22-alpha.0",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View file

@ -1,5 +1,5 @@
const { getAllApps } = require("@budibase/backend-core/db")
const { updateAppId } = require("@budibase/backend-core/context")
const { doInAppContext } = require("@budibase/backend-core/context")
import { search as stringSearch, addRev } from "./utils"
import * as controller from "../application"
import { Application } from "../../../definitions/common"
@ -41,28 +41,31 @@ export async function create(ctx: any, next: any) {
}
export async function read(ctx: any, next: any) {
updateAppId(ctx.params.appId)
await setResponseApp(ctx)
await next()
await doInAppContext(ctx.params.appId, async () => {
await setResponseApp(ctx)
await next()
})
}
export async function update(ctx: any, next: any) {
ctx.request.body = await addRev(fixAppID(ctx.request.body, ctx.params))
updateAppId(ctx.params.appId)
await controller.update(ctx)
await setResponseApp(ctx)
await next()
await doInAppContext(ctx.params.appId, async () => {
await controller.update(ctx)
await setResponseApp(ctx)
await next()
})
}
export async function destroy(ctx: any, next: any) {
updateAppId(ctx.params.appId)
// get the app before deleting it
await setResponseApp(ctx)
const body = ctx.body
await controller.destroy(ctx)
// overwrite the body again
ctx.body = body
await next()
await doInAppContext(ctx.params.appId, async () => {
// get the app before deleting it
await setResponseApp(ctx)
const body = ctx.body
await controller.destroy(ctx)
// overwrite the body again
ctx.body = body
await next()
})
}
export default {

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.1.18-alpha.4",
"version": "1.1.22-alpha.0",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -35,10 +35,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "^1.1.18-alpha.4",
"@budibase/pro": "1.1.18-alpha.4",
"@budibase/string-templates": "^1.1.18-alpha.4",
"@budibase/types": "^1.1.18-alpha.4",
"@budibase/backend-core": "^1.1.22-alpha.0",
"@budibase/pro": "1.1.22-alpha.0",
"@budibase/string-templates": "^1.1.22-alpha.0",
"@budibase/types": "^1.1.22-alpha.0",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View file

@ -291,12 +291,21 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
<<<<<<< HEAD
"@budibase/backend-core@1.1.18-alpha.0":
version "1.1.18-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.18-alpha.0.tgz#1b946ceccb798f3641fa35f11b2dda3ae0239d7a"
integrity sha512-dpRmrcjs63tmljlfKZABhjV9E9GqmFaiCa7+wyobgB90TPfs3RVJD1lxk4R15jjTEUn/G518cK05+xZhTVi7TQ==
dependencies:
"@budibase/types" "^1.1.18-alpha.0"
=======
"@budibase/backend-core@1.1.21":
version "1.1.21"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.1.21.tgz#660e0023f674189b25ca5eabbaff67aebcdf03b8"
integrity sha512-qEf9ggMX6NpVOTe1xfp6NZnbdBV0h0ls9qGGTcMjPakhatB4+3YKSTEDSYYRzY/OLNoKPhcd3aErXuFRR7WKrg==
dependencies:
"@budibase/types" "^1.1.21"
>>>>>>> origin/develop
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
@ -324,6 +333,7 @@
uuid "8.3.2"
zlib "1.0.5"
<<<<<<< HEAD
"@budibase/pro@1.1.18-alpha.0":
version "1.1.18-alpha.0"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.18-alpha.0.tgz#b0e6c2bec10139373e3c02be7ed239adc34e53a9"
@ -342,6 +352,21 @@
version "1.1.19"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.19.tgz#770b83f971e3e949a43b7d3564cbaed4462dd834"
integrity sha512-rFGe/RvcpV40CJ6Ng3RZSqj07GFAlzDyo116o/jQIskOew/SfBrIPaENEqk0wFPVL2pcZMpySXHNa86asqmUiw==
=======
"@budibase/pro@1.1.21":
version "1.1.21"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.1.21.tgz#c9d21bc82740e9407673088dc8451273368943d9"
integrity sha512-aE20qZmVg/sPp4bV++xwdUnp8+c9wq7Df34P9hYvlhklgh+fxd+2RyautOAfMADRMIZIbtP4/gal95bE/KTPNQ==
dependencies:
"@budibase/backend-core" "1.1.21"
"@budibase/types" "1.1.21"
node-fetch "^2.6.1"
"@budibase/types@1.1.21", "@budibase/types@^1.1.21":
version "1.1.21"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.1.21.tgz#4f46cd52f3e52c804e5dba06b0520825da81f84e"
integrity sha512-fR8783evr6SKZggu/QZRgcZfd8SAuG2U+xO8lL0x/pLNZI1vOeTyQXASoPLLzj6uA8bWnPIy8BGd9PK4Mw3XVQ==
>>>>>>> origin/develop
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"