code cleanup
parent
4115bdb8a5
commit
a09fcfa82b
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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', () => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue