Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
deb4e3a
Jest cleanup (#601)
droberts-ctrlo Feb 4, 2026
c2ecadb
Js formatting (#612)
droberts-ctrlo Apr 29, 2026
8acafc6
Added JSDocs (squashed from DR)
abeverley May 13, 2026
dbbce77
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
1a77555
Update package.json
droberts-ctrlo Sep 1, 2025
edc226b
Updated error handler
droberts-ctrlo Dec 2, 2025
4704dec
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
17e0d17
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
3b8f201
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
3d2a795
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
99a7a1a
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
c56db64
Updated package.json to remove extra dependencies
droberts-ctrlo Aug 5, 2025
0d53b93
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
1722611
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
9f7e431
Removed npx call in tests after failure
droberts-ctrlo Aug 19, 2025
4bbcb16
Fix where review highlighted errors or invalid changes
droberts-ctrlo May 14, 2026
be5aa8b
Fix errors in formatting that should not have been included
droberts-ctrlo May 14, 2026
db0500d
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
9ff7d0e
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
7530661
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
ae2c266
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
47600fa
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
1012e66
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
efecf6c
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
4017010
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
67b08d8
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
4b87ab0
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
55152a1
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
4a145cb
Fixed bug in tables setup where definition was incorrect for table_la…
droberts-ctrlo Aug 20, 2025
047ee7e
Update correct API usage in Markdown formatter
droberts-ctrlo May 20, 2026
93c3e8a
Update from code review
droberts-ctrlo May 20, 2026
0888560
Fix errors in merge for DT fullscreen
droberts-ctrlo May 21, 2026
cd59f56
Fix code due to review
droberts-ctrlo May 21, 2026
eeff5a4
Further fix from review
droberts-ctrlo May 21, 2026
7994215
Missed datatables fixes
droberts-ctrlo Jun 9, 2026
d2ad098
Updated packages where required
droberts-ctrlo Jun 9, 2026
1db34f0
Package upgrades
droberts-ctrlo Jun 9, 2026
13c4ea2
Fix JS after package upgrade
droberts-ctrlo Jun 9, 2026
ce4dbd2
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
78a9c0d
Updated error handler
droberts-ctrlo Dec 2, 2025
0f67b5c
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
9eeeb9c
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
b30659c
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
809ebbf
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
eae2ad6
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
ef38469
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
65fbac0
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
43d4915
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
6e9ccb7
Removed extra packages
droberts-ctrlo Aug 5, 2025
15fd095
Build fixes after rebase
droberts-ctrlo Jun 3, 2026
b26436e
Fix or mitigate errors in tests where possible
droberts-ctrlo Jun 10, 2026
b670787
Fixes after review
droberts-ctrlo Jun 15, 2026
01829d0
Removed unnecessary comment
droberts-ctrlo Jun 17, 2026
a035d6f
Update action to use current node version
droberts-ctrlo Jun 10, 2026
90799f2
Javascript logging fix (D:1512)
abeverley May 13, 2026
2ed2eba
Fix cypress to work with newer browser versions
droberts-ctrlo Jun 19, 2026
02adce0
Jest cleanup (#601)
droberts-ctrlo Feb 4, 2026
95b1d30
Js formatting (#612)
droberts-ctrlo Apr 29, 2026
6977c2b
Added JSDocs (squashed from DR)
abeverley May 13, 2026
6fb9837
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
676d273
Updated error handler
droberts-ctrlo Dec 2, 2025
9e6352a
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
cc099ce
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
2df87c9
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
cef3d6b
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
cfead23
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
be68472
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
8167b2c
Fix where review highlighted errors or invalid changes
droberts-ctrlo May 14, 2026
70255e3
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
1ce4c6e
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
78c625d
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
c21c3ff
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
1decf18
Fix errors in merge for DT fullscreen
droberts-ctrlo May 21, 2026
8d4c171
Fix code due to review
droberts-ctrlo May 21, 2026
23e69df
Further fix from review
droberts-ctrlo May 21, 2026
353f945
Updated packages where required
droberts-ctrlo Jun 9, 2026
e3d4717
Package upgrades
droberts-ctrlo Jun 9, 2026
a092c57
Updated error handler
droberts-ctrlo Dec 2, 2025
cd9e196
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
4be0133
Fixes after review
droberts-ctrlo Jun 15, 2026
a9899c4
Fix typo from rebase
droberts-ctrlo Jul 20, 2026
63c4a59
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
1bf0c8f
Updated error handler
droberts-ctrlo Dec 2, 2025
01160c1
Updated ts-ignore where this was causing issues with linting and chec…
droberts-ctrlo Dec 2, 2025
3faaddd
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
693334b
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
9b04671
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
7a8439e
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
e033ee1
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
d8cb813
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
f5bff19
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
0cc1996
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
5fd72f0
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
f83c663
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
8dc9b69
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
8d6b4cd
Removed extra packages
droberts-ctrlo Aug 5, 2025
433c5ad
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
f22265a
Updated code to align with BS5
droberts-ctrlo Sep 19, 2025
df5b59b
Added searchable select component
droberts-ctrlo Sep 25, 2025
ee1af61
Fixed error in more-less
droberts-ctrlo Oct 31, 2025
06e3d4b
Update code and tsconfig to omit errors
droberts-ctrlo Dec 12, 2025
77587cb
Fix error in layouts view
droberts-ctrlo Dec 15, 2025
8e64175
fix for dev merge
droberts-ctrlo Jun 18, 2026
16b03c5
Fix erroneous changes
droberts-ctrlo Jun 18, 2026
e63ddb1
Update cypress to fix failing tests
droberts-ctrlo Jun 18, 2026
bf098b6
Update tests.yml
droberts-ctrlo Jun 19, 2026
f976940
Add checks for deprecation and apply fixes where possible
droberts-ctrlo Jun 23, 2026
359095c
Clean up code
droberts-ctrlo Jun 23, 2026
e7a9967
Fix test to only skip erroring sections rather than the whole test
droberts-ctrlo Jun 23, 2026
44bfc45
Fix typo in markdown component
droberts-ctrlo Jun 23, 2026
9e7cfd2
Use variables where possible rather than hex colours
droberts-ctrlo Jun 23, 2026
2a96fa5
Fix header on topics field
droberts-ctrlo Jul 1, 2026
04ba07d
Fix helptext for code not displaying correctly
droberts-ctrlo Jul 1, 2026
c11b926
Fix invalid header on field selection
droberts-ctrlo Jul 1, 2026
5660e63
Update lists to provide gap between
droberts-ctrlo Jul 1, 2026
4d1419f
Add correct data-bs-* attributes where they were missed
droberts-ctrlo Jul 1, 2026
15afd3a
Fix autosave colour issue
droberts-ctrlo Jul 2, 2026
be0ad66
Upgrade packages
droberts-ctrlo Jul 3, 2026
5fb0013
Update dependencies and modify tests
droberts-ctrlo Jul 13, 2026
3fc68d9
Fix cypress to work with newer browser versions
droberts-ctrlo Jun 19, 2026
6dada17
Update webpack file to silence deprecations we have no control over
droberts-ctrlo May 27, 2026
6983374
Update tests to run async calls as shown in documentation
droberts-ctrlo Jul 16, 2026
99c3e68
General clean up of test files and ensure that code is correct
droberts-ctrlo Jul 16, 2026
35acd92
Remove bootstrap-icons
droberts-ctrlo Jul 29, 2026
3a913a4
Update files as per review
droberts-ctrlo Jul 29, 2026
28018c9
Update file where review item was missed
droberts-ctrlo Jul 29, 2026
fe79ed4
Update view to encode title correctly
droberts-ctrlo Jul 29, 2026
1aefd86
Minor versions upgrade
droberts-ctrlo Jul 29, 2026
441e660
Fix error in test
droberts-ctrlo Jul 29, 2026
9d1584b
Update minor versions
droberts-ctrlo Jul 29, 2026
9add143
Fix datatable alignment
droberts-ctrlo Aug 11, 2026
d2286dc
Fix invalid font-weight on edit button
droberts-ctrlo Aug 11, 2026
b01ed28
Fix datatables responsive rendering
droberts-ctrlo Aug 11, 2026
26a137f
Fix error in datatables SCSS causing screen to blank when no layout i…
droberts-ctrlo Aug 11, 2026
a6669e6
Fix vertical alignment on data-table
droberts-ctrlo Aug 20, 2026
1369094
Update browsers list db
droberts-ctrlo Sep 1, 2026
daf0bf3
Update libraries to latest revision
droberts-ctrlo Sep 1, 2026
8984a9d
Update libraries to latest minor version
droberts-ctrlo Sep 1, 2026
2277447
Remove invalid branch from tests.yml
droberts-ctrlo Sep 2, 2026
3184cb9
Remove unnecessary Cypress changes
droberts-ctrlo Sep 2, 2026
bd9a49c
Move back to double quotes
droberts-ctrlo Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
insert_final_newline = false

[*.{yml,yaml}]
indent_size = 2

[*.{ts,js,jsx,tsx}]
quote_type = double
continuation_indent_size = 2
curly_brace_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = true

[*.{pl,pm,t,PL}]
max_line_length = off
continuation_indent_size = 4
11 changes: 0 additions & 11 deletions .eslintignore

This file was deleted.

46 changes: 0 additions & 46 deletions .eslintrc.js

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'GADS Tests'
on:
on:
push:
branches:
- master
Expand Down Expand Up @@ -115,6 +115,7 @@ jobs:
browser:
- name: 'chrome'
os: 'ubuntu-22.04'
node_version: 24.x

services:
postgres:
Expand Down Expand Up @@ -185,7 +186,7 @@ jobs:

strategy:
matrix:
node-version: [20.x, 22.x]
node-version: [22.x, 24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export default defineConfig({
setupNodeEvents(on, config) {
// implement node event listeners here
},
allowCypressEnv: false
},
});
76 changes: 44 additions & 32 deletions cypress/e2e/functionality/02-homepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { goodPassword, goodUser } from "../../support/constants";
describe('Dashboard Tests', () => {
const bigLipsum = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque accumsan, sem et vulputate imperdiet, enim ipsum rhoncus massa, sit amet pellentesque lacus urna sit amet enim. In tristique mollis tincidunt. Sed eget ligula metus. Integer sodales placerat erat. Aliquam erat volutpat. Curabitur varius lacinia diam fringilla efficitur. Sed euismod purus vel turpis molestie, ac fringilla nisi vestibulum. Maecenas ullamcorper ornare dui sodales gravida. Donec maximus egestas eleifend. Etiam in ultrices ante. Duis quis volutpat turpis. Nulla dignissim ornare aliquet.
Fusce interdum gravida est, sit amet vehicula nisi suscipit at. Pellentesque nec fermentum leo, in vehicula nulla. Nam dapibus ultricies tortor in maximus. Donec enim velit, molestie nec feugiat sed, posuere non ex. Nulla pellentesque gravida feugiat. Sed ornare purus vel libero semper aliquet. Nulla rutrum nunc sed vulputate gravida. Cras lobortis, lacus non tincidunt suscipit, leo quam vehicula libero, in vehicula diam justo ac est.
Mauris tempus, mi nec sodales semper, metus neque blandit sem, non scelerisque nunc libero eu augue. Cras ornare ut lectus in mattis. Quisque magna elit, efficitur nec dolor sed, semper dictum nunc. Cras ultricies, augue eget interdum aliquam, quam ex blandit sem, nec sollicitudin ex elit non mauris. Fusce dui justo, feugiat id lacus sit amet, pulvinar tristique felis. Etiam rhoncus ex ut congue aliquet. Sed at felis eget neque rhoncus malesuada. Aliquam commodo condimentum massa, sed volutpat nibh congue et. Maecenas blandit massa sed nisl pulvinar, vitae consectetur tortor placerat. Nulla laoreet diam ipsum, sit amet consectetur sem condimentum quis. Nullam et justo sem. Sed et sapien tempus, scelerisque nisl ac, pretium arcu.
Donec quis finibus ante. Nulla et dui posuere, semper elit quis, maximus ipsum. Aliquam ante nulla, pellentesque sed neque sit amet, finibus cursus est. Aliquam sed sollicitudin orci. Nulla malesuada augue lectus, ac tincidunt orci fermentum ac. Nullam pulvinar diam felis, sed condimentum arcu ornare sit amet. Praesent eget lobortis purus. In hac habitasse platea dictumst. Ut lorem nisl, fringilla vitae quam lobortis, vehicula egestas magna. Sed convallis placerat ante quis convallis. Vivamus pharetra quam diam, ut ultricies neque mollis vitae. Morbi augue tellus, feugiat a interdum a, tincidunt vel ante.
Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut porttitor risus, at pulvinar tortor. Integer eleifend volutpat efficitur. Maecenas massa odio, pharetra eu eleifend eu, volutpat sed dui. Donec efficitur sed risus sit amet imperdiet. Pellentesque nec arcu non nibh congue cursus et a sapien. Phasellus ullamcorper magna nec varius facilisis. Curabitur et tempus est. Nulla tincidunt porttitor mollis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean vitae pretium felis. Aliquam vehicula et nisl sit amet pharetra. Nulla ac sollicitudin velit. Cras egestas ac sem vitae sollicitudin. Nullam convallis risus id massa vestibulum imperdiet. Cras in enim sit amet ligula placerat eleifend.`
Mauris tempus, mi nec sodales semper, metus neque blandit sem, non scelerisque nunc libero eu augue. Cras ornare ut lectus in mattis. Quisque magna elit, efficitur nec dolor sed, semper dictum nunc. Cras ultricies, augue eget interdum aliquam, quam ex blandit sem, nec sollicitudin ex elit non mauris. Fusce dui justo, feugiat id lacus sit amet, pulvinar tristique felis. Etiam rhoncus ex ut congue aliquet. Sed at felis eget neque rhoncus malesuada. Aliquam commodo condimentum massa, sed volutpat nibh congue et. Maecenas blandit massa sed nisl pulvinar, vitae consectetur tortor placerat. Nulla laoreet diam ipsum, sit amet consectetur sem condimentum quis. Nullam et justo sem. Sed et sapien tempus, scelerisque nisl ac, pretium arcu.`

beforeEach(() => {
cy.loginAndGoTo(goodUser, goodPassword, 'http://localhost:3000/?did=1');
Expand All @@ -21,61 +19,73 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut
})

it('Displays the home page correctly', () => {
cy.get("li.list__item").eq(0)
cy.get("a.nav-link").eq(0)
.should("exist")
.contains("Home dashboard (shared)")
.should("have.class", "link--active");
cy.get("li.list__item").eq(1)
.should("have.class", "active")
.contains("Home dashboard (shared)");
cy.get("a.nav-link").eq(1)
.should("exist")
.contains("Home dashboard (personal)")
.should("not.have.class", "link--active");
.should("not.have.class", "active")
.contains("Home dashboard (personal)");
});

it('Should navigate to the personal dashboard', () => {
cy.get("li.list__item").eq(1)
cy.get("a.nav-link").eq(1)
.should("exist")
.should("not.have.class", "link--active")
.should("not.have.class", "active")
.click();
cy.get("a.nav-link").eq(1)
.should("exist")
.should("have.class", "active")
.contains("Home dashboard (personal)");
});

it('Should navigate to the shared dashboard', () => {
cy.get("li.list__item").eq(0)
cy.get("a.nav-link").eq(1)
.click();
cy.get("a.nav-link").eq(0)
.should("exist")
.should("not.have.class", "link--active")
.should("not.have.class", "active")
.click();
cy.get("a.nav-link").eq(0)
.should("exist")
.should("have.class", "active")
.contains("Home dashboard (shared)");
});

context("Shared Dashboard", () => {
it('Should cancel creation of a shared dashboard widget', () => {
cy.wait(1000);
cy.get(".ld-footer-container")
.find("button")
.eq(1)
.click();
cy.get(".ld-footer-container")
.find(".dropdown__menu")
.find(".dropdown-menu.show")
.find("a")
.eq(1)
.eq(0)
.click();
cy.get("[aria-label='Edit Modal']").find("button.btn-cancel").click();
cy.get(".ld-widget").should("have.length", 0);
});

it("Should create a shared dashboard widget", () => {
cy.wait(1000);
cy.get(".ld-footer-container")
.find("button")
.eq(1)
.click();
cy.get(".ld-footer-container")
.find(".dropdown__menu")
.find(".dropdown-menu.show")
.find("a")
.eq(1)
.eq(0)
.click();
cy.get("[aria-label='Edit Modal']")
.find("input[name='title']", { timeout: 10000 })
.should("be.visible");
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
cy.get(".ld-widget").should("have.length", 1);
cy.get(".ld-widget").find("div").contains("This is a new notice widget - click edit to update the contents");
});
Expand All @@ -90,7 +100,7 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut
.type("With a new title");
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
cy.get(".ld-widget").find("h4").contains("With a new title");
});

Expand All @@ -105,7 +115,7 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut
.type(bigLipsum);
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
});

it("Should delete a shared dashboard widget", () => {
Expand All @@ -120,43 +130,45 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut

context("Personal Dashboard", () => {
it('Should cancel creation of a personal dashboard widget', () => {
cy.get("a.link--primary").click();
cy.get("a.nav-link").eq(1).click();
cy.wait(1000);
cy.get(".ld-footer-container")
.find("button")
.eq(1)
.click();
cy.get(".ld-footer-container")
.find(".dropdown__menu")
.find(".dropdown-menu.show")
.find("a")
.eq(1)
.eq(0)
.click();
cy.get("[aria-label='Edit Modal']").find("button.btn-cancel").click();
cy.get(".ld-widget").should("have.length", 1);
});

it("Should create a personal dashboard widget", () => {
cy.get("a.link--primary").click();
cy.get("a.nav-link").eq(1).click();
cy.wait(1000);
cy.get(".ld-footer-container")
.find("button")
.eq(1)
.click();
cy.get(".ld-footer-container")
.find(".dropdown__menu")
.find(".dropdown-menu.show")
.find("a")
.eq(1)
.eq(0)
.click();
cy.get("[aria-label='Edit Modal']")
.find("input[name='title']", { timeout: 10000 })
.should("be.visible");
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
cy.get(".ld-widget").should("have.length", 2);
cy.get(".ld-widget").eq(1).find("div").contains("This is a new notice widget - click edit to update the contents");
});

it("Should edit a personal dashboard widget", () => {
cy.get("a.link--primary").click();
cy.get("a.nav-link").eq(1).click();
cy.get(".ld-widget").eq(1).find(".ld-edit-button").click();
cy.get("[aria-label='Edit Modal']")
.find("input[name='title']", { timeout: 10000 })
Expand All @@ -166,12 +178,12 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut
.type("With a new title");
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
cy.get(".ld-widget").eq(1).find("h4").contains("With a new title");
});

it("Should edit a personal dashboard widget with a lot of text", () => {
cy.get("a.link--primary").click();
cy.get("a.nav-link").eq(1).click();
cy.get(".ld-widget").eq(1).find(".ld-edit-button").click();
cy.get("[aria-label='Edit Modal']")
.find("input[name='title']", { timeout: 10000 })
Expand All @@ -182,11 +194,11 @@ Ut diam tortor, hendrerit eget ipsum non, suscipit mattis elit. Pellentesque ut
.type(bigLipsum);
cy.get("[aria-label='Edit Modal']")
.find(".modal-footer__right")
.find("button.btn-default").click();
.find("button.btn-primary").click();
});

it("Should delete a personal dashboard widget", () => {
cy.get("a.link--primary").click();
cy.get("a.nav-link").eq(1).click();
cy.get(".ld-widget").eq(1).find(".ld-edit-button").click();
cy.get("[aria-label='Edit Modal']")
.find("input[name='title']", { timeout: 10000 })
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/functionality/03-settings.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("settings tests", () => {
.find("tr")
.contains("No titles available");
cy.mainHeader()
.find(".btn-default")
.find(".btn-primary")
.should("exist")
.click();
cy.location("pathname").should("include", "/title_add");
Expand Down Expand Up @@ -93,7 +93,7 @@ describe("settings tests", () => {
.find("tr")
.contains("No titles available");
cy.mainHeader()
.find(".btn-default")
.find(".btn-primary")
.should("exist")
.click();
cy.location("pathname").should("include", "/title_add");
Expand Down Expand Up @@ -191,7 +191,7 @@ describe("settings tests", () => {
.find("tr")
.contains("No organisations available");
cy.mainHeader()
.find(".btn-default")
.find(".btn-primary")
.should("exist")
.click();
cy.location("pathname").should("include", "/organisation_add");
Expand Down Expand Up @@ -219,7 +219,7 @@ describe("settings tests", () => {
.find("tr")
.contains("No organisations available");
cy.mainHeader()
.find(".btn-default")
.find(".btn-primary")
.should("exist")
.click();
cy.location("pathname").should("include", "/organisation_add");
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/functionality/06-tables-and-wizard.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Another Test Suite', () => {

//attempt save with incorrect (fails)
it.skip('should fail to save new table with invalid shortname ', () => {
cy.get('[data-target="#newTableModal"]').click();
cy.get('[data-bs-target="#newTableModal"]').click();
cy.get('#shortName').type('This value wont $4v£');
cy.get("#name").type("table to fail");
cy.get('.btn-js-next').eq(0).click();
Expand All @@ -19,7 +19,7 @@ describe('Another Test Suite', () => {
});

it('should save a new table successfully', () => {
cy.get('[data-target="#newTableModal"]').click();
cy.get('[data-bs-target="#newTableModal"]').click();
cy.get('#shortName').type('1-test_table');
cy.get("#name").type("1-test-table");
cy.get('.btn-js-next').eq(0).click();
Expand Down
Loading
Loading