Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@EPashkin
Copy link
Member

EPashkin commented May 2, 2018

@GuillaumeGomez Thanks, now we have way to test gtk in .travis too.

Copy link
Member

@sdroege sdroege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some details :)


Hi everyone!

Today is not about a new [`gtk-rs`] release but about a new crate being released. Let me introduced to you: [`gtk-test`]!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

introduced -> introduce


Today is not about a new [`gtk-rs`] release but about a new crate being released. Let me introduced to you: [`gtk-test`]!

So what's the purpose of this new crate? Simply to test UI. Currently, testing UIs is difficult, but with [`gtk-test`], you can check basically everything UI-related way more simply.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply to test UI -> UIs

way more simply -> simple

check -> test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense with "simple". :-/ Or did I misunderstood what you meant?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply to test UIs. Currently, testing UIs is difficult, but with [gtk-test] you can test basically everything UI-related way more simple.

But better ask a native English speaker if unsure :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see! Thanks!


So what's the purpose of this new crate? Simply to test UI. Currently, testing UIs is difficult, but with [`gtk-test`], you can check basically everything UI-related way more simply.

Now you might wonder: how does it work? We send UI events to the window. So if your window isn't on top of all other windows, events won't work (not on your window at least). This is an issue on OSX for example (there is a workaround luckily).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That OSX issue seems like something for a footnote, not in the middle of the text :) And with a link to the relevant bug report in Bugzilla and PR

Also maybe mention that windows can be brought to the front by GTK

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the issue is that you can't bring the window to the front on OSX. But I'll remove the part about osx issue.

}
```

Tadam! The newly created `observer` will look and ensure that the given signal has indeed been called (if not, it'll obviously get stuck at `observer.wait()`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have a (high) timeout, like 20-30s or so, or an optional timeout when it fails? That would seem useful to prevent CI from hanging forever and let the test cleanly fail and proceed to the next test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it doesn't. However, if you're using cargo test, the timeout is 60 seconds.

@GuillaumeGomez GuillaumeGomez merged commit 5170b09 into master May 2, 2018
@GuillaumeGomez GuillaumeGomez deleted the new-post branch May 2, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants