@cerios/playwright-table 1.1.1 → 2.0.0

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/playwright-table.ts","../src/cell-content-type.ts","../src/table-utils.ts","../src/table-body.ts","../src/table-header.ts","../src/table-wait.ts"],"sourcesContent":["import { expect, Locator } from \"@playwright/test\";\r\nimport { TableBody } from \"./table-body\";\r\nimport { BodyRow, Cell, HeaderRow } from \"./row\";\r\nimport { HeaderRowOptions, TableHeader } from \"./table-header\";\r\nimport { RowKind, TableWait } from \"./table-wait\";\r\n\r\nexport class PlaywrightTable {\r\n\tprivate _headers: HeaderRow[] = [];\r\n\tprivate _rows: BodyRow[] = [];\r\n\tprivate _bodyRowLocator: Locator;\r\n\tprivate _bodyRowColumnSelector: string;\r\n\tprivate _headerRowLocator: Locator;\r\n\tprivate _headerColumnSelector: string;\r\n\r\n\tconstructor(\r\n\t\tprivate readonly _tableLocator: Locator,\r\n\t\tprivate readonly _options?: {\r\n\t\t\theader?: {\r\n\t\t\t\tsetMainHeaderRow?: number;\r\n\t\t\t\trowSelector?: string;\r\n\t\t\t\tcolumnSelector?: string;\r\n\t\t\t};\r\n\t\t\trow?: {\r\n\t\t\t\trowSelector?: string;\r\n\t\t\t\tcolumnSelector?: string;\r\n\t\t\t};\r\n\t\t}\r\n\t) {\r\n\t\tthis._headerRowLocator = this._tableLocator.locator(this._options?.header?.rowSelector ?? \"thead>tr\");\r\n\t\tthis._headerColumnSelector = this._options?.header?.columnSelector ?? \"th\";\r\n\t\tthis._bodyRowLocator = this._tableLocator.locator(this._options?.row?.rowSelector ?? \"tbody>tr\");\r\n\t\tthis._bodyRowColumnSelector = this._options?.row?.columnSelector ?? \"td\";\r\n\t}\r\n\r\n\tasync getHeaderRows(options?: {\r\n\t\ttimeout?: number;\r\n\t\tduplicateSuffix?: boolean;\r\n\t\theaderRowOptions?: HeaderRowOptions;\r\n\t}): Promise<HeaderRow[]> {\r\n\t\tawait this.load(options);\r\n\t\treturn this._headers;\r\n\t}\r\n\r\n\tasync getMainHeaderRow(options?: {\r\n\t\ttimeout?: number;\r\n\t\tduplicateSuffix?: boolean;\r\n\t\theaderRowOptions?: HeaderRowOptions;\r\n\t}): Promise<HeaderRow> {\r\n\t\tconst headerRows = await this.getHeaderRows(options);\r\n\t\tconst headers = this._options?.header?.setMainHeaderRow\r\n\t\t\t? headerRows[this._options.header.setMainHeaderRow]\r\n\t\t\t: headerRows[this._headers.length - 1];\r\n\t\treturn headers;\r\n\t}\r\n\r\n\tasync getBodyRows(options?: { timeout?: number }): Promise<BodyRow[]> {\r\n\t\tawait this.load({ ...options, headerRowOptions: { colspan: { enabled: true } } });\r\n\t\treturn this._rows;\r\n\t}\r\n\r\n\tgetBodyCellLocator(rowNumber: number, headerPosition: number): Locator {\r\n\t\treturn this._bodyRowLocator.nth(rowNumber).locator(this._bodyRowColumnSelector).nth(headerPosition);\r\n\t}\r\n\r\n\tasync getBodyCellLocatorByRowConditions(\r\n\t\tconditions: Record<string, string>,\r\n\t\ttargetHeader: string,\r\n\t\toptions?: { timeout?: number; duplicateSuffix?: boolean; colspanEnabled?: boolean }\r\n\t): Promise<Locator> {\r\n\t\tawait this.load(options);\r\n\t\tconst headers = await this.getMainHeaderRow();\r\n\r\n\t\tconst targetHeaderIndex = headers.indexOf(targetHeader);\r\n\t\tif (targetHeaderIndex === -1) {\r\n\t\t\tthrow new Error(`Header \"${targetHeader}\" not found.`);\r\n\t\t}\r\n\r\n\t\tfor (let rowIndex = 0; rowIndex < this._rows.length; rowIndex++) {\r\n\t\t\tconst row = this._rows[rowIndex];\r\n\t\t\tlet matches = true;\r\n\r\n\t\t\tfor (const [header, value] of Object.entries(conditions)) {\r\n\t\t\t\tconst headerIndex = headers.indexOf(header);\r\n\t\t\t\tif (headerIndex === -1) {\r\n\t\t\t\t\tthrow new Error(`Header \"${header}\" not found.`);\r\n\t\t\t\t}\r\n\t\t\t\tif (row[headerIndex] !== value) {\r\n\t\t\t\t\tmatches = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (matches) {\r\n\t\t\t\treturn this.getBodyCellLocator(rowIndex, targetHeaderIndex);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthrow new Error(`No row found matching conditions: ${JSON.stringify(conditions)}`);\r\n\t}\r\n\r\n\tasync getAllBodyCellLocatorsByHeaderName(header: string, options?: { timeout?: number }): Promise<Locator[]> {\r\n\t\tawait this.load(options);\r\n\t\tconst headers = await this.getMainHeaderRow();\r\n\t\tconst headerIndex = headers.indexOf(header);\r\n\t\tif (headerIndex === -1) {\r\n\t\t\tthrow new Error(`Header \"${header}\" not found.`);\r\n\t\t}\r\n\t\tconst locators: Locator[] = [];\r\n\t\tfor (let rowIndex = 0; rowIndex < this._rows.length; rowIndex++) {\r\n\t\t\tconst cellLocator = this.getBodyCellLocator(rowIndex, headerIndex);\r\n\t\t\tlocators.push(cellLocator);\r\n\t\t}\r\n\t\treturn locators;\r\n\t}\r\n\r\n\tasync getAllBodyCellLocatorsByHeaderIndex(headerIndex: number): Promise<Locator[]> {\r\n\t\tawait this.load();\r\n\t\tconst locators: Locator[] = [];\r\n\t\tfor (let rowIndex = 0; rowIndex < this._rows.length; rowIndex++) {\r\n\t\t\tconst cellLocator = this.getBodyCellLocator(rowIndex, headerIndex);\r\n\t\t\tlocators.push(cellLocator);\r\n\t\t}\r\n\t\treturn locators;\r\n\t}\r\n\r\n\tasync getJson(options?: { timeout?: number }): Promise<any> {\r\n\t\tconst headers = await this.getMainHeaderRow({\r\n\t\t\ttimeout: options?.timeout,\r\n\t\t\tduplicateSuffix: true,\r\n\t\t\theaderRowOptions: {\r\n\t\t\t\tcolspan: { enabled: true, suffix: true },\r\n\t\t\t\tduplicateSuffix: true,\r\n\t\t\t\temptyCellReplacement: true,\r\n\t\t\t},\r\n\t\t});\r\n\t\treturn this._rows.map(row => {\r\n\t\t\tconst rowObj: Record<string, Cell> = {};\r\n\t\t\theaders.forEach((header, index) => {\r\n\t\t\t\trowObj[header] = row[index] || \"\";\r\n\t\t\t});\r\n\t\t\treturn rowObj;\r\n\t\t});\r\n\t}\r\n\r\n\tasync waitForHeaderRows(options?: {\r\n\t\ttimeout?: number;\r\n\t\trow?: {\r\n\t\t\tamount?: number;\r\n\t\t\tcell?: {\r\n\t\t\t\ttotalCount?: number;\r\n\t\t\t\tcontentCount?: number;\r\n\t\t\t};\r\n\t\t};\r\n\t}): Promise<void> {\r\n\t\tawait expect(\r\n\t\t\tasync () =>\r\n\t\t\t\tawait TableWait.waitForRows(this._headerRowLocator, this._headerColumnSelector, RowKind.Header, options)\r\n\t\t).toPass({\r\n\t\t\ttimeout: options?.timeout,\r\n\t\t});\r\n\t}\r\n\r\n\tasync waitForBodyRows(options?: {\r\n\t\ttimeout?: number;\r\n\t\trow?: {\r\n\t\t\tamount?: number;\r\n\t\t\tcell?: {\r\n\t\t\t\ttotalCount?: number;\r\n\t\t\t\tcontentCount?: number;\r\n\t\t\t};\r\n\t\t};\r\n\t}): Promise<void> {\r\n\t\tawait expect(\r\n\t\t\tasync () => await TableWait.waitForRows(this._bodyRowLocator, this._bodyRowColumnSelector, RowKind.Body, options)\r\n\t\t).toPass({\r\n\t\t\ttimeout: options?.timeout,\r\n\t\t});\r\n\t}\r\n\r\n\tprivate async load(options?: { timeout?: number; headerRowOptions?: HeaderRowOptions }): Promise<void> {\r\n\t\tawait expect(async () => {\r\n\t\t\tawait TableWait.waitForRows(this._headerRowLocator, this._headerColumnSelector, RowKind.Header);\r\n\t\t\tawait TableWait.waitForRows(this._bodyRowLocator, this._bodyRowColumnSelector, RowKind.Body);\r\n\t\t}).toPass({ timeout: options?.timeout });\r\n\r\n\t\tthis._headers = await TableHeader.getRows(\r\n\t\t\tthis._headerRowLocator,\r\n\t\t\tthis._headerColumnSelector,\r\n\t\t\toptions?.headerRowOptions\r\n\t\t);\r\n\t\tthis._rows = await TableBody.getRows(this._bodyRowLocator, this._bodyRowColumnSelector);\r\n\t}\r\n}\r\n","export enum CellContentType {\r\n\tTextContent = \"textContent\",\r\n\tInnerText = \"innerText\",\r\n}\r\n","import { Locator } from \"@playwright/test\";\r\nimport { CellContentType } from \"./cell-content-type\";\r\nimport { Cell } from \"./row\";\r\n\r\nexport abstract class TableUtils {\r\n\tstatic async getCellContent(cell: Locator, cellContentType: CellContentType): Promise<string> {\r\n\t\tconst content = cellContentType === CellContentType.InnerText ? await cell.innerText() : await cell.textContent();\r\n\t\treturn content?.trim() || \"\";\r\n\t}\r\n\r\n\tstatic async parseSpanAttributes(cell: Locator): Promise<{ rowspan: number; colspan: number }> {\r\n\t\treturn {\r\n\t\t\trowspan: parseInt((await cell.getAttribute(\"rowspan\")) || \"1\", 10),\r\n\t\t\tcolspan: parseInt((await cell.getAttribute(\"colspan\")) || \"1\", 10),\r\n\t\t};\r\n\t}\r\n\r\n\tstatic castContent(value: string): Cell {\r\n\t\tconst trimmedValue = value.trim();\r\n\r\n\t\tif (trimmedValue === \"\") return \"\";\r\n\r\n\t\tconst lowerValue = trimmedValue.toLowerCase();\r\n\r\n\t\tif (lowerValue === \"true\") return true;\r\n\t\tif (lowerValue === \"false\") return false;\r\n\r\n\t\tconst num = Number(trimmedValue);\r\n\t\treturn isNaN(num) ? trimmedValue : num;\r\n\t}\r\n}\r\n","import { Locator } from \"@playwright/test\";\r\nimport { BodyRow, Cell } from \"./row\";\r\nimport { CellContentType } from \"./cell-content-type\";\r\nimport { TableUtils } from \"./table-utils\";\r\n\r\nexport abstract class TableBody {\r\n\tstatic async getRows(\r\n\t\trowLocator: Locator,\r\n\t\tcolumnsSelector: string,\r\n\t\tbodyRowsOptions?: {\r\n\t\t\tcellContentType?: CellContentType;\r\n\t\t}\r\n\t): Promise<BodyRow[]> {\r\n\t\tconst rows: BodyRow[] = [];\r\n\t\tconst rowsCount = await rowLocator.count();\r\n\t\tconst spannedCells: Record<number, Cell[]> = {};\r\n\r\n\t\tfor (let rowIndex = 0; rowIndex < rowsCount; rowIndex++) {\r\n\t\t\tconst row = rowLocator.nth(rowIndex);\r\n\t\t\tconst columns = await this.extractColumns(\r\n\t\t\t\trow,\r\n\t\t\t\tcolumnsSelector,\r\n\t\t\t\trowIndex,\r\n\t\t\t\tspannedCells,\r\n\t\t\t\tbodyRowsOptions?.cellContentType\r\n\t\t\t);\r\n\t\t\trows.push(columns as BodyRow);\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t}\r\n\r\n\tprivate static async extractColumns(\r\n\t\trow: Locator,\r\n\t\tcolumnsSelector: string,\r\n\t\trowIndex: number,\r\n\t\tspannedCells: Record<number, Cell[]>,\r\n\t\tcellContentType?: CellContentType\r\n\t): Promise<Cell[]> {\r\n\t\tconst columns: Cell[] = [];\r\n\t\tconst columnLocators = row.locator(columnsSelector);\r\n\t\tconst columnCount = await columnLocators.count();\r\n\r\n\t\tfor (let colIndex = 0; colIndex < columnCount; colIndex++) {\r\n\t\t\tawait this.processColumn(\r\n\t\t\t\tcolumnLocators.nth(colIndex),\r\n\t\t\t\tcolIndex,\r\n\t\t\t\tcolumns,\r\n\t\t\t\trowIndex,\r\n\t\t\t\tspannedCells,\r\n\t\t\t\tcellContentType\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis.applySpannedCells(spannedCells, rowIndex, columns);\r\n\r\n\t\treturn columns;\r\n\t}\r\n\r\n\tprivate static async processColumn(\r\n\t\tcolumn: Locator,\r\n\t\tcolIndex: number,\r\n\t\tcolumns: Cell[],\r\n\t\trowIndex: number,\r\n\t\tspannedCells: Record<number, Cell[]>,\r\n\t\tcellContentType: CellContentType = CellContentType.InnerText\r\n\t): Promise<void> {\r\n\t\tconst content = await TableUtils.getCellContent(column, cellContentType);\r\n\t\tconst castedContent = TableUtils.castContent(content);\r\n\r\n\t\tconst { rowspan, colspan } = await TableUtils.parseSpanAttributes(column);\r\n\r\n\t\tfor (let span = 0; span < colspan; span++) {\r\n\t\t\tcolumns[colIndex + span] = castedContent;\r\n\t\t}\r\n\r\n\t\tif (rowspan > 1) {\r\n\t\t\tthis.storeSpannedCells(rowIndex, colIndex, rowspan, castedContent, spannedCells);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static storeSpannedCells(\r\n\t\trowIndex: number,\r\n\t\tcolIndex: number,\r\n\t\trowspan: number,\r\n\t\tcontent: Cell,\r\n\t\tspannedCells: Record<number, Cell[]>\r\n\t): void {\r\n\t\tfor (let span = 1; span < rowspan; span++) {\r\n\t\t\tif (!spannedCells[rowIndex + span]) {\r\n\t\t\t\tspannedCells[rowIndex + span] = [];\r\n\t\t\t}\r\n\t\t\tspannedCells[rowIndex + span][colIndex] = content;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static applySpannedCells(spannedCells: Record<number, Cell[]>, rowIndex: number, columns: Cell[]): void {\r\n\t\tif (spannedCells[rowIndex]) {\r\n\t\t\tspannedCells[rowIndex].forEach((spannedContent, colIndex) => {\r\n\t\t\t\tif (spannedContent !== undefined) {\r\n\t\t\t\t\tcolumns[colIndex] = spannedContent;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n","import { Locator } from \"@playwright/test\";\r\nimport { HeaderRow } from \"./row\";\r\nimport { CellContentType } from \"./cell-content-type\";\r\nimport { TableUtils } from \"./table-utils\";\r\n\r\nexport type HeaderRowOptions = {\r\n\tcellContentType?: CellContentType;\r\n\temptyCellReplacement?: boolean;\r\n\tduplicateSuffix?: boolean;\r\n\tcolspan?: { enabled?: boolean; suffix?: boolean };\r\n};\r\n\r\nexport abstract class TableHeader {\r\n\tstatic async getRows(\r\n\t\theaderRowLocator: Locator,\r\n\t\tcolumnsSelector: string,\r\n\t\theaderRowOptions?: HeaderRowOptions\r\n\t): Promise<HeaderRow[]> {\r\n\t\tconst options = this.getDefaultOptions(headerRowOptions);\r\n\t\tconst rows = await headerRowLocator.all();\r\n\t\tconst headerRows: HeaderRow[] = [];\r\n\t\tconst rowSpans: Map<number, string> = new Map();\r\n\r\n\t\tfor (const row of rows) {\r\n\t\t\tconst headerRow = await this.processRow(row, columnsSelector, rowSpans, options);\r\n\t\t\theaderRows.push(headerRow);\r\n\t\t}\r\n\r\n\t\tthis.applyColspanOptions(headerRows, options);\r\n\t\tthis.applyDuplicateSuffix(headerRows, options);\r\n\r\n\t\treturn headerRows;\r\n\t}\r\n\r\n\tprivate static getDefaultOptions(options?: HeaderRowOptions): Required<HeaderRowOptions> {\r\n\t\treturn {\r\n\t\t\tcellContentType: options?.cellContentType ?? CellContentType.InnerText,\r\n\t\t\temptyCellReplacement: options?.emptyCellReplacement ?? false,\r\n\t\t\tduplicateSuffix: options?.duplicateSuffix ?? false,\r\n\t\t\tcolspan: {\r\n\t\t\t\tenabled: options?.colspan?.enabled ?? false,\r\n\t\t\t\tsuffix: options?.colspan?.suffix ?? false,\r\n\t\t\t},\r\n\t\t};\r\n\t}\r\n\r\n\tprivate static async processRow(\r\n\t\trow: Locator,\r\n\t\tcolumnsSelector: string,\r\n\t\trowSpans: Map<number, string>,\r\n\t\toptions: Required<HeaderRowOptions>\r\n\t): Promise<HeaderRow> {\r\n\t\tconst headerRow: HeaderRow = [];\r\n\t\tconst cells = await row.locator(columnsSelector).all();\r\n\t\tlet columnIndex = 0;\r\n\r\n\t\tfor (const cell of cells) {\r\n\t\t\tcolumnIndex = await this.processCell(cell, headerRow, rowSpans, columnIndex, options);\r\n\t\t}\r\n\r\n\t\tthis.addRemainingRowSpans(headerRow, rowSpans, columnIndex);\r\n\t\treturn headerRow;\r\n\t}\r\n\r\n\tprivate static async processCell(\r\n\t\tcell: Locator,\r\n\t\theaderRow: HeaderRow,\r\n\t\trowSpans: Map<number, string>,\r\n\t\tcolumnIndex: number,\r\n\t\toptions: Required<HeaderRowOptions>\r\n\t): Promise<number> {\r\n\t\twhile (rowSpans.has(columnIndex)) {\r\n\t\t\theaderRow.push(rowSpans.get(columnIndex)!);\r\n\t\t\trowSpans.delete(columnIndex);\r\n\t\t\tcolumnIndex++;\r\n\t\t}\r\n\r\n\t\tlet text = await TableUtils.getCellContent(cell, options.cellContentType);\r\n\t\tif (!text && options.emptyCellReplacement) {\r\n\t\t\ttext = \"{{Empty}}\";\r\n\t\t}\r\n\r\n\t\tconst { colspan, rowspan } = await TableUtils.parseSpanAttributes(cell);\r\n\r\n\t\theaderRow.push(text);\r\n\t\tthis.handleColspan(headerRow, text, colspan);\r\n\t\tthis.handleRowspan(rowSpans, text, columnIndex, colspan, rowspan);\r\n\r\n\t\treturn columnIndex + colspan;\r\n\t}\r\n\r\n\tprivate static handleColspan(headerRow: HeaderRow, text: string, colspan: number): void {\r\n\t\tfor (let i = 1; i < colspan; i++) {\r\n\t\t\theaderRow.push(`${text}__C${i}`);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static handleRowspan(\r\n\t\trowSpans: Map<number, string>,\r\n\t\ttext: string,\r\n\t\tcolumnIndex: number,\r\n\t\tcolspan: number,\r\n\t\trowspan: number\r\n\t): void {\r\n\t\tif (rowspan > 1) {\r\n\t\t\tfor (let i = 0; i < colspan; i++) {\r\n\t\t\t\trowSpans.set(columnIndex + i, text);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static addRemainingRowSpans(headerRow: HeaderRow, rowSpans: Map<number, string>, columnIndex: number): void {\r\n\t\twhile (rowSpans.has(columnIndex)) {\r\n\t\t\theaderRow.push(rowSpans.get(columnIndex)!);\r\n\t\t\trowSpans.delete(columnIndex);\r\n\t\t\tcolumnIndex++;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static applyColspanOptions(headerRows: HeaderRow[], options: Required<HeaderRowOptions>): void {\r\n\t\tif (!options.colspan.enabled) {\r\n\t\t\tthis.removeColspanCells(headerRows);\r\n\t\t}\r\n\r\n\t\tif (!options.colspan.suffix) {\r\n\t\t\tthis.removeColspanSuffix(headerRows);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static removeColspanCells(headerRows: HeaderRow[]): void {\r\n\t\tfor (const headerRow of headerRows) {\r\n\t\t\tfor (let i = 0; i < headerRow.length; i++) {\r\n\t\t\t\tif (/__C\\d/.test(headerRow[i])) {\r\n\t\t\t\t\theaderRow.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static removeColspanSuffix(headerRows: HeaderRow[]): void {\r\n\t\tfor (const headerRow of headerRows) {\r\n\t\t\tfor (let i = 0; i < headerRow.length; i++) {\r\n\t\t\t\tif (/__C\\d/.test(headerRow[i])) {\r\n\t\t\t\t\theaderRow[i] = headerRow[i].replace(/__C\\d/, \"\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprivate static applyDuplicateSuffix(headerRows: HeaderRow[], options: Required<HeaderRowOptions>): void {\r\n\t\tif (!options.duplicateSuffix) return;\r\n\r\n\t\tfor (const headerRow of headerRows) {\r\n\t\t\tconst headerCountMap: Map<string, number> = new Map();\r\n\t\t\tfor (let i = 0; i < headerRow.length; i++) {\r\n\t\t\t\tconst header = headerRow[i];\r\n\t\t\t\tif (headerCountMap.has(header)) {\r\n\t\t\t\t\tconst count = headerCountMap.get(header)!;\r\n\t\t\t\t\theaderRow[i] = `${header}__D${count}`;\r\n\t\t\t\t\theaderCountMap.set(header, count + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\theaderCountMap.set(header, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import { Locator, expect } from \"@playwright/test\";\r\n\r\nexport enum RowKind {\r\n\tHeader = \"header\",\r\n\tBody = \"body\",\r\n}\r\n\r\nexport abstract class TableWait {\r\n\tstatic async waitForRows(\r\n\t\trowLocator: Locator,\r\n\t\tcellSelector: string,\r\n\t\trowKind: RowKind,\r\n\t\toptions?: {\r\n\t\t\trow?: {\r\n\t\t\t\tamount?: number;\r\n\t\t\t\tcell?: {\r\n\t\t\t\t\ttotalCount?: number;\r\n\t\t\t\t\tcontentCount?: number;\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t}\r\n\t): Promise<void> {\r\n\t\tconst validateCellsWithContent = async (): Promise<void> => {\r\n\t\t\tconst cells = await rowLocator.locator(cellSelector).all();\r\n\t\t\tconst cellsWithContent = (\r\n\t\t\t\tawait Promise.all(\r\n\t\t\t\t\tcells.map(async cell => {\r\n\t\t\t\t\t\tconst content = await cell.textContent();\r\n\t\t\t\t\t\treturn content !== null && content.trim() !== \"\" ? cell : null;\r\n\t\t\t\t\t})\r\n\t\t\t\t)\r\n\t\t\t).filter(cell => cell !== null);\r\n\t\t\texpect(cellsWithContent.length, `No ${rowKind} cells with content found`).toBeGreaterThan(0);\r\n\t\t};\r\n\r\n\t\tconst validateRowAmount = (rows: Locator[], expectedAmount: number): void => {\r\n\t\t\texpect(rows.length, `Expected ${expectedAmount} ${rowKind} rows, but found ${rows.length}`).toBe(expectedAmount);\r\n\t\t};\r\n\r\n\t\tconst validateCellCount = async (rows: Locator[], expectedCount: number): Promise<void> => {\r\n\t\t\tconst rowsWithMatchingCells = (\r\n\t\t\t\tawait Promise.all(\r\n\t\t\t\t\trows.map(async row => {\r\n\t\t\t\t\t\tconst cellCount = await row.locator(cellSelector).count();\r\n\t\t\t\t\t\treturn cellCount === expectedCount ? row : null;\r\n\t\t\t\t\t})\r\n\t\t\t\t)\r\n\t\t\t).filter(row => row !== null);\r\n\t\t\texpect(\r\n\t\t\t\trowsWithMatchingCells.length,\r\n\t\t\t\t`Expected amount of ${expectedCount} ${rowKind} cells for row not found`\r\n\t\t\t).toBeGreaterThan(0);\r\n\t\t};\r\n\r\n\t\tconst validateCellContentCount = async (rows: Locator[], expectedContentCount: number): Promise<void> => {\r\n\t\t\tconst rowsWithMatchingContent = (\r\n\t\t\t\tawait Promise.all(\r\n\t\t\t\t\trows.map(async row => {\r\n\t\t\t\t\t\tconst cells = await row.locator(cellSelector).all();\r\n\t\t\t\t\t\tconst cellsWithContent = (\r\n\t\t\t\t\t\t\tawait Promise.all(\r\n\t\t\t\t\t\t\t\tcells.map(async cell => {\r\n\t\t\t\t\t\t\t\t\tconst content = await cell.textContent();\r\n\t\t\t\t\t\t\t\t\treturn content !== null && content.trim() !== \"\" ? cell : null;\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t).filter(cell => cell !== null);\r\n\t\t\t\t\t\treturn cellsWithContent.length === expectedContentCount ? row : null;\r\n\t\t\t\t\t})\r\n\t\t\t\t)\r\n\t\t\t).filter(row => row !== null);\r\n\t\t\texpect(\r\n\t\t\t\trowsWithMatchingContent.length,\r\n\t\t\t\t`Expected amount of ${expectedContentCount} ${rowKind} cells with content for row not found`\r\n\t\t\t).toBeGreaterThan(0);\r\n\t\t};\r\n\r\n\t\tconst rows = await rowLocator.all();\r\n\r\n\t\tif (options?.row) {\r\n\t\t\tif (options.row.amount) {\r\n\t\t\t\tvalidateRowAmount(rows, options.row.amount);\r\n\t\t\t} else {\r\n\t\t\t\texpect(rows.length, `No ${rowKind} rows found`).toBeGreaterThan(0);\r\n\t\t\t}\r\n\r\n\t\t\tif (options.row.cell) {\r\n\t\t\t\tif (options.row.cell.totalCount) {\r\n\t\t\t\t\tawait validateCellCount(rows, options.row.cell.totalCount);\r\n\t\t\t\t}\r\n\t\t\t\tif (options.row.cell.contentCount) {\r\n\t\t\t\t\tawait validateCellContentCount(rows, options.row.cell.contentCount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tawait validateCellsWithContent();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tawait validateCellsWithContent();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tawait validateCellsWithContent();\r\n\t\t}\r\n\t}\r\n}\r\n"],"mappings":";AAAA,SAAS,UAAAA,eAAuB;;;ACAzB,IAAK,kBAAL,kBAAKC,qBAAL;AACN,EAAAA,iBAAA,iBAAc;AACd,EAAAA,iBAAA,eAAY;AAFD,SAAAA;AAAA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AY,MAAM,UAAU,YAAY,KAAK,iBAAiB,KAAK,2CAAsC,OAAO;AAAA,IACjH,EAAE,OAAO;AAAA,MACR,SAAS,mCAAS;AAAA,IACnB,CAAC;AAAA,EACF;AAAA,EAEA,MAAc,KAAK,SAAoF;AACtG,UAAMA,QAAO,YAAY;AACxB,YAAM,UAAU,YAAY,KAAK,mBAAmB,KAAK,4CAAqC;AAC9F,YAAM,UAAU,YAAY,KAAK,iBAAiB,KAAK,yCAAoC;AAAA,IAC5F,CAAC,EAAE,OAAO,EAAE,SAAS,mCAAS,QAAQ,CAAC;AAEvC,SAAK,WAAW,MAAM,YAAY;AAAA,MACjC,KAAK;AAAA,MACL,KAAK;AAAA,MACL,mCAAS;AAAA,IACV;AACA,SAAK,QAAQ,MAAM,UAAU,QAAQ,KAAK,iBAAiB,KAAK,sBAAsB;AAAA,EACvF;AACD;","names":["expect","CellContentType","rows","expect"]}
1
+ {"version":3,"sources":["../src/polling.ts","../src/cell-content-type.ts","../src/table-utils.ts","../src/table-body.ts","../src/table-header.ts","../src/playwright-table.ts"],"sourcesContent":["export type PollingOptions = {\n\ttimeout?: number;\n\tinterval?: number;\n};\n\nexport async function pollTable(fn: () => Promise<void>, options?: PollingOptions): Promise<void> {\n\tif (!options) {\n\t\toptions = {};\n\t}\n\n\tconst timeout = options.timeout ?? 30_000;\n\tconst interval = options.interval ?? 100;\n\tconst startTime = Date.now();\n\tlet lastError: Error | undefined;\n\n\twhile (Date.now() - startTime < timeout) {\n\t\ttry {\n\t\t\tawait fn();\n\t\t\treturn;\n\t\t} catch (err) {\n\t\t\tlastError = err as Error;\n\n\t\t\tawait new Promise(resolve => setTimeout(resolve, interval));\n\t\t}\n\t}\n\n\tthrow lastError || new Error(\"Playwright Tables: Polling timeout reached\");\n}\n","/**\n * Enum representing the possible types of content that can be extracted from a table cell.\n *\n * - `TextContent`: The raw text content of the cell, including hidden elements and extra whitespace.\n * - `InnerText`: The rendered text content of the cell, as seen by the user, with whitespace collapsed and hidden elements excluded.\n */\nexport enum CellContentType {\n\tTextContent = \"textContent\",\n\tInnerText = \"innerText\",\n}\n","import { Locator } from \"@playwright/test\";\n\nimport { CellContentType } from \"./cell-content-type\";\n\n/**\n * Utility class for extracting table cell content and attributes.\n * Contains only static methods - cannot be instantiated.\n */\nexport class TableUtils {\n\tprivate constructor() {\n\t\t// Prevent instantiation - this class only has static methods\n\t}\n\t/**\n\t * Extracts text content from a table cell.\n\t * @param cell - The Playwright locator for the cell.\n\t * @param cellContentType - The type of content to extract (InnerText or TextContent).\n\t * @returns The trimmed text content of the cell, or empty string if no content.\n\t * @throws Error if the cell locator doesn't exist in the DOM.\n\t */\n\tstatic async getCellContent(cell: Locator, cellContentType: CellContentType): Promise<string> {\n\t\ttry {\n\t\t\tconst count = await cell.count();\n\t\t\tif (count === 0) {\n\t\t\t\tthrow new Error(\"Cell locator does not exist in the DOM\");\n\t\t\t}\n\n\t\t\tconst content = cellContentType === CellContentType.InnerText ? await cell.innerText() : await cell.textContent();\n\t\t\treturn content?.trim() || \"\";\n\t\t} catch (error) {\n\t\t\tconst locatorDescription = this.getLocatorDescription(cell);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to get cell content.\\n` +\n\t\t\t\t\t`Locator: ${locatorDescription}\\n` +\n\t\t\t\t\t`Content type: ${cellContentType}\\n` +\n\t\t\t\t\t`Error: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Parses rowspan and colspan attributes from a table cell.\n\t * Fetches both attributes in parallel for optimal performance.\n\t * @param cell - The Playwright locator for the cell.\n\t * @returns Object containing rowspan and colspan values (defaults to 1 if not present).\n\t * @throws Error if attributes contain invalid values (non-numeric or less than 1).\n\t */\n\tstatic async parseSpanAttributes(cell: Locator): Promise<{ rowspan: number; colspan: number }> {\n\t\ttry {\n\t\t\tconst [rowspanAttr, colspanAttr] = await Promise.all([\n\t\t\t\tcell.getAttribute(\"rowspan\"),\n\t\t\t\tcell.getAttribute(\"colspan\"),\n\t\t\t]);\n\n\t\t\tconst rowspan = parseInt(rowspanAttr || \"1\", 10);\n\t\t\tconst colspan = parseInt(colspanAttr || \"1\", 10);\n\n\t\t\tif (isNaN(rowspan) || rowspan < 1) {\n\t\t\t\tthrow new Error(`Invalid rowspan attribute: \"${rowspanAttr}\". Expected positive integer.`);\n\t\t\t}\n\t\t\tif (isNaN(colspan) || colspan < 1) {\n\t\t\t\tthrow new Error(`Invalid colspan attribute: \"${colspanAttr}\". Expected positive integer.`);\n\t\t\t}\n\n\t\t\treturn { rowspan, colspan };\n\t\t} catch (error) {\n\t\t\tconst locatorDescription = this.getLocatorDescription(cell);\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to parse span attributes.\\n` +\n\t\t\t\t\t`Locator: ${locatorDescription}\\n` +\n\t\t\t\t\t`Error: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Extracts a human-readable locator description from a Playwright Locator.\n\t * This captures Playwright's internal selector chain for better error messages.\n\t * @param locator - The Playwright locator to describe.\n\t * @returns A string representation of the locator's selector chain.\n\t */\n\tprivate static getLocatorDescription(locator: Locator): string {\n\t\tconst locatorString = locator.toString();\n\t\t// Example: \"Locator@#root >> table >> tbody >> tr >> td\"\n\t\treturn locatorString;\n\t}\n}\n","import { Locator } from \"@playwright/test\";\n\nimport { CellContentType } from \"./cell-content-type\";\nimport { BodyRow, Cell } from \"./row\";\nimport { TableUtils } from \"./table-utils\";\n\n/**\n * Utility class for extracting and processing table body rows.\n * Handles rowspan and colspan attributes to properly structure table data.\n * Contains only static methods - cannot be instantiated.\n */\nexport class TableBody {\n\tprivate constructor() {\n\t\t// Prevent instantiation - this class only has static methods\n\t}\n\t/**\n\t * Extracts body rows from a table with proper handling of rowspan and colspan.\n\t *\n\t * @param rowLocator - The Playwright locator for body rows.\n\t * @param columnsSelector - CSS selector for locating columns within rows (e.g., \"td\").\n\t * @param bodyRowsOptions - Optional configuration for cell content extraction.\n\t * @param bodyRowsOptions.cellContentType - The type of content to extract (InnerText or TextContent).\n\t * @returns Promise resolving to an array of processed body rows.\n\t * @throws Error if columnsSelector is empty or if row processing fails.\n\t *\n\t * @example\n\t * const rows = await TableBody.getRows(\n\t * page.locator('tbody tr'),\n\t * 'td',\n\t * { cellContentType: CellContentType.TextContent }\n\t * );\n\t */\n\tstatic async getRows(\n\t\trowLocator: Locator,\n\t\tcolumnsSelector: string,\n\t\tbodyRowsOptions?: {\n\t\t\tcellContentType?: CellContentType;\n\t\t}\n\t): Promise<BodyRow[]> {\n\t\tif (!columnsSelector || columnsSelector.trim() === \"\") {\n\t\t\tthrow new Error(\"columnsSelector cannot be empty\");\n\t\t}\n\n\t\tconst locatorDescription = rowLocator.toString();\n\t\tconst rows: BodyRow[] = [];\n\t\tconst rowsCount = await rowLocator.count();\n\n\t\tif (rowsCount === 0) {\n\t\t\treturn rows;\n\t\t}\n\n\t\tconst spannedCells: Record<number, Cell[]> = {};\n\n\t\tfor (let rowIndex = 0; rowIndex < rowsCount; rowIndex++) {\n\t\t\ttry {\n\t\t\t\tconst row = rowLocator.nth(rowIndex);\n\t\t\t\tconst columns = await this.extractColumns(\n\t\t\t\t\trow,\n\t\t\t\t\tcolumnsSelector,\n\t\t\t\t\trowIndex,\n\t\t\t\t\tspannedCells,\n\t\t\t\t\tbodyRowsOptions?.cellContentType\n\t\t\t\t);\n\t\t\t\trows.push(columns as BodyRow);\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to process body row at index ${rowIndex}.\\n` +\n\t\t\t\t\t\t`Body row locator: ${locatorDescription}\\n` +\n\t\t\t\t\t\t`Columns selector: \"${columnsSelector}\"\\n` +\n\t\t\t\t\t\t`Error: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn rows;\n\t}\n\n\tprivate static async extractColumns(\n\t\trow: Locator,\n\t\tcolumnsSelector: string,\n\t\trowIndex: number,\n\t\tspannedCells: Record<number, Cell[]>,\n\t\tcellContentType?: CellContentType\n\t): Promise<Cell[]> {\n\t\tconst columns: Cell[] = [];\n\t\tconst columnLocators = row.locator(columnsSelector);\n\t\tconst columnCount = await columnLocators.count();\n\n\t\tif (columnCount === 0) {\n\t\t\t// Still apply any spanned cells even if this row has no DOM cells\n\t\t\tthis.applySpannedCells(spannedCells, rowIndex, columns);\n\t\t\treturn columns;\n\t\t}\n\n\t\tconst cellDataPromises = [];\n\t\tfor (let colIndex = 0; colIndex < columnCount; colIndex++) {\n\t\t\tcellDataPromises.push(this.fetchCellData(columnLocators.nth(colIndex), cellContentType));\n\t\t}\n\t\tconst cellDataArray = await Promise.all(cellDataPromises);\n\n\t\t// First, determine which column positions are occupied by rowspans from above\n\t\tconst spannedPositions = new Set<number>();\n\t\tif (spannedCells[rowIndex]) {\n\t\t\tspannedCells[rowIndex].forEach((_, colIndex) => {\n\t\t\t\tif (spannedCells[rowIndex][colIndex] !== undefined) {\n\t\t\t\t\tspannedPositions.add(colIndex);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// Process cells, accounting for spanned positions\n\t\tlet actualColIndex = 0;\n\t\tfor (let domCellIndex = 0; domCellIndex < columnCount; domCellIndex++) {\n\t\t\t// Skip columns that are occupied by rowspans from above\n\t\t\twhile (spannedPositions.has(actualColIndex)) {\n\t\t\t\tactualColIndex++;\n\t\t\t}\n\n\t\t\tconst cellData = cellDataArray[domCellIndex];\n\t\t\tthis.processCellData(cellData, actualColIndex, columns, rowIndex, spannedCells);\n\n\t\t\t// Move past this cell and any colspan it creates\n\t\t\tactualColIndex += cellData.colspan;\n\t\t}\n\n\t\tthis.applySpannedCells(spannedCells, rowIndex, columns);\n\n\t\treturn columns;\n\t}\n\n\t/**\n\t * Fetches cell content and span attributes in parallel.\n\t * This method performs DOM operations that can be parallelized across multiple cells.\n\t */\n\tprivate static async fetchCellData(\n\t\tcolumn: Locator,\n\t\tcellContentType: CellContentType = CellContentType.InnerText\n\t): Promise<{ content: string; rowspan: number; colspan: number }> {\n\t\tconst [content, spanAttributes] = await Promise.all([\n\t\t\tTableUtils.getCellContent(column, cellContentType),\n\t\t\tTableUtils.parseSpanAttributes(column),\n\t\t]);\n\n\t\treturn {\n\t\t\tcontent,\n\t\t\trowspan: spanAttributes.rowspan,\n\t\t\tcolspan: spanAttributes.colspan,\n\t\t};\n\t}\n\n\t/**\n\t * Processes pre-fetched cell data and applies it to the columns array.\n\t * This method is purely computational and doesn't perform any DOM operations.\n\t */\n\tprivate static processCellData(\n\t\tcellData: { content: string; rowspan: number; colspan: number },\n\t\tcolIndex: number,\n\t\tcolumns: Cell[],\n\t\trowIndex: number,\n\t\tspannedCells: Record<number, Cell[]>\n\t): void {\n\t\tconst { content, rowspan, colspan } = cellData;\n\n\t\tif (colIndex < 0) {\n\t\t\tthrow new Error(`Invalid column index: ${colIndex}. Must be non-negative.`);\n\t\t}\n\t\tif (rowIndex < 0) {\n\t\t\tthrow new Error(`Invalid row index: ${rowIndex}. Must be non-negative.`);\n\t\t}\n\n\t\tfor (let span = 0; span < colspan; span++) {\n\t\t\tcolumns[colIndex + span] = content;\n\t\t}\n\n\t\tif (rowspan > 1) {\n\t\t\tthis.storeSpannedCells(rowIndex, colIndex, rowspan, colspan, content, spannedCells);\n\t\t}\n\t}\n\n\tprivate static storeSpannedCells(\n\t\trowIndex: number,\n\t\tcolIndex: number,\n\t\trowspan: number,\n\t\tcolspan: number,\n\t\tcontent: Cell,\n\t\tspannedCells: Record<number, Cell[]>\n\t): void {\n\t\tfor (let rowSpan = 1; rowSpan < rowspan; rowSpan++) {\n\t\t\tif (!spannedCells[rowIndex + rowSpan]) {\n\t\t\t\tspannedCells[rowIndex + rowSpan] = [];\n\t\t\t}\n\t\t\t// Store the content for each column covered by colspan\n\t\t\tfor (let colSpan = 0; colSpan < colspan; colSpan++) {\n\t\t\t\tspannedCells[rowIndex + rowSpan][colIndex + colSpan] = content;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate static applySpannedCells(spannedCells: Record<number, Cell[]>, rowIndex: number, columns: Cell[]): void {\n\t\tif (spannedCells[rowIndex]) {\n\t\t\tspannedCells[rowIndex].forEach((spannedContent, colIndex) => {\n\t\t\t\tif (spannedContent !== undefined) {\n\t\t\t\t\tcolumns[colIndex] = spannedContent;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n}\n","import { Locator } from \"@playwright/test\";\n\nimport { CellContentType } from \"./cell-content-type\";\nimport { HeaderRow } from \"./row\";\nimport { TableUtils } from \"./table-utils\";\n\n/**\n * Options for configuring a table header row.\n *\n * @property cellContentType - The type of content allowed in the header cell.\n * @property emptyCellReplacement - If true, replaces empty header cells with a default value.\n * @property duplicateSuffix - If true, appends a suffix to duplicate header values.\n * @property colspan - Configuration for column spanning in the header row.\n * @property colspan.enabled - If true, enables column spanning.\n * @property colspan.suffix - If true, appends a suffix to spanned columns.\n */\nexport type HeaderRowOptions = {\n\tcellContentType?: CellContentType;\n\temptyCellReplacement?: boolean;\n\tduplicateSuffix?: boolean;\n\tcolspan?: { enabled?: boolean; suffix?: boolean };\n};\n\n/**\n * Utility class for extracting and processing table header rows.\n * Handles complex scenarios including colspan, rowspan, empty cells, and duplicate header names.\n * Contains only static methods - cannot be instantiated.\n */\nexport class TableHeader {\n\tprivate constructor() {\n\t\t// Prevent instantiation - this class only has static methods\n\t}\n\tprivate static readonly EMPTY_CELL_PLACEHOLDER = \"{{Empty}}\";\n\tprivate static readonly COLSPAN_SUFFIX_PREFIX = \"__C\";\n\tprivate static readonly DUPLICATE_SUFFIX_PREFIX = \"__D\";\n\tprivate static readonly COLSPAN_PATTERN = /__C\\d+/;\n\n\t/**\n\t * Extracts header rows from a table with optional processing for colspan, rowspan, and duplicates.\n\t *\n\t * @param headerRowLocator - The Playwright locator for header rows.\n\t * @param columnsSelector - CSS selector for locating header columns (e.g., \"th\").\n\t * @param headerRowOptions - Optional configuration for header processing.\n\t * @returns Promise resolving to an array of processed header rows.\n\t * @throws Error if columnsSelector is empty or if no header rows are found.\n\t *\n\t * @example\n\t * const headers = await TableHeader.getRows(\n\t * page.locator('thead tr'),\n\t * 'th',\n\t * { duplicateSuffix: true, colspan: { enabled: true } }\n\t * );\n\t */\n\tstatic async getRows(\n\t\theaderRowLocator: Locator,\n\t\tcolumnsSelector: string,\n\t\theaderRowOptions?: HeaderRowOptions\n\t): Promise<HeaderRow[]> {\n\t\tif (!columnsSelector || columnsSelector.trim() === \"\") {\n\t\t\tthrow new Error(\"columnsSelector cannot be empty\");\n\t\t}\n\n\t\tconst locatorDescription = headerRowLocator.toString();\n\t\tconst options = this.getDefaultOptions(headerRowOptions);\n\t\tconst rows = await headerRowLocator.all();\n\n\t\tconst headerRows: HeaderRow[] = [];\n\n\t\tif (rows.length === 0) {\n\t\t\treturn headerRows;\n\t\t}\n\n\t\tconst rowSpans: Map<number, string> = new Map();\n\n\t\tfor (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n\t\t\ttry {\n\t\t\t\tconst headerRow = await this.processRow(rows[rowIndex], columnsSelector, rowSpans, options);\n\t\t\t\theaderRows.push(headerRow);\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to process header row at index ${rowIndex}.\\n` +\n\t\t\t\t\t\t`Header row locator: ${locatorDescription}\\n` +\n\t\t\t\t\t\t`Columns selector: \"${columnsSelector}\"\\n` +\n\t\t\t\t\t\t`Error: ${error instanceof Error ? error.message : String(error)}`\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.applyColspanOptions(headerRows, options);\n\t\tthis.applyDuplicateSuffix(headerRows, options);\n\n\t\treturn headerRows;\n\t}\n\n\tprivate static getDefaultOptions(options?: HeaderRowOptions): Required<HeaderRowOptions> {\n\t\treturn {\n\t\t\tcellContentType: options?.cellContentType ?? CellContentType.InnerText,\n\t\t\temptyCellReplacement: options?.emptyCellReplacement ?? false,\n\t\t\tduplicateSuffix: options?.duplicateSuffix ?? false,\n\t\t\tcolspan: {\n\t\t\t\tenabled: options?.colspan?.enabled ?? false,\n\t\t\t\tsuffix: options?.colspan?.suffix ?? false,\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate static async processRow(\n\t\trow: Locator,\n\t\tcolumnsSelector: string,\n\t\trowSpans: Map<number, string>,\n\t\toptions: Required<HeaderRowOptions>\n\t): Promise<HeaderRow> {\n\t\tconst headerRow: HeaderRow = [];\n\t\tconst cells = await row.locator(columnsSelector).all();\n\n\t\tif (cells.length === 0) {\n\t\t\treturn headerRow;\n\t\t}\n\n\t\tconst cellDataArray = await Promise.all(cells.map(cell => this.fetchHeaderCellData(cell, options.cellContentType)));\n\n\t\tlet columnIndex = 0;\n\t\tfor (let i = 0; i < cellDataArray.length; i++) {\n\t\t\tcolumnIndex = this.processHeaderCellData(\n\t\t\t\tcellDataArray[i],\n\t\t\t\theaderRow,\n\t\t\t\trowSpans,\n\t\t\t\tcolumnIndex,\n\t\t\t\toptions.emptyCellReplacement\n\t\t\t);\n\t\t}\n\n\t\tthis.addRemainingRowSpans(headerRow, rowSpans, columnIndex);\n\t\treturn headerRow;\n\t}\n\n\t/**\n\t * Fetches header cell content and span attributes in parallel.\n\t * This method performs DOM operations that can be parallelized across multiple cells.\n\t */\n\tprivate static async fetchHeaderCellData(\n\t\tcell: Locator,\n\t\tcellContentType: CellContentType\n\t): Promise<{ text: string; rowspan: number; colspan: number }> {\n\t\tconst [text, spanAttributes] = await Promise.all([\n\t\t\tTableUtils.getCellContent(cell, cellContentType),\n\t\t\tTableUtils.parseSpanAttributes(cell),\n\t\t]);\n\n\t\treturn {\n\t\t\ttext,\n\t\t\trowspan: spanAttributes.rowspan,\n\t\t\tcolspan: spanAttributes.colspan,\n\t\t};\n\t}\n\n\t/**\n\t * Processes pre-fetched header cell data and applies it to the header row.\n\t * This method is purely computational and doesn't perform any DOM operations.\n\t */\n\tprivate static processHeaderCellData(\n\t\tcellData: { text: string; rowspan: number; colspan: number },\n\t\theaderRow: HeaderRow,\n\t\trowSpans: Map<number, string>,\n\t\tcolumnIndex: number,\n\t\temptyCellReplacement: boolean\n\t): number {\n\t\twhile (rowSpans.has(columnIndex)) {\n\t\t\theaderRow.push(rowSpans.get(columnIndex)!);\n\t\t\trowSpans.delete(columnIndex);\n\t\t\tcolumnIndex++;\n\t\t}\n\n\t\tlet text = cellData.text;\n\t\tif (!text && emptyCellReplacement) {\n\t\t\ttext = this.EMPTY_CELL_PLACEHOLDER;\n\t\t}\n\n\t\tconst { colspan, rowspan } = cellData;\n\n\t\theaderRow.push(text);\n\t\tthis.handleColspan(headerRow, text, colspan);\n\t\tthis.handleRowspan(rowSpans, text, columnIndex, colspan, rowspan);\n\n\t\treturn columnIndex + colspan;\n\t}\n\n\tprivate static handleColspan(headerRow: HeaderRow, text: string, colspan: number): void {\n\t\tfor (let i = 1; i < colspan; i++) {\n\t\t\theaderRow.push(`${text}${this.COLSPAN_SUFFIX_PREFIX}${i}`);\n\t\t}\n\t}\n\n\tprivate static handleRowspan(\n\t\trowSpans: Map<number, string>,\n\t\ttext: string,\n\t\tcolumnIndex: number,\n\t\tcolspan: number,\n\t\trowspan: number\n\t): void {\n\t\tif (rowspan > 1) {\n\t\t\tfor (let i = 0; i < colspan; i++) {\n\t\t\t\trowSpans.set(columnIndex + i, text);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate static addRemainingRowSpans(headerRow: HeaderRow, rowSpans: Map<number, string>, columnIndex: number): void {\n\t\twhile (rowSpans.has(columnIndex)) {\n\t\t\theaderRow.push(rowSpans.get(columnIndex)!);\n\t\t\trowSpans.delete(columnIndex);\n\t\t\tcolumnIndex++;\n\t\t}\n\t}\n\n\tprivate static applyColspanOptions(headerRows: HeaderRow[], options: Required<HeaderRowOptions>): void {\n\t\tif (!options.colspan.enabled) {\n\t\t\tthis.removeColspanCells(headerRows);\n\t\t}\n\n\t\tif (!options.colspan.suffix) {\n\t\t\tthis.removeColspanSuffix(headerRows);\n\t\t}\n\t}\n\n\tprivate static removeColspanCells(headerRows: HeaderRow[]): void {\n\t\tfor (let i = 0; i < headerRows.length; i++) {\n\t\t\theaderRows[i] = headerRows[i].filter(cell => !this.COLSPAN_PATTERN.test(cell));\n\t\t}\n\t}\n\n\tprivate static removeColspanSuffix(headerRows: HeaderRow[]): void {\n\t\tfor (const headerRow of headerRows) {\n\t\t\tfor (let i = 0; i < headerRow.length; i++) {\n\t\t\t\tif (this.COLSPAN_PATTERN.test(headerRow[i])) {\n\t\t\t\t\theaderRow[i] = headerRow[i].replace(this.COLSPAN_PATTERN, \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate static applyDuplicateSuffix(headerRows: HeaderRow[], options: Required<HeaderRowOptions>): void {\n\t\tif (!options.duplicateSuffix) return;\n\n\t\tfor (const headerRow of headerRows) {\n\t\t\tconst headerCountMap: Map<string, number> = new Map();\n\t\t\tfor (let i = 0; i < headerRow.length; i++) {\n\t\t\t\tconst header = headerRow[i];\n\t\t\t\tconst currentCount = headerCountMap.get(header);\n\t\t\t\tif (currentCount !== undefined) {\n\t\t\t\t\theaderRow[i] = `${header}${this.DUPLICATE_SUFFIX_PREFIX}${currentCount}`;\n\t\t\t\t\theaderCountMap.set(header, currentCount + 1);\n\t\t\t\t} else {\n\t\t\t\t\theaderCountMap.set(header, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Locator } from \"@playwright/test\";\n\nimport { CellContentType } from \"./cell-content-type\";\nimport { pollTable, PollingOptions } from \"./polling\";\nimport { BodyRow, Cell, HeaderRow } from \"./row\";\nimport { TableBody } from \"./table-body\";\nimport { HeaderRowOptions, TableHeader } from \"./table-header\";\n\n/**\n * Options for loading table data, headers, and rows.\n *\n * @example\n * // Use custom cell content type for body rows and header options\n * const options: TableOptions = {\n * bodyRowOptions: { cellContentType: CellContentType.TextContent },\n * headerRowOptions: {\n * colspan: { enabled: true, suffix: true },\n * duplicateSuffix: true,\n * emptyCellReplacement: false,\n * },\n * };\n * await table.getBodyRows(options);\n */\nexport type TableOptions = {\n\t/** See {@link HeaderRowOptions} for available options. */\n\theaderRowOptions?: HeaderRowOptions;\n\t/** Options for parsing body rows. */\n\tbodyRowOptions?: { cellContentType?: CellContentType };\n};\n\n/**\n * Represents a table in Playwright, providing methods to interact with its headers, rows, and cells.\n */\nexport class PlaywrightTable {\n\tprivate _bodyRowLocator: Locator;\n\tprivate _bodyRowColumnSelector: string;\n\tprivate _headerRowLocator: Locator;\n\tprivate _headerColumnSelector: string;\n\n\t/**\n\t * Creates an instance of the table handler with customizable selectors for headers and rows.\n\t *\n\t * @param _tableLocator - The Playwright `Locator` pointing to the root table element.\n\t * @param _options - Optional configuration for customizing header and row selectors.\n\t * @param _options.header - Options for header row and columns.\n\t * @param _options.header.setMainHeaderRow - (Optional) Index of the main header row if multiple header rows exist.\n\t * @param _options.header.rowSelector - (Optional) CSS selector for locating header rows. Defaults to `\"thead>tr\"`.\n\t * @param _options.header.columnSelector - (Optional) CSS selector for locating header columns. Defaults to `\"th\"`.\n\t * @param _options.row - Options for body rows and columns.\n\t * @param _options.row.rowSelector - (Optional) CSS selector for locating body rows. Defaults to `\"tbody>tr\"`.\n\t * @param _options.row.columnSelector - (Optional) CSS selector for locating body columns. Defaults to `\"td\"`.\n\t *\n\t * @example\n\t * const table = new PlaywrightTable(\n\t * page.locator('table.my-table'),\n\t * {\n\t * header: {\n\t * rowSelector: 'thead tr.header',\n\t * columnSelector: 'th.header-cell'\n\t * },\n\t * row: {\n\t * rowSelector: 'tbody tr.data-row',\n\t * columnSelector: 'td.data-cell'\n\t * }\n\t * }\n\t * );\n\t */\n\tconstructor(\n\t\tprivate readonly _tableLocator: Locator,\n\t\tprivate readonly _options?: {\n\t\t\theader?: {\n\t\t\t\tsetMainHeaderRow?: number;\n\t\t\t\trowSelector?: string;\n\t\t\t\tcolumnSelector?: string;\n\t\t\t};\n\t\t\trow?: {\n\t\t\t\trowSelector?: string;\n\t\t\t\tcolumnSelector?: string;\n\t\t\t};\n\t\t}\n\t) {\n\t\tthis._headerRowLocator = this._tableLocator.locator(this._options?.header?.rowSelector ?? \"thead>tr\");\n\t\tthis._headerColumnSelector = this._options?.header?.columnSelector ?? \"th\";\n\t\tthis._bodyRowLocator = this._tableLocator.locator(this._options?.row?.rowSelector ?? \"tbody>tr\");\n\t\tthis._bodyRowColumnSelector = this._options?.row?.columnSelector ?? \"td\";\n\t}\n\n\t/**\n\t * Retrieves all header rows of the table.\n\t * @param options - Optional parameters for header row parsing configuration.\n\t * @returns A promise that resolves to an array of header rows.\n\t * @throws Error if no header rows found after table loads.\n\t *\n\t * @example\n\t * // Get headers with colspan enabled\n\t * const headers = await table.getHeaderRows({\n\t * colspan: { enabled: true, suffix: true },\n\t * duplicateSuffix: true\n\t * });\n\t *\n\t * @see {@link getMainHeaderRow} for getting only the main header row\n\t * @see {@link HeaderRowOptions} for all available configuration options\n\t */\n\tasync getHeaderRows(options?: HeaderRowOptions): Promise<HeaderRow[]> {\n\t\tconst table = await this.getTable({\n\t\t\theaderRowOptions: options,\n\t\t});\n\t\treturn table.headerRows;\n\t}\n\n\t/**\n\t * Retrieves the main header row of the table.\n\t * By default, uses the last header row if multiple exist. Can be customized via constructor.\n\t * @param options - Optional parameters for header row parsing configuration.\n\t * @returns A promise that resolves to the main header row.\n\t * @throws Error if no header rows available.\n\t * @throws Error if setMainHeaderRow index is out of bounds (negative or >= header row count).\n\t *\n\t * @example\n\t * // Get main header with custom index set in constructor\n\t * const table = new PlaywrightTable(page.locator('table'), {\n\t * header: { setMainHeaderRow: 0 } // Use first row as main header\n\t * });\n\t * const mainHeader = await table.getMainHeaderRow();\n\t *\n\t * @see {@link getHeaderRows} for getting all header rows\n\t */\n\tasync getMainHeaderRow(options?: HeaderRowOptions): Promise<HeaderRow> {\n\t\tconst table = await this.getTable({\n\t\t\theaderRowOptions: options,\n\t\t});\n\t\treturn this.mainHeaderRow(table.headerRows);\n\t}\n\n\t/**\n\t * Retrieves all body rows of the table.\n\t * @param options - Optional configuration for body row parsing.\n\t * @param options.cellContentType - Content extraction type. See {@link CellContentType}. Defaults to InnerText.\n\t * @returns A promise that resolves to an array of body rows.\n\t * @throws Error if no body rows found after table loads.\n\t *\n\t * @example\n\t * // Get body rows with TextContent (includes hidden elements)\n\t * const rows = await table.getBodyRows({\n\t * cellContentType: CellContentType.TextContent\n\t * });\n\t *\n\t * @example\n\t * // Get body rows with default InnerText\n\t * const rows = await table.getBodyRows();\n\t */\n\tasync getBodyRows(options?: { cellContentType?: CellContentType }): Promise<BodyRow[]> {\n\t\tconst table = await this.getTable({\n\t\t\tbodyRowOptions: options,\n\t\t\theaderRowOptions: {\n\t\t\t\tcolspan: { enabled: true },\n\t\t\t},\n\t\t});\n\t\treturn table.bodyRows;\n\t}\n\n\t/**\n\t * Retrieves a specific cell locator in the body of the table by row and column index.\n\t * @param rowNumber - The row number (0-based index).\n\t * @param headerPosition - The column/header position (0-based index).\n\t * @returns A Playwright Locator for the specified cell.\n\t *\n\t * @example\n\t * // Get cell at row 1, column 2\n\t * const cellLocator = table.getBodyCellLocator(1, 2);\n\t * await expect(cellLocator).toHaveText('Expected Text');\n\t *\n\t * @example\n\t * // Get first cell in first row\n\t * const firstCell = table.getBodyCellLocator(0, 0);\n\t * await firstCell.click();\n\t *\n\t * @see {@link getBodyCellLocatorByRowConditions} for finding cells by content matching\n\t * @see {@link getAllBodyCellLocatorsByHeaderIndex} for getting all cells in a column\n\t * @see {@link getAllBodyCellLocatorsByHeaderName} for getting all cells under a header\n\t */\n\tgetBodyCellLocator(rowNumber: number, headerPosition: number): Locator {\n\t\treturn this._bodyRowLocator.nth(rowNumber).locator(this._bodyRowColumnSelector).nth(headerPosition);\n\t}\n\n\t/**\n\t * Retrieves a cell locator in the body of the table based on row conditions and a target header.\n\t * Finds the first row where all conditions match, then returns the cell in the target column.\n\t * @param conditions - An object where keys are header names and values are expected cell contents, or a single [header, value] tuple.\n\t * @param targetHeader - The header name of the column containing the cell to retrieve.\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to a Playwright Locator for the matching cell.\n\t * @throws Error if no row matches all specified conditions.\n\t * @throws Error if any condition header or target header is not found in the table.\n\t *\n\t * @example\n\t * // Find cell with multiple conditions\n\t * const emailLocator = await table.getBodyCellLocatorByRowConditions(\n\t * { \"First name\": \"John\", \"Status\": \"Active\" },\n\t * \"Email\"\n\t * );\n\t * await expect(emailLocator).toContainText('@example.com');\n\t *\n\t * @example\n\t * // Find cell with single condition using tuple syntax\n\t * const actionCell = await table.getBodyCellLocatorByRowConditions(\n\t * [\"Username\", \"john.doe\"],\n\t * \"Actions\"\n\t * );\n\t * await actionCell.locator('button').click();\n\t *\n\t * @example\n\t * // Find cell with single condition using object syntax\n\t * const statusCell = await table.getBodyCellLocatorByRowConditions(\n\t * { \"Username\": \"john.doe\" },\n\t * \"Status\"\n\t * );\n\t *\n\t * @see {@link getBodyCellLocator} for getting cells by direct index\n\t * @see {@link getAllBodyCellLocatorsByHeaderName} for getting all cells in a column\n\t */\n\tasync getBodyCellLocatorByRowConditions(\n\t\tconditions: Record<string, string> | [string, string],\n\t\ttargetHeader: string,\n\t\toptions?: TableOptions\n\t): Promise<Locator> {\n\t\tconst table = await this.getTable(options);\n\t\tconst mainHeader = this.mainHeaderRow(table.headerRows);\n\n\t\tconst targetHeaderIndex = this.getHeaderIndex(targetHeader, mainHeader);\n\n\t\t// Normalize conditions to object format\n\t\tconst conditionsObj = Array.isArray(conditions) ? { [conditions[0]]: conditions[1] } : conditions;\n\n\t\tfor (let rowIndex = 0; rowIndex < table.bodyRows.length; rowIndex++) {\n\t\t\tconst row = table.bodyRows[rowIndex];\n\t\t\tlet matches = true;\n\n\t\t\tfor (const [header, value] of Object.entries(conditionsObj)) {\n\t\t\t\tconst headerIndex = this.getHeaderIndex(header, mainHeader);\n\t\t\t\tconst cellValue = row[headerIndex] ?? \"\";\n\t\t\t\tif (cellValue !== value) {\n\t\t\t\t\tmatches = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (matches) {\n\t\t\t\treturn this.getBodyCellLocator(rowIndex, targetHeaderIndex);\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`No row found matching conditions: ${JSON.stringify(conditionsObj)}\\n` +\n\t\t\t\t`Target header: \"${targetHeader}\"\\n` +\n\t\t\t\t`Searched ${table.bodyRows.length} rows\\n` +\n\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}`\n\t\t);\n\t}\n\n\t/**\n\t * Retrieves all cell locators in the body of the table for a specific header name.\n\t * Returns locators for every cell in the column identified by the header.\n\t * @param header - The header name identifying the column.\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to an array of Playwright Locators for all cells in the column.\n\t * @throws Error if the header is not found in the table.\n\t *\n\t * @example\n\t * // Get all cells in the \"Status\" column\n\t * const statusCells = await table.getAllBodyCellLocatorsByHeaderName(\"Status\");\n\t * for (const cell of statusCells) {\n\t * await expect(cell).toHaveText(/Active|Inactive/);\n\t * }\n\t *\n\t * @example\n\t * // Get text from all cells in \"Name\" column\n\t * const nameCells = await table.getAllBodyCellLocatorsByHeaderName(\"Name\");\n\t * const names = await Promise.all(nameCells.map(cell => cell.textContent()));\n\t *\n\t * @see {@link getAllBodyCellLocatorsByHeaderIndex} for getting cells by column index\n\t * @see {@link getBodyCellLocatorByRowConditions} for finding specific cells by content\n\t */\n\tasync getAllBodyCellLocatorsByHeaderName(header: string, options?: TableOptions): Promise<Locator[]> {\n\t\tconst table = await this.getTable(options);\n\t\tconst headers = this.mainHeaderRow(table.headerRows);\n\t\tconst headerIndex = this.getHeaderIndex(header, headers);\n\t\tconst locators: Locator[] = [];\n\t\tfor (let rowIndex = 0; rowIndex < table.bodyRows.length; rowIndex++) {\n\t\t\tconst cellLocator = this.getBodyCellLocator(rowIndex, headerIndex);\n\t\t\tlocators.push(cellLocator);\n\t\t}\n\t\treturn locators;\n\t}\n\n\t/**\n\t * Retrieves all cell locators in the body of the table for a specific header index.\n\t * Returns locators for every cell in the column at the specified position.\n\t * @param headerIndex - The header/column index (0-based).\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to an array of Playwright Locators for all cells in the column.\n\t * @throws Error if the header index is out of bounds (negative or >= column count).\n\t *\n\t * @example\n\t * // Get all cells in the third column (index 2)\n\t * const thirdColumnCells = await table.getAllBodyCellLocatorsByHeaderIndex(2);\n\t * for (const cell of thirdColumnCells) {\n\t * await expect(cell).toBeVisible();\n\t * }\n\t *\n\t * @example\n\t * // Get all cells in first column\n\t * const firstColumnCells = await table.getAllBodyCellLocatorsByHeaderIndex(0);\n\t * const values = await Promise.all(firstColumnCells.map(c => c.textContent()));\n\t *\n\t * @see {@link getAllBodyCellLocatorsByHeaderName} for getting cells by header name\n\t * @see {@link getBodyCellLocator} for getting a specific cell by row and column index\n\t */\n\tasync getAllBodyCellLocatorsByHeaderIndex(headerIndex: number, options?: TableOptions): Promise<Locator[]> {\n\t\tconst table = await this.getTable(options);\n\t\tconst columnCount = this.mainHeaderRow(table.headerRows).length;\n\t\tif (headerIndex < 0 || headerIndex >= columnCount) {\n\t\t\tthrow new Error(\n\t\t\t\t`Header index ${headerIndex} out of bounds. Table has ${columnCount} columns.\\n` +\n\t\t\t\t\t`Header row locator: ${this._headerRowLocator.toString()}`\n\t\t\t);\n\t\t}\n\t\tconst locators: Locator[] = [];\n\t\tfor (let rowIndex = 0; rowIndex < table.bodyRows.length; rowIndex++) {\n\t\t\tconst cellLocator = this.getBodyCellLocator(rowIndex, headerIndex);\n\t\t\tlocators.push(cellLocator);\n\t\t}\n\t\treturn locators;\n\t}\n\n\t/**\n\t * Converts the table data into a JSON array where each object represents a row.\n\t * Keys are header names, values are cell contents.\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to an array of objects representing table rows.\n\t * @throws Error if no header rows or body rows found.\n\t *\n\t * @example\n\t * // Convert table to JSON with default options\n\t * const data = await table.getJson();\n\t * // Result: [{\"Name\": \"John\", \"Age\": \"30\"}, {\"Name\": \"Jane\", \"Age\": \"25\"}]\n\t *\n\t * @example\n\t * // Convert with colspan enabled and duplicate suffix\n\t * const data = await table.getJson({\n\t * headerRowOptions: {\n\t * colspan: { enabled: true, suffix: true },\n\t * duplicateSuffix: true,\n\t * emptyCellReplacement: true\n\t * }\n\t * });\n\t */\n\tasync getJson(options?: TableOptions): Promise<Record<string, string>[]> {\n\t\tconst table = await this.getTable({\n\t\t\tbodyRowOptions: options?.bodyRowOptions,\n\t\t\theaderRowOptions: {\n\t\t\t\tcolspan: {\n\t\t\t\t\tenabled: options?.headerRowOptions?.colspan?.enabled ?? true,\n\t\t\t\t\tsuffix: options?.headerRowOptions?.colspan?.suffix ?? true,\n\t\t\t\t},\n\t\t\t\tduplicateSuffix: options?.headerRowOptions?.duplicateSuffix ?? true,\n\t\t\t\temptyCellReplacement: options?.headerRowOptions?.emptyCellReplacement ?? true,\n\t\t\t},\n\t\t});\n\n\t\tconst headers = this.mainHeaderRow(table.headerRows);\n\t\treturn table.bodyRows.map(row => {\n\t\t\tconst rowObj: Record<string, Cell> = {};\n\t\t\theaders.forEach((header, index) => {\n\t\t\t\trowObj[header] = row[index] || \"\";\n\t\t\t});\n\t\t\treturn rowObj;\n\t\t});\n\t}\n\n\t/**\n\t * Waits for the table body to be empty (no body rows).\n\t * @param options - Polling options (timeout, interval, retries).\n\t * @returns A promise that resolves when table body is empty.\n\t * @throws Error if table is not empty within timeout period.\n\t *\n\t * @example\n\t * // Wait for table to clear after delete operation\n\t * await table.waitForEmpty({ timeout: 5000 });\n\t *\n\t * @see {@link waitForNonEmpty} for waiting until table has data\n\t *\n\t * @remarks\n\t * **Alternative:** Consider using Playwright's `expect.poll` for more flexibility:\n\t * ```ts\n\t * await expect.poll(async () => (await table.getBodyRows()).length).toBe(0);\n\t * ```\n\t */\n\tasync waitForEmpty(options?: PollingOptions): Promise<void> {\n\t\tawait pollTable(async () => {\n\t\t\tconst rows = await this._bodyRowLocator.all();\n\t\t\tif (rows.length > 0) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected table to be empty, but found ${rows.length} body rows.\\n` +\n\t\t\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}`\n\t\t\t\t);\n\t\t\t}\n\t\t}, options);\n\t}\n\n\t/**\n\t * Waits for the table body to be non-empty (at least one body row with content).\n\t * A row is considered valid if it has at least one cell containing text.\n\t * @param options - Polling options (timeout, interval, retries).\n\t * @returns A promise that resolves when table has at least one body row with content.\n\t * @throws Error if table remains empty or has no rows with content within timeout period.\n\t *\n\t * @example\n\t * // Wait for table to populate after search\n\t * await table.waitForNonEmpty({ timeout: 5000 });\n\t *\n\t * @see {@link waitForEmpty} for waiting until table is cleared\n\t *\n\t * @remarks\n\t * **Alternative:** Consider using Playwright's `expect.poll` for more flexibility:\n\t * ```ts\n\t * await expect.poll(async () => (await table.getBodyRows()).length).toBeGreaterThan(0);\n\t * ```\n\t */\n\tasync waitForNonEmpty(options?: PollingOptions): Promise<void> {\n\t\tawait pollTable(async () => {\n\t\t\tconst rows = await this._bodyRowLocator.all();\n\t\t\tif (rows.length === 0) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected table to be non-empty, but found 0 body rows.\\n` +\n\t\t\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Check if at least one row has content in at least one cell\n\t\t\tlet hasRowWithContent = false;\n\t\t\tfor (const row of rows) {\n\t\t\t\tconst cells = await row.locator(this._bodyRowColumnSelector).all();\n\t\t\t\tfor (const cell of cells) {\n\t\t\t\t\tconst content = await cell.innerText();\n\t\t\t\t\tif (content.trim().length > 0) {\n\t\t\t\t\t\thasRowWithContent = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (hasRowWithContent) break;\n\t\t\t}\n\n\t\t\tif (!hasRowWithContent) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected table to have at least one row with content, but all ${rows.length} rows are empty.\\n` +\n\t\t\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}`\n\t\t\t\t);\n\t\t\t}\n\t\t}, options);\n\t}\n\n\t/**\n\t * Waits for the table body to have exactly N rows.\n\t * @param count - The exact number of body rows expected.\n\t * @param options - Polling options (timeout, interval, retries).\n\t * @returns A promise that resolves when the table has exactly the specified number of rows.\n\t * @throws Error if row count doesn't match within timeout period.\n\t *\n\t * @example\n\t * // Wait for exactly 10 rows after pagination\n\t * await table.waitForExactRowCount(10, { timeout: 5000 });\n\t *\n\t * @example\n\t * // Verify table has exactly 0 rows (alternative to waitForEmpty)\n\t * await table.waitForExactRowCount(0);\n\t *\n\t * @see {@link getRowCount} for getting current row counts\n\t *\n\t * @remarks\n\t * **Alternative:** Consider using Playwright's `expect.poll` for more flexibility:\n\t * ```ts\n\t * await expect.poll(async () => (await table.getBodyRows()).length).toBe(10);\n\t * ```\n\t */\n\tasync waitForExactRowCount(count: number, options?: PollingOptions): Promise<void> {\n\t\tif (count < 0 || !Number.isInteger(count)) {\n\t\t\tthrow new Error(`Row count must be a non-negative integer, got: ${count}`);\n\t\t}\n\n\t\tawait pollTable(async () => {\n\t\t\tconst rows = await this._bodyRowLocator.all();\n\t\t\tif (rows.length !== count) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Expected exactly ${count} rows, but found ${rows.length}.\\n` +\n\t\t\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}`\n\t\t\t\t);\n\t\t\t}\n\t\t}, options);\n\t}\n\n\t/**\n\t * Gets the count of header and body rows in the table.\n\t * Lightweight method that doesn't fetch cell data, only counts rows.\n\t * @returns A promise that resolves to an object with header and body row counts.\n\t *\n\t * @example\n\t * // Get current row counts\n\t * const counts = await table.getRowCount();\n\t * console.log(`Headers: ${counts.header}, Body: ${counts.body}`);\n\t *\n\t * @example\n\t * // Assert specific row count\n\t * const { body } = await table.getRowCount();\n\t * expect(body).toBe(10);\n\t */\n\tasync getRowCount(): Promise<{ header: number; body: number }> {\n\t\tconst [headerRows, bodyRows] = await Promise.all([this._headerRowLocator.all(), this._bodyRowLocator.all()]);\n\t\treturn {\n\t\t\theader: headerRows.length,\n\t\t\tbody: bodyRows.length,\n\t\t};\n\t}\n\n\t/**\n\t * Gets all distinct (unique) values from a specific column.\n\t * Returns a sorted array of unique string values, excluding empty values.\n\t * @param headerName - The header name of the column to extract distinct values from.\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to a sorted array of distinct values.\n\t * @throws Error if the specified header is not found in the table.\n\t *\n\t * @example\n\t * // Get all unique status values\n\t * const statuses = await table.getDistinctColumnValues(\"Status\");\n\t * // Result: [\"Active\", \"Inactive\", \"Pending\"]\n\t *\n\t * @example\n\t * // Get distinct countries for filtering\n\t * const countries = await table.getDistinctColumnValues(\"Country\");\n\t * console.log(`Available countries: ${countries.join(\", \")}`);\n\t *\n\t * @example\n\t * // Verify expected values exist\n\t * const roles = await table.getDistinctColumnValues(\"Role\");\n\t * expect(roles).toContain(\"Admin\");\n\t * expect(roles).toHaveLength(3);\n\t *\n\t * @see {@link getAllBodyCellLocatorsByHeaderName} for getting all cell locators in a column\n\t * @see {@link getJson} for getting full table data\n\t */\n\tasync getDistinctColumnValues(headerName: string, options?: TableOptions): Promise<string[]> {\n\t\tconst table = await this.getTable(options);\n\t\tconst mainHeader = this.mainHeaderRow(table.headerRows);\n\t\tconst headerIndex = this.getHeaderIndex(headerName, mainHeader);\n\n\t\tconst values = new Set<string>();\n\t\tfor (const row of table.bodyRows) {\n\t\t\tconst value = String(row[headerIndex] ?? \"\").trim();\n\t\t\tif (value) values.add(value);\n\t\t}\n\n\t\treturn Array.from(values).sort();\n\t}\n\n\t/**\n\t * Finds the index of the first body row matching the specified conditions.\n\t * Returns -1 if no matching row is found.\n\t * @param conditions - Record of header names and expected cell values to match.\n\t * @param options - Optional table loading options. See {@link TableOptions}.\n\t * @returns A promise that resolves to the 0-based index of the first matching row, or -1 if not found.\n\t * @throws Error if specified headers don't exist in the table.\n\t *\n\t * @example\n\t * // Find index of row where Status is \"Active\"\n\t * const index = await table.findRowIndex({ Status: \"Active\" });\n\t * if (index >= 0) {\n\t * console.log(`Found at row ${index}`);\n\t * }\n\t *\n\t * @example\n\t * // Find row and interact with it\n\t * const rowIndex = await table.findRowIndex({ Username: \"john.doe\" });\n\t * if (rowIndex >= 0) {\n\t * const cell = table.getBodyCellLocator(rowIndex, 0);\n\t * await cell.click();\n\t * }\n\t *\n\t * @see {@link getBodyCellLocatorByRowConditions} for getting cell locators from matching rows\n\t * @see {@link waitForRowByConditions} for waiting until matching row appears\n\t */\n\tasync findRowIndex(conditions: Record<string, string>, options?: TableOptions): Promise<number> {\n\t\tconst table = await this.getTable({\n\t\t\theaderRowOptions: { colspan: { enabled: true }, ...options?.headerRowOptions },\n\t\t\tbodyRowOptions: options?.bodyRowOptions,\n\t\t});\n\t\tconst mainHeader = this.mainHeaderRow(table.headerRows);\n\n\t\t// Validate all condition headers exist and get their indices\n\t\tconst headerIndices = new Map<string, number>();\n\t\tfor (const header of Object.keys(conditions)) {\n\t\t\theaderIndices.set(header, this.getHeaderIndex(header, mainHeader));\n\t\t}\n\n\t\t// Find first matching row\n\t\tfor (let rowIndex = 0; rowIndex < table.bodyRows.length; rowIndex++) {\n\t\t\tconst row = table.bodyRows[rowIndex];\n\t\t\tlet rowMatches = true;\n\n\t\t\tfor (const [header, expectedValue] of Object.entries(conditions)) {\n\t\t\t\tconst headerIndex = headerIndices.get(header)!;\n\t\t\t\tconst cellValue = String(row[headerIndex] ?? \"\");\n\t\t\t\tif (cellValue !== expectedValue) {\n\t\t\t\t\trowMatches = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (rowMatches) {\n\t\t\t\treturn rowIndex;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}\n\n\tprivate async getTable(options?: TableOptions): Promise<{ headerRows: HeaderRow[]; bodyRows: BodyRow[] }> {\n\t\tconst [headerRows, bodyRows] = await Promise.all([\n\t\t\tTableHeader.getRows(this._headerRowLocator, this._headerColumnSelector, options?.headerRowOptions),\n\t\t\tTableBody.getRows(this._bodyRowLocator, this._bodyRowColumnSelector, options?.bodyRowOptions),\n\t\t]);\n\n\t\tif (headerRows.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`No header rows found, is table loaded completely?\\n` +\n\t\t\t\t\t`Header row locator: ${this._headerRowLocator.toString()}\\n` +\n\t\t\t\t\t`Table locator: ${this._tableLocator.toString()}`\n\t\t\t);\n\t\t}\n\t\tif (bodyRows.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`No body rows found, is table loaded completely?\\n` +\n\t\t\t\t\t`Body row locator: ${this._bodyRowLocator.toString()}\\n` +\n\t\t\t\t\t`Table locator: ${this._tableLocator.toString()}`\n\t\t\t);\n\t\t}\n\n\t\treturn { headerRows, bodyRows };\n\t}\n\n\tprivate mainHeaderRow(headers: HeaderRow[]): HeaderRow {\n\t\tif (headers.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`No header rows available. Ensure table has been loaded.\\n` +\n\t\t\t\t\t`Header row locator: ${this._headerRowLocator.toString()}`\n\t\t\t);\n\t\t}\n\n\t\tconst headerIndex = this._options?.header?.setMainHeaderRow ?? headers.length - 1;\n\t\tif (headerIndex < 0 || headerIndex >= headers.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Header row index ${headerIndex} out of bounds. Table has ${headers.length} header rows.\\n` +\n\t\t\t\t\t`Header row locator: ${this._headerRowLocator.toString()}`\n\t\t\t);\n\t\t}\n\n\t\treturn headers[headerIndex];\n\t}\n\n\t/**\n\t * Gets the index of a header in the main header row, throwing an error if not found.\n\t * @param header - The header name to find.\n\t * @param mainHeader - The main header row to search in.\n\t * @returns The 0-based index of the header.\n\t * @throws Error if the header is not found.\n\t */\n\tprivate getHeaderIndex(header: string, mainHeader: HeaderRow): number {\n\t\tconst index = mainHeader.indexOf(header);\n\t\tif (index === -1) {\n\t\t\tthrow new Error(\n\t\t\t\t`Header \"${header}\" not found.\\n` +\n\t\t\t\t\t`Available headers: [${mainHeader.join(\", \")}]\\n` +\n\t\t\t\t\t`Header row locator: ${this._headerRowLocator.toString()}`\n\t\t\t);\n\t\t}\n\t\treturn index;\n\t}\n}\n"],"mappings":";AAKA,eAAsB,UAAU,IAAyB,SAAyC;AALlG;AAMC,MAAI,CAAC,SAAS;AACb,cAAU,CAAC;AAAA,EACZ;AAEA,QAAM,WAAU,aAAQ,YAAR,YAAmB;AACnC,QAAM,YAAW,aAAQ,aAAR,YAAoB;AACrC,QAAM,YAAY,KAAK,IAAI;AAC3B,MAAI;AAEJ,SAAO,KAAK,IAAI,IAAI,YAAY,SAAS;AACxC,QAAI;AACH,YAAM,GAAG;AACT;AAAA,IACD,SAAS,KAAK;AACb,kBAAY;AAEZ,YAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,QAAQ,CAAC;AAAA,IAC3D;AAAA,EACD;AAEA,QAAM,aAAa,IAAI,MAAM,4CAA4C;AAC1E;;;ACrBO,IAAK,kBAAL,kBAAKA,qBAAL;AACN,EAAAA,iBAAA,iBAAc;AACd,EAAAA,iBAAA,eAAY;AAFD,SAAAA;AAAA,GAAA;;;ACEL,IAAM,aAAN,MAAiB;AAAA,EACf,cAAc;AAAA,EAEtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,aAAa,eAAe,MAAe,iBAAmD;AAC7F,QAAI;AACH,YAAM,QAAQ,MAAM,KAAK,MAAM;AAC/B,UAAI,UAAU,GAAG;AAChB,cAAM,IAAI,MAAM,wCAAwC;AAAA,MACzD;AAEA,YAAM,UAAU,kDAAgD,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,YAAY;AAChH,cAAO,mCAAS,WAAU;AAAA,IAC3B,SAAS,OAAO;AACf,YAAM,qBAAqB,KAAK,sBAAsB,IAAI;AAC1D,YAAM,IAAI;AAAA,QACT;AAA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AAI;AAAA,QACT;AAAA,sBACwB,KAAK,kBAAkB,SAAS,CAAC;AAAA,iBACtC,KAAK,cAAc,SAAS,CAAC;AAAA,MACjD;AAAA,IACD;AACA,QAAI,SAAS,WAAW,GAAG;AAC1B,YAAM,IAAI;AAAA,QACT;AAAA,oBACsB,KAAK,gBAAgB,SAAS,CAAC;AAAA,iBAClC,KAAK,cAAc,SAAS,CAAC;AAAA,MACjD;AAAA,IACD;AAEA,WAAO,EAAE,YAAY,SAAS;AAAA,EAC/B;AAAA,EAEQ,cAAc,SAAiC;AA1oBxD;AA2oBE,QAAI,QAAQ,WAAW,GAAG;AACzB,YAAM,IAAI;AAAA,QACT;AAAA,sBACwB,KAAK,kBAAkB,SAAS,CAAC;AAAA,MAC1D;AAAA,IACD;AAEA,UAAM,eAAc,sBAAK,aAAL,mBAAe,WAAf,mBAAuB,qBAAvB,YAA2C,QAAQ,SAAS;AAChF,QAAI,cAAc,KAAK,eAAe,QAAQ,QAAQ;AACrD,YAAM,IAAI;AAAA,QACT,oBAAoB,WAAW,6BAA6B,QAAQ,MAAM;AAAA,sBAClD,KAAK,kBAAkB,SAAS,CAAC;AAAA,MAC1D;AAAA,IACD;AAEA,WAAO,QAAQ,WAAW;AAAA,EAC3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASQ,eAAe,QAAgB,YAA+B;AACrE,UAAM,QAAQ,WAAW,QAAQ,MAAM;AACvC,QAAI,UAAU,IAAI;AACjB,YAAM,IAAI;AAAA,QACT,WAAW,MAAM;AAAA,sBACO,WAAW,KAAK,IAAI,CAAC;AAAA,sBACrB,KAAK,kBAAkB,SAAS,CAAC;AAAA,MAC1D;AAAA,IACD;AACA,WAAO;AAAA,EACR;AACD;","names":["CellContentType"]}
package/package.json CHANGED
@@ -1,62 +1,67 @@
1
1
  {
2
2
  "name": "@cerios/playwright-table",
3
- "version": "1.1.1",
4
- "author": "Ronald Veth - Cerios",
5
- "description": "Easy Html Tables handler for Playwright",
6
- "license": "MIT",
3
+ "version": "2.0.0",
4
+ "description": "A high-performance Playwright library for testing HTML tables with comprehensive support for complex table structures including colspan, rowspan, multiple headers, and dynamic content. Features robust error handling, parallel data fetching, and intuitive APIs for table validation and data extraction.",
7
5
  "keywords": [
8
- "playwright",
9
6
  "html",
7
+ "playwright",
10
8
  "table",
11
9
  "testing"
12
10
  ],
11
+ "homepage": "https://github.com/CeriosTesting/playwright-tables#readme",
13
12
  "bugs": {
14
13
  "url": "https://github.com/CeriosTesting/playwright-tables/issues"
15
14
  },
16
- "homepage": "https://github.com/CeriosTesting/playwright-tables#readme",
15
+ "license": "MIT",
16
+ "author": "Ronald Veth - Cerios",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "git+https://github.com/CeriosTesting/playwright-tables.git"
20
20
  },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "type": "commonjs",
25
+ "main": "./dist/index.js",
26
+ "module": "./dist/index.mjs",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ "./package.json": "./package.json",
30
+ ".": {
31
+ "import": "./dist/index.mjs",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
21
35
  "scripts": {
22
- "format": "prettier --write . --cache --ignore-path=.prettierignore",
23
36
  "test": "playwright test",
24
37
  "prepare": "husky",
25
38
  "build": "tsup",
26
39
  "serve": "serve tests/demo-html -p 3000",
27
40
  "check-exports": "attw --pack .",
28
41
  "changeset": "npx changeset",
29
- "local-release": "changeset version && changeset publish",
42
+ "changeset:version": "changeset version && npm i",
43
+ "changeset:publish": "changeset publish",
30
44
  "compile": "tsc --noEmit",
31
- "update-all-packages": "npx npm-check-updates -u && npm i"
45
+ "update-all-packages": "npx npm-check-updates -u && npm i",
46
+ "lint": "oxlint",
47
+ "lint:fix": "oxlint --fix",
48
+ "format": "oxfmt",
49
+ "format:check": "oxfmt --check"
32
50
  },
33
51
  "devDependencies": {
34
52
  "@arethetypeswrong/cli": "^0.18.1",
35
53
  "@changesets/cli": "^2.29.4",
36
54
  "@playwright/test": "^1.52.0",
37
55
  "husky": "^9.1.7",
38
- "lint-staged": "^16.0.0",
39
- "prettier": "^3.5.3",
56
+ "lint-staged": "^16.1.0",
57
+ "oxfmt": "^0.26.0",
58
+ "oxlint": "^1.41.0",
40
59
  "serve": "^14.2.4",
41
60
  "ts-node": "^10.9.2",
42
- "tsup": "^8.4.0",
61
+ "tsup": "^8.5.0",
43
62
  "typescript": "^5.8.3"
44
63
  },
45
64
  "peerDependencies": {
46
- "@playwright/test": "^1.51.1"
47
- },
48
- "main": "./dist/index.js",
49
- "module": "./dist/index.mjs",
50
- "types": "./dist/index.d.ts",
51
- "files": [
52
- "dist"
53
- ],
54
- "type": "commonjs",
55
- "exports": {
56
- "./package.json": "./package.json",
57
- ".": {
58
- "import": "./dist/index.mjs",
59
- "default": "./dist/index.js"
60
- }
65
+ "@playwright/test": "^1.40.0"
61
66
  }
62
67
  }