@onehat/ui 0.3.284 → 0.3.285
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 +1 -1
- package/src/Functions/Cypress/button_functions.js +1 -1
- package/src/Functions/Cypress/common_functions.js +1 -1
- package/src/Functions/Cypress/crud_functions.js +7 -7
- package/src/Functions/Cypress/form_functions.js +3 -7
- package/src/Functions/Cypress/grid_functions.js +2 -2
- package/src/Functions/Cypress/navigation_functions.js +9 -16
- package/src/Functions/Cypress/index.js +0 -19
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixInflector,
|
|
3
3
|
getLastPartOfPath,
|
|
4
|
-
} from './utilities';
|
|
4
|
+
} from './utilities.js';
|
|
5
5
|
import {
|
|
6
6
|
loginAsSuper,
|
|
7
7
|
logout,
|
|
8
8
|
navigateViaTabOrHomeButtonTo,
|
|
9
|
-
} from './navigation_functions';
|
|
9
|
+
} from './navigation_functions.js';
|
|
10
10
|
import {
|
|
11
11
|
getDomNode,
|
|
12
12
|
getDomNodes,
|
|
13
|
-
} from './dom_functions';
|
|
13
|
+
} from './dom_functions.js';
|
|
14
14
|
import {
|
|
15
15
|
hasRowWithFieldValue,
|
|
16
16
|
getRowWithFieldValue,
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
getModelFromGridName,
|
|
25
25
|
getModelFromGridSelector,
|
|
26
26
|
getGridRowSelectorById,
|
|
27
|
-
} from './grid_functions';
|
|
27
|
+
} from './grid_functions.js';
|
|
28
28
|
import {
|
|
29
29
|
verifyNoErrorBox,
|
|
30
|
-
} from './common_functions';
|
|
30
|
+
} from './common_functions.js';
|
|
31
31
|
import {
|
|
32
32
|
fillForm,
|
|
33
33
|
getFormValues,
|
|
34
|
-
} from './form_functions';
|
|
34
|
+
} from './form_functions.js';
|
|
35
35
|
import {
|
|
36
36
|
clickAddButton,
|
|
37
37
|
clickSaveButton,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
clickButtonIfExists,
|
|
54
54
|
toFullMode,
|
|
55
55
|
toSideMode,
|
|
56
|
-
} from './button_functions';
|
|
56
|
+
} from './button_functions.js';
|
|
57
57
|
import Inflector from 'inflector-js';
|
|
58
58
|
import _ from 'lodash';
|
|
59
59
|
const $ = Cypress.$;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPropertyDefinitionFromSchema,
|
|
3
3
|
getLastPartOfPath,
|
|
4
|
-
} from './utilities';
|
|
4
|
+
} from './utilities.js';
|
|
5
5
|
import {
|
|
6
6
|
getDomNode,
|
|
7
7
|
getDomNodes,
|
|
8
8
|
getTestIdSelectors,
|
|
9
|
-
} from './dom_functions';
|
|
9
|
+
} from './dom_functions.js';
|
|
10
10
|
import {
|
|
11
11
|
crudCombo,
|
|
12
12
|
crudTag,
|
|
13
|
-
} from './crud_functions';
|
|
14
|
-
import {
|
|
15
|
-
getCustomEditorGetFn,
|
|
16
|
-
getCustomEditorSetFn,
|
|
17
|
-
} from './custom_form_functions'
|
|
13
|
+
} from './crud_functions.js';
|
|
18
14
|
import natsort from 'natsort';
|
|
19
15
|
import _ from 'lodash';
|
|
20
16
|
const $ = Cypress.$;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fixInflector,
|
|
3
3
|
getLastPartOfPath,
|
|
4
|
-
} from './utilities';
|
|
4
|
+
} from './utilities.js';
|
|
5
5
|
import {
|
|
6
6
|
getDomNode,
|
|
7
7
|
getDomNodes,
|
|
8
|
-
} from './dom_functions';
|
|
8
|
+
} from './dom_functions.js';
|
|
9
9
|
import Inflector from 'inflector-js';
|
|
10
10
|
import _ from 'lodash';
|
|
11
11
|
const $ = Cypress.$;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DOMAIN,
|
|
3
|
-
LOGIN_ID_FIELD,
|
|
4
|
-
SUPER_USER,
|
|
5
|
-
SUPER_EMAIL,
|
|
6
|
-
SUPER_PASSWORD,
|
|
7
|
-
} from './constants';
|
|
8
1
|
import {
|
|
9
2
|
getDomNode,
|
|
10
3
|
getDomNodes,
|
|
11
|
-
} from './dom_functions';
|
|
4
|
+
} from './dom_functions.js';
|
|
12
5
|
|
|
13
6
|
|
|
14
7
|
// __ _
|
|
@@ -18,11 +11,11 @@ import {
|
|
|
18
11
|
// /_____/\____/\__, /_/_/ /_/
|
|
19
12
|
// /____/
|
|
20
13
|
|
|
21
|
-
export function login(user, password) {
|
|
14
|
+
export function login(loginIdField, user, password) {
|
|
22
15
|
cy.visit(Cypress.env('baseUrl') + 'login')
|
|
23
16
|
.then(() => {
|
|
24
|
-
getDomNode(
|
|
25
|
-
getDomNode(
|
|
17
|
+
getDomNode(loginIdField).clear();
|
|
18
|
+
getDomNode(loginIdField).type(user);
|
|
26
19
|
|
|
27
20
|
getDomNode('password').clear();
|
|
28
21
|
getDomNode('password').type(password);
|
|
@@ -32,7 +25,7 @@ export function login(user, password) {
|
|
|
32
25
|
});
|
|
33
26
|
}
|
|
34
27
|
export function loginAsSuper() {
|
|
35
|
-
return login(
|
|
28
|
+
return login(loginIdField === 'username' ? SUPER_USER : SUPER_EMAIL, SUPER_PASSWORD);
|
|
36
29
|
}
|
|
37
30
|
export function logout() {
|
|
38
31
|
getDomNode('/logout').click({ force: true });
|
|
@@ -56,10 +49,10 @@ export function navigateToHome() {
|
|
|
56
49
|
navigateToScreen('/home');
|
|
57
50
|
}
|
|
58
51
|
export function navigateToScreen(path) {
|
|
59
|
-
cy.visit(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
cy.visit(Cypress.env('baseUrl') + path)
|
|
53
|
+
.then(() => {
|
|
54
|
+
cy.url().should('include', path);
|
|
55
|
+
});
|
|
63
56
|
}
|
|
64
57
|
// export function selectMainTab(name) {
|
|
65
58
|
// cy.get('.mainTabPanel .x-tab')
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as ButtonFunctions from './button_functions.js';
|
|
2
|
-
import * as CommonFunctions from './common_functions.js';
|
|
3
|
-
import * as CrudFunctions from './crud_functions.js';
|
|
4
|
-
import * as DomFunctions from './dom_functions.js';
|
|
5
|
-
import * as FormFunctions from './form_functions.js';
|
|
6
|
-
import * as GridFunctions from './grid_functions.js';
|
|
7
|
-
import * as NavigationFunctions from './navigation_functions.js';
|
|
8
|
-
import * as Utilities from './utilities.js';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
...ButtonFunctions,
|
|
12
|
-
...CommonFunctions,
|
|
13
|
-
...CrudFunctions,
|
|
14
|
-
...DomFunctions,
|
|
15
|
-
...FormFunctions,
|
|
16
|
-
...GridFunctions,
|
|
17
|
-
...NavigationFunctions,
|
|
18
|
-
...Utilities,
|
|
19
|
-
};
|