@entifix/testing-e2e 0.19.0 → 0.20.1
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.
|
@@ -29,7 +29,10 @@ export declare class EntityTablePage {
|
|
|
29
29
|
get rows(): Locator;
|
|
30
30
|
/** Waits until the listing has painted at least one row. */
|
|
31
31
|
waitForRows(): Promise<void>;
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Column headers, in render order, as they are named: a header's
|
|
34
|
+
* `aria-hidden` decoration — the sort direction's glyph — is not its name.
|
|
35
|
+
*/
|
|
33
36
|
headers(): Promise<string[]>;
|
|
34
37
|
/**
|
|
35
38
|
* The values of one column, addressed by its header label rather than by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.d.ts","sourceRoot":"","sources":["../../src/playwright/entity-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEnE,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI;IAEvC,+BAA+B;IAC/B,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,4DAA4D;IACtD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAIlC
|
|
1
|
+
{"version":3,"file":"entity-table.d.ts","sourceRoot":"","sources":["../../src/playwright/entity-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,KAAK,IAAI,EA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CAAC,EAAE,MAAM,EAAE,SAAiB,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAajE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC,qEAAqE;IAC/D,MAAM,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrD;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAKpC"}
|
|
@@ -18,8 +18,16 @@ import { expect } from '@playwright/test';
|
|
|
18
18
|
/** Waits until the listing has painted at least one row. */ async waitForRows() {
|
|
19
19
|
await expect(this.rows.first()).toBeVisible();
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Column headers, in render order, as they are named: a header's
|
|
23
|
+
* `aria-hidden` decoration — the sort direction's glyph — is not its name.
|
|
24
|
+
*/ async headers() {
|
|
25
|
+
return this.page.locator('table thead th').evaluateAll((cells)=>cells.map((cell)=>{
|
|
26
|
+
var _copy_textContent;
|
|
27
|
+
const copy = cell.cloneNode(true);
|
|
28
|
+
for (const hidden of Array.from(copy.querySelectorAll('[aria-hidden="true"]')))hidden.remove();
|
|
29
|
+
return (_copy_textContent = copy.textContent) != null ? _copy_textContent : '';
|
|
30
|
+
}));
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* The values of one column, addressed by its header label rather than by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/playwright/entity-table.ts"],"sourcesContent":["import { expect, type Locator, type Page } from '@playwright/test';\n\n/** How a filter row is filled in. */\nexport interface FilterClause {\n member: string;\n operator: string;\n value: string;\n}\n\nexport interface SortClause {\n member: string;\n direction?: 'asc' | 'desc';\n}\n\n/**\n * A driver for the `EntityTable` organism: filters, sorting, paging and the\n * rendered rows.\n *\n * Every entity listing in the workspace is the same component, so its selectors\n * belong in one place rather than being re-declared as local helpers in each\n * suite — which is what the two admin specs did, with two different sets of\n * conventions for the same widget.\n *\n * The wide (grid) layout is what is asserted on. Both layouts always render —\n * the pivot is CSS-only, so there is no SSR hydration mismatch — and the table\n * is the one carrying column semantics.\n */\nexport class EntityTablePage {\n constructor(private readonly page: Page) {}\n\n /** Rows of the wide layout. */\n get rows(): Locator {\n return this.page.locator('table tbody tr');\n }\n\n /** Waits until the listing has painted at least one row. */\n async waitForRows(): Promise<void> {\n await expect(this.rows.first()).toBeVisible();\n }\n\n /** Column headers, in render order. */\n async headers(): Promise<string[]> {\n return this.page.locator('table thead th').allInnerTexts();\n }\n\n /**\n * The values of one column, addressed by its header label rather than by\n * position: a column added to the entity — or reordered by the user's saved\n * preferences — must not silently shift what a spec is asserting on.\n */\n async columnValues(header: string): Promise<string[]> {\n const index = (await this.headers()).findIndex(\n label => label.trim() === header,\n );\n if (index === -1) {\n throw new Error(\n `No column headed \"${header}\". Rendered columns: ${(await this.headers()).join(', ')}.`,\n );\n }\n return this.page\n .locator(`table tbody tr td:nth-child(${index + 1})`)\n .allInnerTexts();\n }\n\n /** The distinct values of a column, sorted — the usual assertion subject. */\n async distinctColumnValues(header: string): Promise<string[]> {\n return [...new Set(await this.columnValues(header))].sort();\n }\n\n // --- filtering ----------------------------------------------------------\n\n async openFilters(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Filtros', exact: true })\n .click();\n }\n\n /** `and` (default) or `or` across the rows of the panel. */\n async matchAny(match: 'and' | 'or'): Promise<void> {\n await this.page\n .getByLabel('Coincidir todos o cualquiera de los filtros')\n .selectOption(match);\n }\n\n /**\n * Adds a filter row and fills it in.\n *\n * The member is always selected explicitly, never left at the default: a new\n * row defaults to the entity's *first filterable* member, so a spec relying\n * on it would break the moment a member is declared ahead of that one.\n */\n async addFilter({ member, operator, value }: FilterClause): Promise<void> {\n const index = await this.page.getByLabel('Miembro del filtro').count();\n await this.page.getByRole('button', { name: 'Añadir filtro' }).click();\n await this.page\n .getByLabel('Miembro del filtro')\n .nth(index)\n .selectOption(member);\n await this.page\n .getByLabel('Operador del filtro')\n .nth(index)\n .selectOption(operator);\n await this.page.getByLabel('Valor del filtro').nth(index).fill(value);\n }\n\n /** Filtering is emitted on Apply, not per keystroke — each emission is a request. */\n async applyFilters(): Promise<void> {\n await this.page.getByRole('button', { name: 'Aplicar filtros' }).click();\n }\n\n async clearFilters(): Promise<void> {\n await this.page.getByRole('button', { name: 'Limpiar filtros' }).click();\n }\n\n /** Opens the panel, adds every clause, applies. */\n async filterBy(...clauses: FilterClause[]): Promise<void> {\n await this.openFilters();\n for (const clause of clauses) {\n await this.addFilter(clause);\n }\n await this.applyFilters();\n }\n\n // --- sorting ------------------------------------------------------------\n\n async openSorting(): Promise<void> {\n await this.page.getByRole('button', { name: 'Orden', exact: true }).click();\n }\n\n async addSort({ member, direction = 'asc' }: SortClause): Promise<void> {\n const index = await this.page.getByLabel('Miembro de orden').count();\n await this.page.getByRole('button', { name: 'Añadir orden' }).click();\n await this.page\n .getByLabel('Miembro de orden')\n .nth(index)\n .selectOption(member);\n await this.page\n .getByLabel('Dirección de orden')\n .nth(index)\n .selectOption(direction);\n }\n\n async applySorting(): Promise<void> {\n await this.page.getByRole('button', { name: 'Aplicar orden' }).click();\n }\n\n /** Opens the panel, adds every term in precedence order, applies. */\n async sortBy(...clauses: SortClause[]): Promise<void> {\n await this.openSorting();\n for (const clause of clauses) {\n await this.addSort(clause);\n }\n await this.applySorting();\n }\n\n // --- paging -------------------------------------------------------------\n\n /**\n * `exact` matters: Next.js' dev-tools button also matches a loose \"Siguiente\".\n */\n async nextPage(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Siguiente', exact: true })\n .click();\n }\n\n async previousPage(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Anterior', exact: true })\n .click();\n }\n}\n"],"names":["expect","EntityTablePage","rows","page","locator","waitForRows","first","toBeVisible","headers","allInnerTexts","columnValues","header","index","findIndex","label","trim","Error","join","distinctColumnValues","Set","sort","openFilters","getByRole","name","exact","click","matchAny","match","getByLabel","selectOption","addFilter","member","operator","value","count","nth","fill","applyFilters","clearFilters","filterBy","clauses","clause","openSorting","addSort","direction","applySorting","sortBy","nextPage","previousPage"],"mappings":"AAAA,SAASA,MAAM,QAAiC,mBAAmB;AAcnE;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC;IAGX,6BAA6B,GAC7B,IAAIC,OAAgB;QAClB,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,CAAC;IAC3B;IAEA,0DAA0D,GAC1D,MAAMC,cAA6B;QACjC,MAAML,OAAO,IAAI,CAACE,IAAI,CAACI,KAAK,IAAIC,WAAW;IAC7C;IAEA,qCAAqC,GACrC,MAAMC,UAA6B;QACjC,OAAO,IAAI,CAACL,IAAI,CAACC,OAAO,CAAC,kBAAkBK,aAAa;IAC1D;IAEA;;;;GAIC,GACD,MAAMC,aAAaC,MAAc,EAAqB;QACpD,MAAMC,QAAQ,AAAC,CAAA,MAAM,IAAI,CAACJ,OAAO,EAAC,EAAGK,SAAS,CAC5CC,CAAAA,QAASA,MAAMC,IAAI,OAAOJ;QAE5B,IAAIC,UAAU,CAAC,GAAG;YAChB,MAAM,IAAII,MACR,CAAC,kBAAkB,EAAEL,OAAO,qBAAqB,EAAE,AAAC,CAAA,MAAM,IAAI,CAACH,OAAO,EAAC,EAAGS,IAAI,CAAC,MAAM,CAAC,CAAC;QAE3F;QACA,OAAO,IAAI,CAACd,IAAI,CACbC,OAAO,CAAC,CAAC,4BAA4B,EAAEQ,QAAQ,EAAE,CAAC,CAAC,EACnDH,aAAa;IAClB;IAEA,2EAA2E,GAC3E,MAAMS,qBAAqBP,MAAc,EAAqB;QAC5D,OAAO;eAAI,IAAIQ,IAAI,MAAM,IAAI,CAACT,YAAY,CAACC;SAAS,CAACS,IAAI;IAC3D;IAEA,2EAA2E;IAE3E,MAAMC,cAA6B;QACjC,MAAM,IAAI,CAAClB,IAAI,CACZmB,SAAS,CAAC,UAAU;YA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{ expect, type Locator, type Page } from '@playwright/test';\n\n/** How a filter row is filled in. */\nexport interface FilterClause {\n member: string;\n operator: string;\n value: string;\n}\n\nexport interface SortClause {\n member: string;\n direction?: 'asc' | 'desc';\n}\n\n/**\n * A driver for the `EntityTable` organism: filters, sorting, paging and the\n * rendered rows.\n *\n * Every entity listing in the workspace is the same component, so its selectors\n * belong in one place rather than being re-declared as local helpers in each\n * suite — which is what the two admin specs did, with two different sets of\n * conventions for the same widget.\n *\n * The wide (grid) layout is what is asserted on. Both layouts always render —\n * the pivot is CSS-only, so there is no SSR hydration mismatch — and the table\n * is the one carrying column semantics.\n */\nexport class EntityTablePage {\n constructor(private readonly page: Page) {}\n\n /** Rows of the wide layout. */\n get rows(): Locator {\n return this.page.locator('table tbody tr');\n }\n\n /** Waits until the listing has painted at least one row. */\n async waitForRows(): Promise<void> {\n await expect(this.rows.first()).toBeVisible();\n }\n\n /**\n * Column headers, in render order, as they are named: a header's\n * `aria-hidden` decoration — the sort direction's glyph — is not its name.\n */\n async headers(): Promise<string[]> {\n return this.page.locator('table thead th').evaluateAll(cells =>\n cells.map(cell => {\n const copy = cell.cloneNode(true) as Element;\n for (const hidden of Array.from(\n copy.querySelectorAll('[aria-hidden=\"true\"]'),\n ))\n hidden.remove();\n return copy.textContent ?? '';\n }),\n );\n }\n\n /**\n * The values of one column, addressed by its header label rather than by\n * position: a column added to the entity — or reordered by the user's saved\n * preferences — must not silently shift what a spec is asserting on.\n */\n async columnValues(header: string): Promise<string[]> {\n const index = (await this.headers()).findIndex(\n label => label.trim() === header,\n );\n if (index === -1) {\n throw new Error(\n `No column headed \"${header}\". Rendered columns: ${(await this.headers()).join(', ')}.`,\n );\n }\n return this.page\n .locator(`table tbody tr td:nth-child(${index + 1})`)\n .allInnerTexts();\n }\n\n /** The distinct values of a column, sorted — the usual assertion subject. */\n async distinctColumnValues(header: string): Promise<string[]> {\n return [...new Set(await this.columnValues(header))].sort();\n }\n\n // --- filtering ----------------------------------------------------------\n\n async openFilters(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Filtros', exact: true })\n .click();\n }\n\n /** `and` (default) or `or` across the rows of the panel. */\n async matchAny(match: 'and' | 'or'): Promise<void> {\n await this.page\n .getByLabel('Coincidir todos o cualquiera de los filtros')\n .selectOption(match);\n }\n\n /**\n * Adds a filter row and fills it in.\n *\n * The member is always selected explicitly, never left at the default: a new\n * row defaults to the entity's *first filterable* member, so a spec relying\n * on it would break the moment a member is declared ahead of that one.\n */\n async addFilter({ member, operator, value }: FilterClause): Promise<void> {\n const index = await this.page.getByLabel('Miembro del filtro').count();\n await this.page.getByRole('button', { name: 'Añadir filtro' }).click();\n await this.page\n .getByLabel('Miembro del filtro')\n .nth(index)\n .selectOption(member);\n await this.page\n .getByLabel('Operador del filtro')\n .nth(index)\n .selectOption(operator);\n await this.page.getByLabel('Valor del filtro').nth(index).fill(value);\n }\n\n /** Filtering is emitted on Apply, not per keystroke — each emission is a request. */\n async applyFilters(): Promise<void> {\n await this.page.getByRole('button', { name: 'Aplicar filtros' }).click();\n }\n\n async clearFilters(): Promise<void> {\n await this.page.getByRole('button', { name: 'Limpiar filtros' }).click();\n }\n\n /** Opens the panel, adds every clause, applies. */\n async filterBy(...clauses: FilterClause[]): Promise<void> {\n await this.openFilters();\n for (const clause of clauses) {\n await this.addFilter(clause);\n }\n await this.applyFilters();\n }\n\n // --- sorting ------------------------------------------------------------\n\n async openSorting(): Promise<void> {\n await this.page.getByRole('button', { name: 'Orden', exact: true }).click();\n }\n\n async addSort({ member, direction = 'asc' }: SortClause): Promise<void> {\n const index = await this.page.getByLabel('Miembro de orden').count();\n await this.page.getByRole('button', { name: 'Añadir orden' }).click();\n await this.page\n .getByLabel('Miembro de orden')\n .nth(index)\n .selectOption(member);\n await this.page\n .getByLabel('Dirección de orden')\n .nth(index)\n .selectOption(direction);\n }\n\n async applySorting(): Promise<void> {\n await this.page.getByRole('button', { name: 'Aplicar orden' }).click();\n }\n\n /** Opens the panel, adds every term in precedence order, applies. */\n async sortBy(...clauses: SortClause[]): Promise<void> {\n await this.openSorting();\n for (const clause of clauses) {\n await this.addSort(clause);\n }\n await this.applySorting();\n }\n\n // --- paging -------------------------------------------------------------\n\n /**\n * `exact` matters: Next.js' dev-tools button also matches a loose \"Siguiente\".\n */\n async nextPage(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Siguiente', exact: true })\n .click();\n }\n\n async previousPage(): Promise<void> {\n await this.page\n .getByRole('button', { name: 'Anterior', exact: true })\n .click();\n }\n}\n"],"names":["expect","EntityTablePage","rows","page","locator","waitForRows","first","toBeVisible","headers","evaluateAll","cells","map","cell","copy","cloneNode","hidden","Array","from","querySelectorAll","remove","textContent","columnValues","header","index","findIndex","label","trim","Error","join","allInnerTexts","distinctColumnValues","Set","sort","openFilters","getByRole","name","exact","click","matchAny","match","getByLabel","selectOption","addFilter","member","operator","value","count","nth","fill","applyFilters","clearFilters","filterBy","clauses","clause","openSorting","addSort","direction","applySorting","sortBy","nextPage","previousPage"],"mappings":"AAAA,SAASA,MAAM,QAAiC,mBAAmB;AAcnE;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC;IAGX,6BAA6B,GAC7B,IAAIC,OAAgB;QAClB,OAAO,IAAI,CAACC,IAAI,CAACC,OAAO,CAAC;IAC3B;IAEA,0DAA0D,GAC1D,MAAMC,cAA6B;QACjC,MAAML,OAAO,IAAI,CAACE,IAAI,CAACI,KAAK,IAAIC,WAAW;IAC7C;IAEA;;;GAGC,GACD,MAAMC,UAA6B;QACjC,OAAO,IAAI,CAACL,IAAI,CAACC,OAAO,CAAC,kBAAkBK,WAAW,CAACC,CAAAA,QACrDA,MAAMC,GAAG,CAACC,CAAAA;oBAMDC;gBALP,MAAMA,OAAOD,KAAKE,SAAS,CAAC;gBAC5B,KAAK,MAAMC,UAAUC,MAAMC,IAAI,CAC7BJ,KAAKK,gBAAgB,CAAC,yBAEtBH,OAAOI,MAAM;gBACf,QAAON,oBAAAA,KAAKO,WAAW,YAAhBP,oB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ACe;IAClB;IAEA,MAAMC,eAA8B;QAClC,MAAM,IAAI,CAACtD,IAAI,CAAC+B,SAAS,CAAC,UAAU;YAAEC,MAAM;QAAgB,GAAGE,KAAK;IACtE;IAEA,mEAAmE,GACnE,MAAMqB,OAAO,GAAGN,OAAqB,EAAiB;QACpD,MAAM,IAAI,CAACE,WAAW;QACtB,KAAK,MAAMD,UAAUD,QAAS;YAC5B,MAAM,IAAI,CAACG,OAAO,CAACF;QACrB;QACA,MAAM,IAAI,CAACI,YAAY;IACzB;IAEA,2EAA2E;IAE3E;;GAEC,GACD,MAAME,WAA0B;QAC9B,MAAM,IAAI,CAACxD,IAAI,CACZ+B,SAAS,CAAC,UAAU;YAAEC,MAAM;YAAaC,OAAO;QAAK,GACrDC,KAAK;IACV;IAEA,MAAMuB,eAA8B;QAClC,MAAM,IAAI,CAACzD,IAAI,CACZ+B,SAAS,CAAC,UAAU;YAAEC,MAAM;YAAYC,OAAO;QAAK,GACpDC,KAAK;IACV;IA1JA,YAAY,AAAiBlC,IAAU,CAAE;aAAZA,OAAAA;IAAa;AA2J5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/testing-e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
4
4
|
"description": "End-to-end testing with one set of journeys and two profiles: mocked backends by default, real infrastructure on demand.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@swc/helpers": "0.5.23",
|
|
75
|
-
"@entifix/business": "0.
|
|
76
|
-
"@entifix/core": "0.
|
|
77
|
-
"@entifix/testing-unit": "0.
|
|
75
|
+
"@entifix/business": "0.20.1",
|
|
76
|
+
"@entifix/core": "0.20.1",
|
|
77
|
+
"@entifix/testing-unit": "0.20.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"@axe-core/playwright": ">=4.14 <5",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"effect": "^4.0.7",
|
|
87
87
|
"msw": ">=3",
|
|
88
88
|
"vitest": "*",
|
|
89
|
-
"@entifix/
|
|
90
|
-
"@entifix/
|
|
91
|
-
"@entifix/mongo": "0.
|
|
89
|
+
"@entifix/redis": "0.20.1",
|
|
90
|
+
"@entifix/amqp": "0.20.1",
|
|
91
|
+
"@entifix/mongo": "0.20.1"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
|
94
94
|
"@axe-core/playwright": {
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
"@nx/devkit": "24.0.3",
|
|
130
130
|
"@nx/playwright": "24.0.3",
|
|
131
131
|
"effect": "4.0.7",
|
|
132
|
-
"@entifix/amqp": "0.
|
|
133
|
-
"@entifix/mongo": "0.
|
|
134
|
-
"@entifix/redis": "0.
|
|
132
|
+
"@entifix/amqp": "0.20.1",
|
|
133
|
+
"@entifix/mongo": "0.20.1",
|
|
134
|
+
"@entifix/redis": "0.20.1"
|
|
135
135
|
}
|
|
136
136
|
}
|