diff --git a/lerna.json b/lerna.json index 319ea561a1..b373661fa5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 3a06793939..65f376e216 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 0cc3b70378..515595dbd2 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "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.0.143-alpha.1", + "@budibase/string-templates": "^1.0.143-alpha.2", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js index 091cf1253e..efb9e58c75 100644 --- a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js +++ b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js @@ -57,5 +57,183 @@ filterTests(["all"], () => { cy.window().its('open').should('be.calledOnce') }) }) + + it("should add active/inactive vacancies", () => { + // Visit published app + cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) + + // loop for active/inactive vacancies + for (let i = 0; i < 2; i++) { + // Vacancies section + cy.get(".links").contains("Vacancies").click({ force: true }) + cy.get(".spectrum-Button").contains("Create New").click() + + // Add inactive vacancy + // Title + cy.get('[data-name="Title"]').within(() => { + cy.get(".spectrum-Textfield").type("Tester") + }) + + // Closing Date + cy.get('[data-name="Closing date"]').within(() => { + cy.get('[aria-label=Calendar]').click({ force: true }) + }) + cy.get("[aria-current=date]").click() + + // Department + cy.get('[data-name="Department"]').within(() => { + cy.get(".spectrum-Picker-label").click() + }) + cy.get(".spectrum-Menu").find('li').its('length').then(len => { + cy.get(".spectrum-Menu-item").eq(Math.floor(Math.random() * len)).click() + }) + + // Employment Type + cy.get('[data-name="Employment type"]').within(() => { + cy.get(".spectrum-Picker-label").click() + }) + cy.get(".spectrum-Menu").find('li').its('length').then(len => { + cy.get(".spectrum-Menu-item").eq(Math.floor(Math.random() * len)).click() + }) + + // Salary + cy.get('[data-name="Salary ($)"]').within(() => { + cy.get(".spectrum-Textfield").type(40000) + }) + + // Description + cy.get('[data-name="Description"]').within(() => { + cy.get(".spectrum-Textfield").type("description") + }) + + // Responsibilities + cy.get('[data-name="Responsibilities"]').within(() => { + cy.get(".spectrum-Textfield").type("Responsibilities") + }) + + // Requirements + cy.get('[data-name="Requirements"]').within(() => { + cy.get(".spectrum-Textfield").type("Requirements") + }) + + // Hiring manager + cy.get('[data-name="Hiring manager"]').within(() => { + cy.get(".spectrum-Picker-label").click() + }) + cy.get(".spectrum-Menu").find('li').its('length').then(len => { + cy.get(".spectrum-Menu-item").eq(Math.floor(Math.random() * len)).click() + }) + + // Active + if (i == 0) { + cy.get('[data-name="Active"]').within(() => { + cy.get(".spectrum-Checkbox-box").click({ force: true }) + }) + } + + // Location + cy.get('[data-name="Location"]').within(() => { + cy.get(".spectrum-Picker-label").click() + }) + cy.get(".spectrum-Menu").find('li').its('length').then(len => { + cy.get(".spectrum-Menu-item").eq(Math.floor(Math.random() * len)).click() + }) + + // Save vacancy + cy.get(".spectrum-Button").contains("Save").click({ force: true }) + cy.wait(1000) + + // Check table was updated + cy.get('[data-name="Vacancies Table"]').eq(i).should('contain', 'Tester') + } + }) + + xit("should filter applications by stage", () => { + // Visit published app + cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) + cy.wait(1000) + + // Applications section + cy.get(".links").contains("Applications").click({ force: true }) + cy.wait(1000) + + // Filter by stage - Confirm table updates + cy.get(".spectrum-Picker").contains("Filter by stage").click({ force: true }) + cy.get(".spectrum-Menu").find('li').its('length').then(len => { + for (let i = 1; i < len; i++) { + cy.get(".spectrum-Menu-item").eq(i).click() + const stage = cy.get(".spectrum-Picker-label") + stage.invoke('text').then(stageText => { + if (stageText == "1st interview") { + cy.get(".placeholder").should('contain', 'No rows found') + } + else { + cy.get(".spectrum-Table-row").should('contain', stageText) + } + cy.get(".spectrum-Picker").contains(stageText).click({ force: true }) + }) + } + }) + }) + + xit("should edit an application", () => { + // Switch application from not hired to hired + // Visit published app + cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) + cy.wait(1000) + + // Not Hired section + cy.get(".links").contains("Not hired").click({ force: true }) + cy.wait(500) + + // View application + cy.get(".spectrum-Table").within(() => { + cy.get(".spectrum-Button").contains("View").click({ force: true }) + cy.wait(500) + }) + + // Update value for 'Staged' + cy.get('[data-name="Stage"]').within(() => { + cy.get(".spectrum-Picker-label").click() + }) + cy.get(".spectrum-Menu").within(() => { + cy.get(".spectrum-Menu-item").contains("Hired").click() + }) + + // Save application + cy.get(".spectrum-Button").contains("Save").click({ force: true }) + cy.wait(500) + + // Hired section + cy.get(".links").contains("Hired").click({ force: true }) + cy.wait(500) + + // Verify Table size - Total rows = 2 + cy.get(".spectrum-Table").find(".spectrum-Table-row").its('length').then((len => { + expect(len).to.eq(2) + })) + }) + + xit("should delete an application", () => { + // Visit published app + cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) + cy.wait(1000) + + // Hired section + cy.get(".links").contains("Hired").click({ force: true }) + cy.wait(500) + + // View first application + cy.get(".spectrum-Table-row").eq(0).within(() => { + cy.get(".spectrum-Button").contains("View").click({ force: true }) + cy.wait(500) + }) + + // Delete application + cy.get(".spectrum-Button").contains("Delete").click({ force: true }) + cy.get(".spectrum-Dialog-grid").within(() => { + cy.get(".spectrum-Button").contains("Confirm").click() + }) + }) }) }) diff --git a/packages/builder/package.json b/packages/builder/package.json index c9e1e12019..230da9e7c8 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -67,10 +67,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.143-alpha.1", - "@budibase/client": "^1.0.143-alpha.1", - "@budibase/frontend-core": "^1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@budibase/bbui": "^1.0.143-alpha.2", + "@budibase/client": "^1.0.143-alpha.2", + "@budibase/frontend-core": "^1.0.143-alpha.2", + "@budibase/string-templates": "^1.0.143-alpha.2", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 081304fed1..2aa370516b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index aa3da23beb..8ede3d9f0e 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "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.0.143-alpha.1", - "@budibase/frontend-core": "^1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@budibase/bbui": "^1.0.143-alpha.2", + "@budibase/frontend-core": "^1.0.143-alpha.2", + "@budibase/string-templates": "^1.0.143-alpha.2", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index ce3448bd79..5fda245283 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.143-alpha.1", + "@budibase/bbui": "^1.0.143-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index feb124ea52..8ed5c5168b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -68,10 +68,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.143-alpha.1", - "@budibase/client": "^1.0.143-alpha.1", - "@budibase/pro": "1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@budibase/backend-core": "^1.0.143-alpha.2", + "@budibase/client": "^1.0.143-alpha.2", + "@budibase/pro": "1.0.143-alpha.2", + "@budibase/string-templates": "^1.0.143-alpha.2", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 6e436a63d5..17c0cde2f3 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 13d9a75cbc..19e419bc7f 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.143-alpha.1", + "version": "1.0.143-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.143-alpha.1", - "@budibase/pro": "1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@budibase/backend-core": "^1.0.143-alpha.2", + "@budibase/pro": "1.0.143-alpha.2", + "@budibase/string-templates": "^1.0.143-alpha.2", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0",