Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix failing tests #12615

Merged
merged 4 commits into from
Jul 24, 2016
Merged

Fix failing tests #12615

merged 4 commits into from
Jul 24, 2016

Conversation

marcelgerber
Copy link
Contributor

For #12144 (cc @ficristo)
There's still one FindInFiles test failing, but after looking into it for about 3 hours, I'm giving up on trying to fix that failure.

@ficristo
Copy link
Collaborator

ficristo commented Jul 24, 2016

Can you give me a bit of background of the FindInFiles issues (the ones you are fixing here)?

@marcelgerber
Copy link
Contributor Author

Sure.

  • should disable the Replace button if query is empty
    As FindBar now remembers the last query, the bar is pre-filled in this test case, whereas it tests the case when the bar is empty. We had the same test fixes for FindReplace in Fix FindReplace Integration tests #12440.
  • should expand/collapse items when clicked
    I highly doubt this test has ever worked. #items is not an actual element to be found in our DOM, but a Mustache section. The new selectors select the actual elements that need to be checked. The tr one is that verbose because we don't really have another way to separate tr.disclosure-triangle from "normal" tr rows.

@ficristo
Copy link
Collaborator

Thank you.

The SVG test looks fine.
For the first issue of FindInFiles, can you put the function to clean the searchbar in a beforeEach function in that describe section? If it doesn't cause other issues I would prefer it.
For the second issue I think the point of the test was to check that all lines of a specific list were hidden, with your change you are checking only the first one. I think an option could be to add another class and check for it.

Semi related: when running the FindInFiles test I saw a couple of exception logged in the Developer Tools of test window. Maybe some other timing issue...

@marcelgerber
Copy link
Contributor Author

I cannot move that expression into the beforeEach function because #find-what is not part of the DOM at this point, and I also cannot move it into openSearchBar because some other tests rely on the bar being pre-populated from a selection (and we can't really distinguish where it comes from).

I've also altered the test so two results are checked, and we now make sure all of the results are hidden or visible, respectively.

@ficristo
Copy link
Collaborator

I cannot move that

Thank you to have checked!
If tests pass then LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants