@linzjs/step-ag-grid 7.16.5 → 7.17.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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "7.16.5",
5
+ "version": "7.17.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -76,6 +76,11 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
76
76
  await waitFor(findOpenMenu);
77
77
  };
78
78
 
79
+ export const isCellReadOnly = async (rowId: number | string, colId: string, within?: HTMLElement): Promise<boolean> => {
80
+ const cell = await findCell(rowId, colId, within);
81
+ return cell.className.includes("GridCell-reaonly");
82
+ };
83
+
79
84
  const findOpenMenu = async (): Promise<HTMLElement> => findQuick({ classes: ".szh-menu--state-open" });
80
85
 
81
86
  export const queryMenuOption = async (menuOptionText: string | RegExp): Promise<HTMLElement | null> => {
@@ -159,7 +164,7 @@ const typeInput = async (value: string, filter: IQueryQuick): Promise<void> => {
159
164
  };
160
165
 
161
166
  export const typeOnlyInput = async (value: string): Promise<void> => {
162
- await typeInput(value, { child: { tagName: "input[type='text']" } });
167
+ await typeInput(value, { child: { tagName: "input[type='text'], textarea" } });
163
168
  };
164
169
 
165
170
  export const typeInputByLabel = async (value: string, labelText: string): Promise<void> => {
@@ -170,11 +175,14 @@ export const typeInputByLabel = async (value: string, labelText: string): Promis
170
175
  if (labels.length > 1) {
171
176
  throw Error(`Multiple labels found for text: ${labelText}`);
172
177
  }
173
- await typeInput(value, { child: { tagName: `input[id='${labels[0].getAttribute("for")}']` } });
178
+ const inputId = labels[0].getAttribute("for");
179
+ await typeInput(value, { child: { tagName: `input[id='${inputId}'], textarea[id='${inputId}']` } });
174
180
  };
175
181
 
176
182
  export const typeInputByPlaceholder = async (value: string, placeholder: string): Promise<void> => {
177
- await typeInput(value, { child: { tagName: `input[placeholder='${placeholder}']` } });
183
+ await typeInput(value, {
184
+ child: { tagName: `input[placeholder='${placeholder}'], textarea[placeholder='${placeholder}']` },
185
+ });
178
186
  };
179
187
 
180
188
  export const typeOtherInput = async (value: string): Promise<void> => {