-
Notifications
You must be signed in to change notification settings - Fork 366
Add miq data table commands #9691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jrafanie
merged 6 commits into
ManageIQ:master
from
asirvadAbrahamVarghese:add-miq-data-table-commands
Nov 3, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
934868b
Add table row click command based on text and optional column
asirvadAbrahamVarghese 044e1a5
Updated cypress README with clickTableRowByText info
asirvadAbrahamVarghese 127f439
Dropped gtl_no_record from commands
asirvadAbrahamVarghese 50eb002
Removed gtl_no_record from cypress README
asirvadAbrahamVarghese ffcab81
Added expect_gtl_no_records_with_text assertion to replace gtl_no_record
asirvadAbrahamVarghese 5a31ec4
Updated cypress README with expect_gtl_no_records_with_text command info
asirvadAbrahamVarghese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* eslint-disable no-undef */ | ||
|
|
||
| /** | ||
| * Command to verify that the GTL (Grid/Tile/List) view displays a "no records" message. | ||
| * This assertion checks that the specified text is visible within the GTL view container. | ||
| * | ||
| * @param {Object} params - Parameters for the command | ||
| * @param {string} [params.containsText='No records'] - The text to verify in the no records message | ||
| * @returns {Cypress.Chainable} A Cypress chainable that asserts the text is visible | ||
| * @example | ||
| * // Check for default "No records" message | ||
| * cy.expect_gtl_no_records_with_text(); | ||
| * | ||
| * @example | ||
| * // Check for custom message | ||
| * cy.expect_gtl_no_records_with_text({ containsText: 'No items found' }); | ||
| */ | ||
| Cypress.Commands.add( | ||
| 'expect_gtl_no_records_with_text', | ||
| ({ containsText = 'No records' } = {}) => { | ||
| return cy.contains('#miq-gtl-view', containsText).should('be.visible'); | ||
| } | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 It's good to be case sensitive here and expect exact text since we'll be creating the objects with the right text so it should be easy to ensure we match it correctly.
It will be interesting to see if this miq-data-table structure holds for all pages containing the data table. I hope so but we'll see as we do more pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had the same doubt, that’s why I’m keeping the selector minimal(without including classes) for now. Let’s see how it goes....