Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
293d488
Jest cleanup (#601)
droberts-ctrlo Feb 4, 2026
782686c
Jest cleanup (#601)
droberts-ctrlo Feb 4, 2026
f108028
Merge pull request #605 from droberts-ctrlo/dev-bootstrap-current
abeverley Mar 2, 2026
7820cf6
Js formatting (#612)
droberts-ctrlo Apr 29, 2026
690c638
Merge branch 'dev' into dev-bootstrap
abeverley May 13, 2026
8603e4e
Merge branch 'dev' into dev-bootstrap
abeverley May 13, 2026
fbb2e03
Added JSDocs (squashed from DR)
abeverley May 13, 2026
b7bbbff
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
32d3f87
Update package.json
droberts-ctrlo Sep 1, 2025
d35831e
Updated error handler
droberts-ctrlo Dec 2, 2025
fb27bb4
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
e6d4df6
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
1fd8a94
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
9ff52ed
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
3195fc3
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
840ef52
Updated package.json to remove extra dependencies
droberts-ctrlo Aug 5, 2025
00c8763
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
436be2d
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
ebd8df5
Removed npx call in tests after failure
droberts-ctrlo Aug 19, 2025
8f78543
Fix where review highlighted errors or invalid changes
droberts-ctrlo May 14, 2026
6769a98
Fix errors in formatting that should not have been included
droberts-ctrlo May 14, 2026
65764d2
Merge pull request #620 from droberts-ctrlo/js-refactor
abeverley May 18, 2026
956b522
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
27d4941
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
5b40076
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
eada19c
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
1b3fe8b
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
77b67c3
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
102ce44
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
07865d9
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
5c8b94b
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
10d7603
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
bb666a1
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
048f033
Fixed bug in tables setup where definition was incorrect for table_la…
droberts-ctrlo Aug 20, 2025
c45374d
Update correct API usage in Markdown formatter
droberts-ctrlo May 20, 2026
b4707e6
Update from code review
droberts-ctrlo May 20, 2026
569d288
Fix errors in merge for DT fullscreen
droberts-ctrlo May 21, 2026
71619c1
Fix code due to review
droberts-ctrlo May 21, 2026
cf0e914
Further fix from review
droberts-ctrlo May 21, 2026
b40f40e
Merge pull request #622 from droberts-ctrlo/datatables-upgrade
abeverley Jun 3, 2026
e1ed053
Missed datatables fixes
droberts-ctrlo Jun 9, 2026
a11730c
Updated packages where required
droberts-ctrlo Jun 9, 2026
c86875f
Package upgrades
droberts-ctrlo Jun 9, 2026
35426fe
Fix JS after package upgrade
droberts-ctrlo Jun 9, 2026
40a58e1
Update action to use current node version
droberts-ctrlo Jun 10, 2026
5e6e650
Merge pull request #630 from droberts-ctrlo/dev-bootstrap-fixes
abeverley Jun 12, 2026
1a14bc9
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
9ef9c07
Updated error handler
droberts-ctrlo Dec 2, 2025
a6ffb7c
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
7b9f805
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
288fcc5
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
168e4a1
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
ee71cef
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
1cbedc1
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
d2bff7f
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
11cb481
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
c789277
Removed extra packages
droberts-ctrlo Aug 5, 2025
004f146
Build fixes after rebase
droberts-ctrlo Jun 3, 2026
2447880
Fix or mitigate errors in tests where possible
droberts-ctrlo Jun 10, 2026
2efbb8c
Fixes after review
droberts-ctrlo Jun 15, 2026
b6a553a
Removed unnecessary comment
droberts-ctrlo Jun 17, 2026
7abd9ef
Merge pull request #634 from droberts-ctrlo/react-upgrades
abeverley Jun 17, 2026
813a607
Merge pull request #632 from droberts-ctrlo/node-version-upgrades
abeverley Jun 19, 2026
be4d1a8
Javascript logging fix (D:1512)
abeverley May 13, 2026
a135b7d
Update changelist and version number
droberts-ctrlo May 13, 2026
8c00dad
Rebuild JS
abeverley May 13, 2026
85922b2
Fix cypress to work with newer browser versions
droberts-ctrlo Jun 19, 2026
30c43cd
Jest cleanup (#601)
droberts-ctrlo Feb 4, 2026
a367c49
Js formatting (#612)
droberts-ctrlo Apr 29, 2026
afc25d9
Added JSDocs (squashed from DR)
abeverley May 13, 2026
1c339a9
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
6f2a230
Updated error handler
droberts-ctrlo Dec 2, 2025
263c94b
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
bf1b190
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
c0c1a4a
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
8ed1fc8
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
2240eb9
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
d2700eb
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
10ce489
Fix where review highlighted errors or invalid changes
droberts-ctrlo May 14, 2026
6d39e68
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
aa0e02f
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
bcbe514
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
b0904d0
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
18d1b19
Fix errors in merge for DT fullscreen
droberts-ctrlo May 21, 2026
42ae389
Fix code due to review
droberts-ctrlo May 21, 2026
539e0e9
Further fix from review
droberts-ctrlo May 21, 2026
4f5f392
Updated packages where required
droberts-ctrlo Jun 9, 2026
14f85fb
Package upgrades
droberts-ctrlo Jun 9, 2026
4810fb1
Updated error handler
droberts-ctrlo Dec 2, 2025
190db36
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
d857914
Fixes after review
droberts-ctrlo Jun 15, 2026
e1eb83f
Fix typo from rebase
droberts-ctrlo Jul 20, 2026
611879b
Merge pull request #642 from droberts-ctrlo/dev-bootstrap-current
abeverley Jul 27, 2026
2e5e921
Formatted test and config code and updated test files
droberts-ctrlo Jul 16, 2025
9845bc8
Updated error handler
droberts-ctrlo Dec 2, 2025
fa6a1e0
Updated ts-ignore where this was causing issues with linting and chec…
droberts-ctrlo Dec 2, 2025
320fb28
Added editorconfig and upgraded ESLint to current version
droberts-ctrlo Jul 17, 2025
c80408a
Formatted and changed code with ESLint fixes - functionality has not …
droberts-ctrlo Jul 17, 2025
ab13c5c
Fixed formatting and code where this was broken on merge with current…
droberts-ctrlo Aug 4, 2025
4ce41ca
Created and updated JSDoc and TS typings where necessary
droberts-ctrlo Jul 25, 2025
a1f7480
Updated linting rules, and added comments where required
droberts-ctrlo Jul 29, 2025
f9b3cf5
Updated and removed extra dependencies and exports where not required
droberts-ctrlo Aug 5, 2025
7a9a46d
Updated with changes within current dev
droberts-ctrlo Aug 19, 2025
5f091e7
Upgraded packages and set up new webpack config
droberts-ctrlo Jul 31, 2025
d95dd21
Removed extra unused dependencies
droberts-ctrlo Aug 5, 2025
3cbda18
Updated to new DataTables.net API
droberts-ctrlo Jul 31, 2025
48c7246
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
b3362e4
Removed extra packages
droberts-ctrlo Aug 5, 2025
3bac84e
Updated dashboard and react components
droberts-ctrlo Aug 5, 2025
9c61d76
Updated code to align with BS5
droberts-ctrlo Sep 19, 2025
c6ffd75
Added searchable select component
droberts-ctrlo Sep 25, 2025
b4f9b3a
Fixed error in more-less
droberts-ctrlo Oct 31, 2025
72ee02b
Update code and tsconfig to omit errors
droberts-ctrlo Dec 12, 2025
6eb802e
Fix error in layouts view
droberts-ctrlo Dec 15, 2025
c8c7803
fix for dev merge
droberts-ctrlo Jun 18, 2026
aac1cd3
Fix erroneous changes
droberts-ctrlo Jun 18, 2026
dccb21d
Update cypress to fix failing tests
droberts-ctrlo Jun 18, 2026
b4d46f0
Update tests.yml
droberts-ctrlo Jun 19, 2026
7cc5bd9
Add checks for deprecation and apply fixes where possible
droberts-ctrlo Jun 23, 2026
efa2424
Clean up code
droberts-ctrlo Jun 23, 2026
d01c58f
Fix test to only skip erroring sections rather than the whole test
droberts-ctrlo Jun 23, 2026
b70942f
Fix typo in markdown component
droberts-ctrlo Jun 23, 2026
9447ad2
Use variables where possible rather than hex colours
droberts-ctrlo Jun 23, 2026
f65a2c8
Fix header on topics field
droberts-ctrlo Jul 1, 2026
e8c98d8
Fix helptext for code not displaying correctly
droberts-ctrlo Jul 1, 2026
abbfd13
Fix invalid header on field selection
droberts-ctrlo Jul 1, 2026
ca35e56
Update lists to provide gap between
droberts-ctrlo Jul 1, 2026
fd89f7a
Add correct data-bs-* attributes where they were missed
droberts-ctrlo Jul 1, 2026
1815205
Fix autosave colour issue
droberts-ctrlo Jul 2, 2026
1d2472c
Upgrade packages
droberts-ctrlo Jul 3, 2026
ad5c3e7
Update dependencies and modify tests
droberts-ctrlo Jul 13, 2026
3d7dcc4
Fix cypress to work with newer browser versions
droberts-ctrlo Jun 19, 2026
5d90709
Update webpack file to silence deprecations we have no control over
droberts-ctrlo May 27, 2026
12ed28d
Update tests to run async calls as shown in documentation
droberts-ctrlo Jul 16, 2026
155b5f8
General clean up of test files and ensure that code is correct
droberts-ctrlo Jul 16, 2026
ca5339b
Remove bootstrap-icons
droberts-ctrlo Jul 29, 2026
9208316
Update files as per review
droberts-ctrlo Jul 29, 2026
a420b27
Update file where review item was missed
droberts-ctrlo Jul 29, 2026
a8e7565
Update view to encode title correctly
droberts-ctrlo Jul 29, 2026
e0efbb0
Minor versions upgrade
droberts-ctrlo Jul 29, 2026
5d6fe1e
Fix error in test
droberts-ctrlo Jul 29, 2026
60edebc
Update minor versions
droberts-ctrlo Jul 29, 2026
dd2f533
Merge pull request #635 from droberts-ctrlo/bootstrap-upgrade
abeverley Jul 29, 2026
681e800
Fix datatable alignment
droberts-ctrlo Aug 11, 2026
728019e
Fix invalid font-weight on edit button
droberts-ctrlo Aug 11, 2026
90447a9
Fix datatables responsive rendering
droberts-ctrlo Aug 11, 2026
cce87cb
Fix error in datatables SCSS causing screen to blank when no layout i…
droberts-ctrlo Aug 11, 2026
26d32d1
Merge branch 'bootstrap-upgrade' into dev-bootstrap
droberts-ctrlo Aug 20, 2026
f96b6bf
Fix vertical alignment on data-table
droberts-ctrlo Aug 20, 2026
333e13f
Merge pull request #646 from droberts-ctrlo/dev-bootstrap
abeverley Aug 28, 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.

4 changes: 3 additions & 1 deletion .github/workflows/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

apt-get update
apt-get install -y curl gpg
curl -o- https://debian.ctrlo.com/repos/apt/debian/whatever.gpg.key | gpg --dearmor -o /usr/share/keyrings/ctrlo-keyring.gpg
Expand All @@ -18,4 +20,4 @@ apt-get install -y libmoox-types-mooselike-datetime-perl libdatetime-format-date
apt-get install -y libfile-slurp-perl libfile-mimeinfo-perl liblist-compare-perl libnet-oauth2-authorizationserver-perl libfontconfig1
apt-get install -y libctrlo-pdf-perl libpdf-builder-perl fonts-liberation libdate-holidays-gb-perl libcgi-deurl-xs-perl libfile-bom-perl
apt-get install -y libdatetime-format-iso8601-perl liblog-log4perl-perl libwww-mechanize-chrome-perl chromium libfile-libmagic-perl libnet-saml2-perl
apt-get install -y liburl-encode-perl libtext-markdown-perl libtest-tempdir-tiny-perl libtest-mocktime-perl
apt-get install -y liburl-encode-perl libtext-markdown-perl libtest-tempdir-tiny-perl libtest-mocktime-perl libdancer2-plugin-logreport-perl
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: 'GADS Tests'
on:
on:
push:
branches:
- master
- dev
- hotfix
- dev-bootstrap
paths-ignore:
- '*.md'
- VERSION
Expand All @@ -13,6 +14,7 @@ on:
- master
- dev
- hotfix
- dev-bootstrap
paths-ignore:
- '*.md'
- VERSION
Expand Down Expand Up @@ -115,6 +117,7 @@ jobs:
browser:
- name: 'chrome'
os: 'ubuntu-22.04'
node_version: 24.x

services:
postgres:
Expand Down Expand Up @@ -185,7 +188,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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.0
2.8.3
12 changes: 12 additions & 0 deletions changelist.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# GADS Changelist
--------
**Version**: 2.8.3
**Released**: 13-05-2026

# Fixes

- Fix for error in JS logging
- Fix error in drag and drop
- Better error for when duplicate curval ID's are present

# QoL Fixes

--------
**Version**: 2.8.2
**Released**: 01-05-2026
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
Loading
Loading