Conversation
Updated the test framework to support the current set of UI Tests
The order of results matters for some operations and actions (for example NextSiblings, Index) so we need to store results in an ordered collection. As we insert in order and iterate the collection completely in order anyway, there shouldn't be a performance hit
NextSiblings operation can return any siblings that come after the current result
Add an index operation to get a specific index from a result set
Put RunAndWaitForTimer into the AutoTestClientSession, and use it instead of Thread.Sleep to know when the solution has been loaded
Instead of passing the TimerCounters across the wire as MarshalByRefObjects and accessing them directly by properties, wrap operations that need to be waited on in a timer context, and do all the waiting on the MonoDevelop side
} | ||
|
||
public bool SelectTemplateType (string type, string category) | ||
{ | ||
return Session.SelectTreeviewItem ("templateCategoriesTreeView", type, category); | ||
return Session.SelectElement (c => c.TreeView ().Marked ("templateCategoriesTreeView").Model ("templateCategoriesListStore__Name").Text (type)); | ||
} |
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.
This would not work for non-MD templates.
Can you update this to use category too such that if we have
- Cross-platform
- App
- Tests
- Mac
- App
- Tests
and type is "App" and category is "Mac", then this would select "App" under "Cross-platform" instead of under "Mac"
If you have
[Test]
public void TestAndroidUITest ()
{
CreateBuildProject ("DroidApp", "Android App", "App", "Android", EmptyAction);
}
then it fails at the line 103 of SelectTemplate
Assert.IsTrue (newProject.SelectTemplate (kind));
since newProject.SelectTemplateType (category, categoryRoot)
selected App
under different category
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.
Fixed this, although I'm not entirely happy with the method.
The problem is that in the model the category name is marked up as Mac, so simply doing a Text operation with "Mac" fails and I don't want to require the test writer to know how the markup is written.
I've added a Contains operation, which is similar to Text but does not require an exact match.
We'll need to revisit this after I get back, but this should be enough to get it working in the meantime.
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
1 similar comment
Hello! I'm the build bot for the Mono project. I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done. Contributors can ignore this message. |
whitelist |
Operation classes are placed in the wrong directory. Instead of: MonoDevelop.Components.AutoTest\MonoDevelop.Components.AutoTest.Operations\Operation.cs It should be: MonoDevelop.Components.AutoTest.Operations\Operation.cs |
…the parent directory
Contains is like Text but doesn't have to match exactly.
@slluis I've moved the Operations and Results subdirectories. |
Looks good. |
The basics of the test framework:
Currently supports
Operations: Type, Property, Model, Marked, Text, NextSiblings, Index
Actions: Select, Click, TypeKey, Toggle
Moved waiting for timers/counters into the MD process, rather than creating a proxy MarshalByRef remote object for the counter.
Added an attribute that can be used to add metadata about GtkTreeModels. It can either be added to a class, or to an instance.
Still needs done: