Skip to content

Commit 0c39678

Browse files
committed
fix(assistant): exclude disabled filter button when generating ag grid scenario
1 parent 852c44d commit 0c39678

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/assistant/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
{ field: "make", },
9393
{ field: "model" },
9494
{ field: "price" },
95-
{ field: "electric" },
95+
{ field: "electric", filter: false },
9696
],
9797
};
9898
// Create Grid: Create new grid within the #myGrid div, using the Grid Options object

packages/assistant/src/translator/expect-translator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class ExpectTranslator extends Translator {
6565
rows.forEach(row => {
6666
const values = Array.from(row.querySelectorAll(`[role=${cellRoleName}], td, [role=columnheader], th`)).map(c => {
6767
if(c.classList.contains("ag-floating-filter")) {
68-
return Array.from(c.querySelectorAll('[role=button], button')).reduce(
68+
return Array.from(c.querySelectorAll('[role=button]:not(.ag-hidden [role=button]), button:not(.ag-hidden button)')).reduce(
6969
(accumulator, button) => accumulator + (accumulator.length > 0 ? " " : "") + computeAccessibleName(button),
7070
""
7171
);

packages/assistant/uuv/e2e/assistant.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ Feature: UUV Assistant vital features
147147
And I click
148148
And I reset context
149149
Then I should see a title named "Result of Table and Grid Expect"
150-
And I should see a text box named "Generated UUV Script" and containing "Feature: Your amazing feature name Scenario: Action - Table and Grid Expect Given I visit path \"http://localhost:5173/\" Then I should see a grid named \"AG Grid Example\" and containing | Make | Model | Price | Electric || ---------------- | ---------------- | ---------------- | ---------------- || Open Filter Menu | Open Filter Menu | Open Filter Menu | Open Filter Menu || Tesla | Model Y | 64950 | checked || Ford | F-Series | 33850 | unchecked || Toyota | Corolla | 29600 | unchecked || Mercedes | EQA | 48890 | checked || Fiat | 500 | 15774 | unchecked || Nissan | Juke | 20675 | unchecked |"
150+
And I should see a text box named "Generated UUV Script" and containing "Feature: Your amazing feature name Scenario: Action - Table and Grid Expect Given I visit path \"http://localhost:5173/\" Then I should see a grid named \"AG Grid Example\" and containing | Make | Model | Price | Electric || ---------------- | ---------------- | ---------------- | --------- || Open Filter Menu | Open Filter Menu | Open Filter Menu | || Tesla | Model Y | 64950 | checked || Ford | F-Series | 33850 | unchecked || Toyota | Corolla | 29600 | unchecked || Mercedes | EQA | 48890 | checked || Fiat | 500 | 15774 | unchecked || Nissan | Juke | 20675 | unchecked |"

0 commit comments

Comments
 (0)