@onehat/ui 0.3.285 → 0.3.287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getLastPartOfPath,
|
|
4
4
|
} from './utilities.js';
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
login,
|
|
7
7
|
logout,
|
|
8
8
|
navigateViaTabOrHomeButtonTo,
|
|
9
9
|
} from './navigation_functions.js';
|
|
@@ -394,7 +394,7 @@ export function runClosureTreeControlledManagerScreenCrudTests(model, schema, ne
|
|
|
394
394
|
describe(Models + 'Manager', () => {
|
|
395
395
|
|
|
396
396
|
beforeEach(function () {
|
|
397
|
-
|
|
397
|
+
login();
|
|
398
398
|
cy.restoreLocalStorage();
|
|
399
399
|
cy.url().then((currentUrl) => {
|
|
400
400
|
if (!currentUrl.endsWith(url)) {
|
|
@@ -483,7 +483,7 @@ export function runClosureTreeManagerScreenCrudTests(model, schema, newData, edi
|
|
|
483
483
|
describe(Models + 'Manager', () => {
|
|
484
484
|
|
|
485
485
|
beforeEach(function () {
|
|
486
|
-
|
|
486
|
+
login();
|
|
487
487
|
cy.restoreLocalStorage();
|
|
488
488
|
cy.url().then((currentUrl) => {
|
|
489
489
|
if (!currentUrl.endsWith(url)) {
|
|
@@ -545,7 +545,7 @@ export function runInlineManagerScreenCrudTests(model, schema, newData, editData
|
|
|
545
545
|
describe(Models + 'Manager', () => {
|
|
546
546
|
|
|
547
547
|
beforeEach(function () {
|
|
548
|
-
|
|
548
|
+
login();
|
|
549
549
|
cy.restoreLocalStorage();
|
|
550
550
|
cy.url().then((currentUrl) => {
|
|
551
551
|
if (!currentUrl.endsWith(url)) {
|
|
@@ -597,7 +597,7 @@ export function runManagerScreenCrudTests(model, schema, newData, editData, anci
|
|
|
597
597
|
describe(Models + 'Manager', () => {
|
|
598
598
|
|
|
599
599
|
beforeEach(function () {
|
|
600
|
-
|
|
600
|
+
login();
|
|
601
601
|
cy.restoreLocalStorage();
|
|
602
602
|
cy.url().then((currentUrl) => {
|
|
603
603
|
if (!currentUrl.endsWith(url)) {
|
|
@@ -647,7 +647,7 @@ export function runReportsManagerTests(reportData) {
|
|
|
647
647
|
describe('ReportsManager', () => {
|
|
648
648
|
|
|
649
649
|
beforeEach(function () {
|
|
650
|
-
|
|
650
|
+
login();
|
|
651
651
|
cy.url().then((currentUrl) => {
|
|
652
652
|
if (!currentUrl.endsWith(url)) {
|
|
653
653
|
navigateViaTabOrHomeButtonTo(url);
|
|
@@ -11,11 +11,17 @@ import {
|
|
|
11
11
|
// /_____/\____/\__, /_/_/ /_/
|
|
12
12
|
// /____/
|
|
13
13
|
|
|
14
|
-
export function login(
|
|
14
|
+
export function login(loginId = null, password = null) {
|
|
15
|
+
if (!loginId) {
|
|
16
|
+
loginId = Cypress.env('loginId');
|
|
17
|
+
}
|
|
18
|
+
if (!password) {
|
|
19
|
+
password = Cypress.env('password');
|
|
20
|
+
}
|
|
15
21
|
cy.visit(Cypress.env('baseUrl') + 'login')
|
|
16
22
|
.then(() => {
|
|
17
|
-
getDomNode(
|
|
18
|
-
getDomNode(
|
|
23
|
+
getDomNode('loginId').clear();
|
|
24
|
+
getDomNode('loginId').type(loginId);
|
|
19
25
|
|
|
20
26
|
getDomNode('password').clear();
|
|
21
27
|
getDomNode('password').type(password);
|
|
@@ -24,9 +30,6 @@ export function login(loginIdField, user, password) {
|
|
|
24
30
|
cy.url().should('include', 'home');
|
|
25
31
|
});
|
|
26
32
|
}
|
|
27
|
-
export function loginAsSuper() {
|
|
28
|
-
return login(loginIdField === 'username' ? SUPER_USER : SUPER_EMAIL, SUPER_PASSWORD);
|
|
29
|
-
}
|
|
30
33
|
export function logout() {
|
|
31
34
|
getDomNode('/logout').click({ force: true });
|
|
32
35
|
}
|