From d166ac805e7446cbddbb15633adb238cafb94f3b Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Thu, 5 May 2022 14:26:21 +0100 Subject: [PATCH 1/5] Job Application Tracker Template Tests 2 more tests associated with the Job Application Tracker template - Add active/inactive vacancies - Filter applications by stage Tests utilise pre-populated data already associated with the template --- .../HR/jobApplicationTracker.spec.js | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js index 091cf1253e..0c6a66f018 100644 --- a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js +++ b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js @@ -57,5 +57,123 @@ 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') + } + }) + + it("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 }) + }) + } + }) + }) }) }) From 214b7f2612321bdb763de55913cfdd587abef90d Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Thu, 5 May 2022 17:32:16 +0100 Subject: [PATCH 2/5] More Job Application Tracker Template Tests Edit an application - Change application from not hired to hired - Confirm relative sections update Delete an application - Currently skipped as there seems to be an issue with deleting an application within the template --- .../HR/jobApplicationTracker.spec.js | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js index 0c6a66f018..531630aea6 100644 --- a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js +++ b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js @@ -175,5 +175,65 @@ filterTests(["all"], () => { } }) }) + + it("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() + }) + }) }) }) From 449ee80031ecd6b4588f031f4b86d0ab759cdc84 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Fri, 6 May 2022 13:18:10 +0100 Subject: [PATCH 3/5] Skipping 2 Job Application Tracker tests The tests are - Filter application by stage - Edit application The template functionality seems to differ between test env, CI, etc. Skipping these tests for now while i debug, and leaving the passing tests in --- .../integration/templates/HR/jobApplicationTracker.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js index 531630aea6..efb9e58c75 100644 --- a/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js +++ b/packages/builder/cypress/integration/templates/HR/jobApplicationTracker.spec.js @@ -148,7 +148,7 @@ filterTests(["all"], () => { } }) - it("should filter applications by stage", () => { + xit("should filter applications by stage", () => { // Visit published app cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) cy.wait(1000) @@ -176,7 +176,7 @@ filterTests(["all"], () => { }) }) - it("should edit an application", () => { + xit("should edit an application", () => { // Switch application from not hired to hired // Visit published app cy.visit(`${Cypress.config().baseUrl}/app/` + templateNameParsed) From aa1de9af959d25dd7589f99db052c5d77f4ea527 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 9 May 2022 09:24:06 +0000 Subject: [PATCH 4/5] v1.0.143-alpha.2 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 24 insertions(+), 24 deletions(-) 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/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..d229d2cc41 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/backend-core": "^1.0.143-alpha.2", + "@budibase/client": "^1.0.143-alpha.2", "@budibase/pro": "1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@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..322119a09a 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/backend-core": "^1.0.143-alpha.2", "@budibase/pro": "1.0.143-alpha.1", - "@budibase/string-templates": "^1.0.143-alpha.1", + "@budibase/string-templates": "^1.0.143-alpha.2", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0", From cf78ccd6b51208bb48482ee22d906b13a32cc5a8 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 9 May 2022 09:25:47 +0000 Subject: [PATCH 5/5] Update pro version to 1.0.143-alpha.2 --- packages/server/package.json | 2 +- packages/worker/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index d229d2cc41..8ed5c5168b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -70,7 +70,7 @@ "@apidevtools/swagger-parser": "^10.0.3", "@budibase/backend-core": "^1.0.143-alpha.2", "@budibase/client": "^1.0.143-alpha.2", - "@budibase/pro": "1.0.143-alpha.1", + "@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", diff --git a/packages/worker/package.json b/packages/worker/package.json index 322119a09a..19e419bc7f 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -32,7 +32,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "^1.0.143-alpha.2", - "@budibase/pro": "1.0.143-alpha.1", + "@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",