@m4l/testing 0.0.14-beta.1 → 0.0.14-beta.3
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/e2e/commands/components/DataGrid/types.d.ts +55 -0
- package/e2e/commands/components/DynamicFilter/types.d.ts +20 -0
- package/e2e/commands/components/DynamicSort/types.d.ts +10 -0
- package/e2e/commands/components/MenuActions/types.d.ts +9 -0
- package/e2e/commands/components/Popover/types.d.ts +9 -0
- package/e2e/commands/components/PropertyValue/types.d.ts +14 -0
- package/e2e/commands/components/Tab/types.d.ts +14 -0
- package/e2e/commands/components/WindowBase/types.d.ts +18 -0
- package/e2e/cypress.d.ts +18 -10
- package/package.json +2 -3
- package/vite-env.d.ts +5 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { M4LGetCypressDataGridColumnsConfig } from './export';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Cypress {
|
|
4
|
+
interface Chainable {
|
|
5
|
+
/**
|
|
6
|
+
* Obtiene el grid
|
|
7
|
+
* @param selector selector del grid
|
|
8
|
+
* @returns el grid
|
|
9
|
+
*/
|
|
10
|
+
m4lDataGrid(selector: string): Chainable<Element>
|
|
11
|
+
/**
|
|
12
|
+
* Valida las columnas visibles del grid
|
|
13
|
+
* @param selector selector del grid
|
|
14
|
+
* @param getColumnsConfig función que obtiene las columnas visibles del grid
|
|
15
|
+
* @param mockData datos del grid
|
|
16
|
+
* @param baseColumnIndex índice de la columna a obtener
|
|
17
|
+
*/
|
|
18
|
+
m4lDataGridValidateVisibleColumns<T>(
|
|
19
|
+
selector: string,
|
|
20
|
+
getColumnsConfig: M4LGetCypressDataGridColumnsConfig<T>,
|
|
21
|
+
mockData: T,
|
|
22
|
+
baseColumnIndex?: number
|
|
23
|
+
): Chainable<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Obtiene la fila del grid especificada por el índice de base 1, garantizando que esté visible en el viewport
|
|
26
|
+
* @param selector selector del grid
|
|
27
|
+
* @param targetRowBaseOneIndex índice de la fila a obtener
|
|
28
|
+
* @param baseOneColumnIndex índice de la columna a obtener
|
|
29
|
+
* @returns la fila del grid
|
|
30
|
+
*/
|
|
31
|
+
m4lDataGridRow(selector: string, targetRowBaseOneIndex: number, baseOneColumnIndex: number): Chainable<JQuery<HTMLElement>>;
|
|
32
|
+
/**
|
|
33
|
+
* Obtiene el rowAction del menuActions asociado a la fila del grid especificada por el índice de base 1
|
|
34
|
+
* @param selector selector del grid
|
|
35
|
+
* @param menuItemIndex índice del item del menuActions
|
|
36
|
+
* @param baseOneTargetRowIndex índice de la fila a obtener
|
|
37
|
+
* @param baseColbaseOneColumnIndexumnIndex índice de la columna a obtener
|
|
38
|
+
* @returns el rowAction del menuActions asociado a la fila del grid
|
|
39
|
+
*/
|
|
40
|
+
m4lDataGridRowAction(
|
|
41
|
+
selector: string,
|
|
42
|
+
menuItemIndex: number,
|
|
43
|
+
baseOnetargetRowIndex?: number,
|
|
44
|
+
baseOneColumnIndex?: number,
|
|
45
|
+
): Chainable<Element>
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Busca y muestra todas las columnas del grid principal
|
|
49
|
+
*/
|
|
50
|
+
m4lDataGridFindAllColumns(selector: string): Chainable<Element>
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Click en el input de filtro
|
|
6
|
+
*/
|
|
7
|
+
m4lDynamicFilterInputClick(): Chainable<Element>;
|
|
8
|
+
/**
|
|
9
|
+
* Aplicar el filtro de fecha
|
|
10
|
+
*/
|
|
11
|
+
m4lDynamicFilterApplyedDateField(dateFieldLabel: string): Chainable<Element>;
|
|
12
|
+
/**
|
|
13
|
+
* Obtiene el botón de refrescar
|
|
14
|
+
*/
|
|
15
|
+
m4lDynamicFilterRefreshButton(selector: string): Chainable<Element>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Obtiene el PropertyValue
|
|
6
|
+
* @param selector selector de la propiedad
|
|
7
|
+
* @returns el valor de la propiedad
|
|
8
|
+
*/
|
|
9
|
+
m4lPropertyValue(selector: string): Chainable<Element>
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Obtiene el botón de la pestaña indicada
|
|
6
|
+
* @param tabIndex índice de la pestaña a obtener
|
|
7
|
+
* @returns el botón de la pestaña indicada
|
|
8
|
+
*/
|
|
9
|
+
m4lTabButton(selector: string, tabIndex: number): Chainable<Element>
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
m4lWindowBaseHeader(): Chainable<Element>
|
|
5
|
+
m4lWindowBaseLeftAction(buttonPosition: number): Chainable<Element>
|
|
6
|
+
m4lWindowBaseLeftActionClick(buttonPosition: number): Chainable<Element>
|
|
7
|
+
m4lWindowBaseMenuAction(menuItemPosition: number): Chainable<Element>
|
|
8
|
+
m4lWindowBaseMenuActionDisabled(menuItemPosition: number): Chainable<Element>
|
|
9
|
+
|
|
10
|
+
// login(email: string, password: string): Chainable<void>
|
|
11
|
+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
12
|
+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
13
|
+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {};
|
package/e2e/cypress.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/// <reference path="./commands/components/DataGrid/types.d.ts" />
|
|
2
|
+
/// <reference path="./commands/components/DynamicFilter/types.d.ts" />
|
|
3
|
+
/// <reference path="./commands/components/DynamicSort/types.d.ts" />
|
|
4
|
+
/// <reference path="./commands/components/MenuActions/types.d.ts" />
|
|
5
|
+
/// <reference path="./commands/components/WindowBase/types.d.ts" />
|
|
6
|
+
/// <reference path="./commands/components/Popover/types.d.ts" />
|
|
7
|
+
/// <reference path="./commands/components/PropertyValue/types.d.ts" />
|
|
8
|
+
/// <reference path="./commands/components/Tab/types.d.ts" />
|
|
9
|
+
/// <reference path="./commands/intercepts/noPrivileges/types.d.ts" />
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
export type { M4LGetCypressDataGridColumnsConfig , M4LDataGridCypressColumn } from './commands/components/DataGrid/export';
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
declare global {
|
|
14
|
+
namespace Cypress {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
16
|
+
interface Chainable {
|
|
17
|
+
// Los tipos se extienden automáticamente desde los archivos importados
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
13
21
|
|
|
14
22
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/testing",
|
|
3
3
|
"description": "Shared testing utilities for MFs",
|
|
4
|
-
"version": "0.0.14-beta.
|
|
4
|
+
"version": "0.0.14-beta.3",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "M4L Team",
|
|
7
7
|
"scripts": {
|
|
@@ -119,6 +119,5 @@
|
|
|
119
119
|
"engines": {
|
|
120
120
|
"node": ">=12.0.0"
|
|
121
121
|
},
|
|
122
|
-
"packageManager": "yarn@4.5.0"
|
|
123
|
-
"juan": 1
|
|
122
|
+
"packageManager": "yarn@4.5.0"
|
|
124
123
|
}
|