-
Notifications
You must be signed in to change notification settings - Fork 17
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
Eliminate :contains #665
Eliminate :contains #665
Conversation
The `do_deployment_action` already clicks that very "Roll back" button that this line asserted. This just looks like a leftover from some test refactoring.
Unfortunately this happens deep in the PatternFly component, inside of cockpit-components-listing-table.jsx, so we can't easily add classes/IDs to it. But it's always the same 3 tabs anyway, so use constants instead.
Give the kebab menu items a `data-action` attribute and select on this instead.
Similarly to the previous commit, add `data-action` attributes to the card actions and select on them.
Huh, that failure rather feels like a regression from #664, but tests passed there? 🤔 But I can reproduce it, will have a look tomorrow. |
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.
Assuming this goes green, nice!
I was looking at this briefly, and finding something for the dropdownitem seemed annoying, but data-action
actually seems nice!
The tab solution is alright, not superb, but it doesn't seem like our table supports setting any id / description on the tab. Maybe something to consider but then again asserting that the tab position is 1,2,3 is already great! (And also a test of sorts)
@@ -629,7 +632,7 @@ const OStreeSource = ({ ostreeState, refreshRemotes, onChangeBranch, onChangeRem | |||
const Dialogs = useDialogs(); | |||
|
|||
const actions = [ | |||
<DropdownItem key="rebase" | |||
<DropdownItem key="rebase" data-action="rebase" |
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.
Would be nice if the key leaked through to the DOM right ;-)
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.
heh yea, but it's only a React detail..
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.
Hmm what we just merged is flaky? That's strange!
Ah no, much simpler -- |
I dropped the "remove sizzle" commit for now. I'll make test/common free of :contains tomorrow, and can then drop sizzle for good. |
Aaaah, that explains a lot :) Was there a clue in the logs? :) |
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.
Hurray!
The clue was to stare at
for a few seconds and realize the |
No description provided.