Commit fa1066b1 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Adapt tests to the new behaviors

parent 9a192aea
......@@ -5,6 +5,7 @@ DiscoverTest
{
function test_open() {
verify(appRoot.stack.currentItem, "has a loading page");
compare(appRoot.stack.currentItem.title, "techie1", "same title");
compare(appRoot.stack.currentItem.title, "", "same title");
compare(appRoot.stack.currentItem.application.packageName, "techie1", "pkgname");
}
}
......@@ -8,7 +8,6 @@ DiscoverTest
app.openApplication("dummy://dummy.1");
verify(waitForSignal(appRoot.stack, "currentItemChanged"))
verify(appRoot.stack.currentItem, "has a page");
compare(appRoot.stack.currentItem.title, "Dummy 1", "same title");
var button = findChild(appRoot.stack.currentItem, "InstallApplicationButton")
verify(!button.isActive)
......
......@@ -4,6 +4,6 @@ import QtTest 1.1
DiscoverTest
{
function test_open() {
compare(appRoot.stack.currentItem.title, "Featured")
compare(appRoot.stack.currentItem.title, "Sorry...")
}
}
......@@ -7,6 +7,7 @@ DiscoverTest
verify(appRoot.stack.currentItem, "has a page");
while (appRoot.stack.currentItem.title === "Loading...")
waitForRendering();
compare(appRoot.stack.currentItem.title, "CMakeLists.txt", "same title");
compare(appRoot.stack.currentItem.title, "", "same title");
compare(appRoot.stack.currentItem.application.packageName, "CMakeLists.txt", "pkgname");
}
}
......@@ -72,9 +72,9 @@ DiscoverTest
var updatePage = appRoot.stack.currentItem;
compare(typeName(updatePage), "UpdatesPage")
compare(updatePage.state, "has-updates", "to update")
var button = findChild(updatePage, "Button")
verify(button);
button.clicked();
var action = updatePage.currentAction
verify(action);
action.triggered(updatePage);
compare(updatePage.state, "has-updates", "updating")
//make sure the window doesn't close while updating
......
......@@ -11,9 +11,9 @@ DiscoverTest
var updatePage = appRoot.stack.currentItem;
compare(typeName(updatePage), "UpdatesPage")
compare(updatePage.state, "has-updates", "to update")
var button = findChild(updatePage, "Button")
verify(button);
button.clicked();
var action = updatePage.currentAction
verify(action);
action.triggered(null);
compare(updatePage.state, "has-updates", "updating")
}
......@@ -35,8 +35,8 @@ DiscoverTest
while(updatePage.state === "fetching")
waitForSignal(updatePage, "stateChanged")
compare(updatePage.state, "now-uptodate", "to update")
var button = findChild(updatePage, "Button")
verify(!button.isActive)
var action = updatePage.currentAction
verify(!action.visible)
}
while(updatePage.state != "now-uptodate")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment