File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable no-undef */
2+
3+ /**
4+ * Command to verify that the GTL (Grid/Tile/List) view displays a "no records" message.
5+ * This assertion checks that the specified text is visible within the GTL view container.
6+ *
7+ * @param {Object } params - Parameters for the command
8+ * @param {string } [params.containsText='No records'] - The text to verify in the no records message
9+ * @returns {Cypress.Chainable } A Cypress chainable that asserts the text is visible
10+ * @example
11+ * // Check for default "No records" message
12+ * cy.expect_gtl_no_records_with_text();
13+ *
14+ * @example
15+ * // Check for custom message
16+ * cy.expect_gtl_no_records_with_text({ containsText: 'No items found' });
17+ */
18+ Cypress . Commands . add (
19+ 'expect_gtl_no_records_with_text' ,
20+ ( { containsText = 'No records' } = { } ) => {
21+ return cy . contains ( '#miq-gtl-view' , containsText ) . should ( 'be.visible' ) ;
22+ }
23+ ) ;
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ import './assertions/expect_rates_table.js';
6363import './assertions/expect_search_box.js' ;
6464import './assertions/expect_text.js' ;
6565import './assertions/expect_title.js' ;
66+ import './assertions/miq_data_table_assertions.js'
6667
6768// cypress on rails setup:
6869// ***********************************************************
You can’t perform that action at this time.
0 commit comments