@m4l/testing 0.0.14-beta.1 → 0.0.14-beta.2

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.
@@ -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,10 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ m4lDynamicSortInputClick(): Chainable<Element>
5
+ m4lDynamicSortApplyedField(dateFieldLabel: string): Chainable<Element>
6
+ }
7
+ }
8
+ }
9
+
10
+ export {};
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ m4lMenuActionsItem(menuItemIndex: number): Chainable<Element>
5
+ }
6
+ }
7
+ }
8
+
9
+ export {};
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ m4lPopover(): Chainable<Element>
5
+ }
6
+ }
7
+ }
8
+
9
+ 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 {};
@@ -1 +1,2 @@
1
1
  export { registerCommands } from './register';
2
+ export type { M4LGetCypressDataGridColumnsConfig } from './components/DataGrid/export';
package/e2e/cypress.d.ts CHANGED
@@ -1,14 +1,21 @@
1
- import './commands/components/DataGrid/types.d';
2
- import './commands/components/DynamicFilter/types.d';
3
- import './commands/components/DynamicSort/types.d';
4
- import './commands/components/MenuActions/types.d';
5
- import './commands/components/WindowBase/types.d';
6
- import './commands/components/Popover/types.d';
7
- import './commands/components/PropertyValue/types.d';
8
- import './commands/components/Tab/types.d';
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
- import './commands/intercepts/noPrivileges/types';
11
11
 
12
- export type * from './commands/components/DataGrid/export';
12
+ declare global {
13
+ namespace Cypress {
14
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
15
+ interface Chainable {
16
+ // Los tipos se extienden automáticamente desde los archivos importados
17
+ }
18
+ }
19
+ }
13
20
 
14
21
  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.1",
4
+ "version": "0.0.14-beta.2",
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
  }
package/vite-env.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="vitest" />
3
+ /// <reference types="vitest/globals" />
4
+ /// <reference types="vitest/importMeta" />
5
+ /// <reference types="cypress" />