diff --git a/cypress/e2e/01-admin/configTables.cy.js b/cypress/e2e/01-admin/configTables.cy.js index 2ccdf37f..5d4aa367 100644 --- a/cypress/e2e/01-admin/configTables.cy.js +++ b/cypress/e2e/01-admin/configTables.cy.js @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Admin - Config Table Management', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/01-admin/configTables.cy.ts b/cypress/e2e/01-admin/configTables.cy.ts index 6ea0ce4b..8bcd39bf 100644 --- a/cypress/e2e/01-admin/configTables.cy.ts +++ b/cypress/e2e/01-admin/configTables.cy.ts @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js' -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Admin - Config Table Management', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/01-admin/database.cy.js b/cypress/e2e/01-admin/database.cy.js index c493debb..68bd909f 100644 --- a/cypress/e2e/01-admin/database.cy.js +++ b/cypress/e2e/01-admin/database.cy.js @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js'; -import { logout, login, ajaxDelayMillis } from '../../support/index.js'; +import { ajaxDelayMillis, login, logout } from '../../support/index.js'; describe('Admin - Database Maintenance', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/01-admin/database.cy.ts b/cypress/e2e/01-admin/database.cy.ts index f602db67..ebfcbf02 100644 --- a/cypress/e2e/01-admin/database.cy.ts +++ b/cypress/e2e/01-admin/database.cy.ts @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js' -import { logout, login, ajaxDelayMillis } from '../../support/index.js' +import { ajaxDelayMillis, login, logout } from '../../support/index.js' describe('Admin - Database Maintenance', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/01-admin/feeManagement.cy.js b/cypress/e2e/01-admin/feeManagement.cy.js index ef76813a..d086e063 100644 --- a/cypress/e2e/01-admin/feeManagement.cy.js +++ b/cypress/e2e/01-admin/feeManagement.cy.js @@ -1,6 +1,6 @@ import * as configFunctions from '../../../helpers/functions.config.js'; import { testAdmin } from '../../../test/_globals.js'; -import { logout, login, ajaxDelayMillis } from '../../support/index.js'; +import { ajaxDelayMillis, login, logout } from '../../support/index.js'; describe('Admin - Fee Management', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/01-admin/feeManagement.cy.ts b/cypress/e2e/01-admin/feeManagement.cy.ts index 3eb9d12c..cc81d8ea 100644 --- a/cypress/e2e/01-admin/feeManagement.cy.ts +++ b/cypress/e2e/01-admin/feeManagement.cy.ts @@ -1,10 +1,7 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable @typescript-eslint/no-non-null-assertion, promise/always-return, promise/catch-or-return */ - import * as configFunctions from '../../../helpers/functions.config.js' import { testAdmin } from '../../../test/_globals.js' import type { Fee } from '../../../types/recordTypes.js' -import { logout, login, ajaxDelayMillis } from '../../support/index.js' +import { ajaxDelayMillis, login, logout } from '../../support/index.js' describe('Admin - Fee Management', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/01-admin/lotTypeManagement.cy.js b/cypress/e2e/01-admin/lotTypeManagement.cy.js index fd96a4e5..36c6b284 100644 --- a/cypress/e2e/01-admin/lotTypeManagement.cy.js +++ b/cypress/e2e/01-admin/lotTypeManagement.cy.js @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Admin - Lot Type Management', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/01-admin/lotTypeManagement.cy.ts b/cypress/e2e/01-admin/lotTypeManagement.cy.ts index 76b2f158..585ff19d 100644 --- a/cypress/e2e/01-admin/lotTypeManagement.cy.ts +++ b/cypress/e2e/01-admin/lotTypeManagement.cy.ts @@ -1,8 +1,5 @@ -/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */ - import { testAdmin } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Admin - Lot Type Management', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/01-admin/occupancyTypeManagement.cy.js b/cypress/e2e/01-admin/occupancyTypeManagement.cy.js index 28bc3959..4b8b9c9c 100644 --- a/cypress/e2e/01-admin/occupancyTypeManagement.cy.js +++ b/cypress/e2e/01-admin/occupancyTypeManagement.cy.js @@ -1,5 +1,5 @@ import { testAdmin } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Admin - Occupancy Type Management', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/01-admin/occupancyTypeManagement.cy.ts b/cypress/e2e/01-admin/occupancyTypeManagement.cy.ts index 2fc0a6f4..4a5cb2be 100644 --- a/cypress/e2e/01-admin/occupancyTypeManagement.cy.ts +++ b/cypress/e2e/01-admin/occupancyTypeManagement.cy.ts @@ -1,8 +1,5 @@ -/* eslint-disable unicorn/filename-case, promise/catch-or-return, promise/always-return */ - import { testAdmin } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Admin - Occupancy Type Management', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/02-update/lotOccupancies.cy.js b/cypress/e2e/02-update/lotOccupancies.cy.js index 2d6402ca..652aed03 100644 --- a/cypress/e2e/02-update/lotOccupancies.cy.js +++ b/cypress/e2e/02-update/lotOccupancies.cy.js @@ -1,5 +1,5 @@ import { testUpdate } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Update - Lot Occupancies', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/02-update/lotOccupancies.cy.ts b/cypress/e2e/02-update/lotOccupancies.cy.ts index d5e2baeb..d11dc670 100644 --- a/cypress/e2e/02-update/lotOccupancies.cy.ts +++ b/cypress/e2e/02-update/lotOccupancies.cy.ts @@ -1,6 +1,5 @@ import { testUpdate } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Update - Lot Occupancies', () => { beforeEach(() => { diff --git a/cypress/e2e/02-update/lots.cy.js b/cypress/e2e/02-update/lots.cy.js index 7daa4c55..db9ebbb1 100644 --- a/cypress/e2e/02-update/lots.cy.js +++ b/cypress/e2e/02-update/lots.cy.js @@ -1,5 +1,5 @@ import { testUpdate } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Update - Lots', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/02-update/lots.cy.ts b/cypress/e2e/02-update/lots.cy.ts index 7c928eef..6d84f266 100644 --- a/cypress/e2e/02-update/lots.cy.ts +++ b/cypress/e2e/02-update/lots.cy.ts @@ -1,6 +1,5 @@ import { testUpdate } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Update - Lots', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/02-update/maps.cy.js b/cypress/e2e/02-update/maps.cy.js index a566a0f2..c8dcb143 100644 --- a/cypress/e2e/02-update/maps.cy.js +++ b/cypress/e2e/02-update/maps.cy.js @@ -19,22 +19,30 @@ describe('Update - Maps', () => { cy.checkA11y(); cy.log('Populate the fields'); cy.fixture('map.json').then((mapJSON) => { - cy.get("input[name='mapName']").clear().type(mapJSON.mapName); + cy.get("input[name='mapName']") + .clear() + .type(mapJSON.mapName ?? ''); cy.get("textarea[name='mapDescription']") .clear() - .type(mapJSON.mapDescription); - cy.get("input[name='mapAddress1']").clear().type(mapJSON.mapAddress1); - cy.get("input[name='mapAddress2']").clear().type(mapJSON.mapAddress2); - cy.get("input[name='mapPostalCode']").clear().type(mapJSON.mapPostalCode); + .type(mapJSON.mapDescription ?? ''); + cy.get("input[name='mapAddress1']") + .clear() + .type(mapJSON.mapAddress1 ?? ''); + cy.get("input[name='mapAddress2']") + .clear() + .type(mapJSON.mapAddress2 ?? ''); + cy.get("input[name='mapPostalCode']") + .clear() + .type(mapJSON.mapPostalCode ?? ''); cy.get("input[name='mapPhoneNumber']") .clear() - .type(mapJSON.mapPhoneNumber); + .type(mapJSON.mapPhoneNumber ?? ''); cy.get("input[name='mapLatitude']") .clear() - .type(mapJSON.mapLatitude.toString()); + .type(mapJSON.mapLatitude?.toString() ?? ''); cy.get("input[name='mapLongitude']") .clear() - .type(mapJSON.mapLongitude.toString()); + .type(mapJSON.mapLongitude?.toString() ?? ''); }); cy.log('Ensure the default city and province are used'); cy.get("input[name='mapCity']").should('have.value', getConfigProperty('settings.map.mapCityDefault')); @@ -54,8 +62,8 @@ describe('Update - Maps', () => { cy.get("input[name='mapProvince']").should('have.value', getConfigProperty('settings.map.mapProvinceDefault')); cy.get("input[name='mapPostalCode']").should('have.value', mapJSON.mapPostalCode); cy.get("input[name='mapPhoneNumber']").should('have.value', mapJSON.mapPhoneNumber); - cy.get("input[name='mapLatitude']").should('have.value', mapJSON.mapLatitude.toString()); - cy.get("input[name='mapLongitude']").should('have.value', mapJSON.mapLongitude.toString()); + cy.get("input[name='mapLatitude']").should('have.value', mapJSON.mapLatitude?.toString()); + cy.get("input[name='mapLongitude']").should('have.value', mapJSON.mapLongitude?.toString()); }); }); }); diff --git a/cypress/e2e/02-update/maps.cy.ts b/cypress/e2e/02-update/maps.cy.ts index 6085d360..c2c70129 100644 --- a/cypress/e2e/02-update/maps.cy.ts +++ b/cypress/e2e/02-update/maps.cy.ts @@ -1,6 +1,3 @@ -// eslint-disable-next-line @eslint-community/eslint-comments/disable-enable-pair -/* eslint-disable @typescript-eslint/no-non-null-assertion */ - import { getConfigProperty } from '../../../helpers/functions.config.js' import { testUpdate } from '../../../test/_globals.js' import type { MapRecord } from '../../../types/recordTypes.js' @@ -32,24 +29,32 @@ describe('Update - Maps', () => { // eslint-disable-next-line promise/catch-or-return, promise/always-return cy.fixture('map.json').then((mapJSON: MapRecord) => { - cy.get("input[name='mapName']").clear().type(mapJSON.mapName!) + cy.get("input[name='mapName']") + .clear() + .type(mapJSON.mapName ?? '') cy.get("textarea[name='mapDescription']") .clear() - .type(mapJSON.mapDescription!) + .type(mapJSON.mapDescription ?? '') - cy.get("input[name='mapAddress1']").clear().type(mapJSON.mapAddress1!) - cy.get("input[name='mapAddress2']").clear().type(mapJSON.mapAddress2!) - cy.get("input[name='mapPostalCode']").clear().type(mapJSON.mapPostalCode!) + cy.get("input[name='mapAddress1']") + .clear() + .type(mapJSON.mapAddress1 ?? '') + cy.get("input[name='mapAddress2']") + .clear() + .type(mapJSON.mapAddress2 ?? '') + cy.get("input[name='mapPostalCode']") + .clear() + .type(mapJSON.mapPostalCode ?? '') cy.get("input[name='mapPhoneNumber']") .clear() - .type(mapJSON.mapPhoneNumber!) + .type(mapJSON.mapPhoneNumber ?? '') cy.get("input[name='mapLatitude']") .clear() - .type(mapJSON.mapLatitude!.toString()) + .type(mapJSON.mapLatitude?.toString() ?? '') cy.get("input[name='mapLongitude']") .clear() - .type(mapJSON.mapLongitude!.toString()) + .type(mapJSON.mapLongitude?.toString() ?? '') }) cy.log('Ensure the default city and province are used') @@ -111,11 +116,11 @@ describe('Update - Maps', () => { cy.get("input[name='mapLatitude']").should( 'have.value', - mapJSON.mapLatitude!.toString() + mapJSON.mapLatitude?.toString() ) cy.get("input[name='mapLongitude']").should( 'have.value', - mapJSON.mapLongitude!.toString() + mapJSON.mapLongitude?.toString() ) }) }) diff --git a/cypress/e2e/02-update/updateUser.cy.js b/cypress/e2e/02-update/updateUser.cy.js index b5d832ab..0b8378ab 100644 --- a/cypress/e2e/02-update/updateUser.cy.js +++ b/cypress/e2e/02-update/updateUser.cy.js @@ -1,5 +1,5 @@ import { testUpdate } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Update User', () => { beforeEach('Loads page', () => { logout(); diff --git a/cypress/e2e/02-update/updateUser.cy.ts b/cypress/e2e/02-update/updateUser.cy.ts index ba7a654b..178ce7bb 100644 --- a/cypress/e2e/02-update/updateUser.cy.ts +++ b/cypress/e2e/02-update/updateUser.cy.ts @@ -1,6 +1,5 @@ import { testUpdate } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Update User', () => { beforeEach('Loads page', () => { diff --git a/cypress/e2e/02-update/workOrders.cy.js b/cypress/e2e/02-update/workOrders.cy.js index ff4f3bef..a7aab9ab 100644 --- a/cypress/e2e/02-update/workOrders.cy.js +++ b/cypress/e2e/02-update/workOrders.cy.js @@ -1,5 +1,5 @@ import { testUpdate } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Update - Work Orders', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/02-update/workOrders.cy.ts b/cypress/e2e/02-update/workOrders.cy.ts index ab6aa631..9d1e2436 100644 --- a/cypress/e2e/02-update/workOrders.cy.ts +++ b/cypress/e2e/02-update/workOrders.cy.ts @@ -1,6 +1,5 @@ import { testUpdate } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Update - Work Orders', () => { beforeEach(() => { diff --git a/cypress/e2e/03-readOnly/readOnlyUser.cy.js b/cypress/e2e/03-readOnly/readOnlyUser.cy.js index 084ad22c..babf8e15 100644 --- a/cypress/e2e/03-readOnly/readOnlyUser.cy.js +++ b/cypress/e2e/03-readOnly/readOnlyUser.cy.js @@ -1,5 +1,5 @@ import { testView } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Read Only User', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/03-readOnly/readOnlyUser.cy.ts b/cypress/e2e/03-readOnly/readOnlyUser.cy.ts index 923b2f3e..6ef3262a 100644 --- a/cypress/e2e/03-readOnly/readOnlyUser.cy.ts +++ b/cypress/e2e/03-readOnly/readOnlyUser.cy.ts @@ -1,6 +1,5 @@ import { testView } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Read Only User', () => { beforeEach(() => { diff --git a/cypress/e2e/03-readOnly/reports.cy.js b/cypress/e2e/03-readOnly/reports.cy.js index c29f2941..7174fd8c 100644 --- a/cypress/e2e/03-readOnly/reports.cy.js +++ b/cypress/e2e/03-readOnly/reports.cy.js @@ -1,5 +1,5 @@ import { testView } from '../../../test/_globals.js'; -import { logout, login, ajaxDelayMillis } from '../../support/index.js'; +import { ajaxDelayMillis, login, logout } from '../../support/index.js'; describe('Reports', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/03-readOnly/reports.cy.ts b/cypress/e2e/03-readOnly/reports.cy.ts index ff43c8a3..d82eaffb 100644 --- a/cypress/e2e/03-readOnly/reports.cy.ts +++ b/cypress/e2e/03-readOnly/reports.cy.ts @@ -1,6 +1,5 @@ import { testView } from '../../../test/_globals.js' - -import { logout, login, ajaxDelayMillis } from '../../support/index.js' +import { ajaxDelayMillis, login, logout } from '../../support/index.js' describe('Reports', () => { beforeEach(() => { diff --git a/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.js b/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.js index 07ca1bf0..90447c2b 100644 --- a/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.js +++ b/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.js @@ -1,5 +1,5 @@ import { testView } from '../../../test/_globals.js'; -import { logout, login, ajaxDelayMillis } from '../../support/index.js'; +import { ajaxDelayMillis, login, logout } from '../../support/index.js'; describe('Work Order Milestone Calendar', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.ts b/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.ts index d51cafd6..d603e829 100644 --- a/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.ts +++ b/cypress/e2e/03-readOnly/workOrderMilestoneCalendar.cy.ts @@ -1,6 +1,5 @@ import { testView } from '../../../test/_globals.js' - -import { logout, login, ajaxDelayMillis } from '../../support/index.js' +import { ajaxDelayMillis, login, logout } from '../../support/index.js' describe('Work Order Milestone Calendar', () => { beforeEach(() => { diff --git a/cypress/e2e/03-readOnly/workOrderOutlook.cy.js b/cypress/e2e/03-readOnly/workOrderOutlook.cy.js index a13b8c4b..26ee5c75 100644 --- a/cypress/e2e/03-readOnly/workOrderOutlook.cy.js +++ b/cypress/e2e/03-readOnly/workOrderOutlook.cy.js @@ -1,5 +1,5 @@ import { testView } from '../../../test/_globals.js'; -import { logout, login } from '../../support/index.js'; +import { login, logout } from '../../support/index.js'; describe('Work Order Outlook Integration', () => { beforeEach(() => { logout(); diff --git a/cypress/e2e/03-readOnly/workOrderOutlook.cy.ts b/cypress/e2e/03-readOnly/workOrderOutlook.cy.ts index 4e00e4c7..6a2b3910 100644 --- a/cypress/e2e/03-readOnly/workOrderOutlook.cy.ts +++ b/cypress/e2e/03-readOnly/workOrderOutlook.cy.ts @@ -1,6 +1,5 @@ import { testView } from '../../../test/_globals.js' - -import { logout, login } from '../../support/index.js' +import { login, logout } from '../../support/index.js' describe('Work Order Outlook Integration', () => { beforeEach(() => { diff --git a/cypress/e2e/xx-other/keepAlive.cy.ts b/cypress/e2e/xx-other/keepAlive.cy.ts index 3d9da018..6d3d9275 100644 --- a/cypress/e2e/xx-other/keepAlive.cy.ts +++ b/cypress/e2e/xx-other/keepAlive.cy.ts @@ -1,6 +1,3 @@ -/* eslint-disable promise/always-return */ -/* eslint-disable promise/catch-or-return */ - describe('Keep Alive', () => { it('Returns true', () => { cy.request('/keepAlive').then((response) => {