summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/installer/scriptengine/data/auto-install.qs8
-rw-r--r--tests/auto/installer/scriptengine/tst_scriptengine.cpp7
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/installer/scriptengine/data/auto-install.qs b/tests/auto/installer/scriptengine/data/auto-install.qs
index 26937fc05..8504cd08a 100644
--- a/tests/auto/installer/scriptengine/data/auto-install.qs
+++ b/tests/auto/installer/scriptengine/data/auto-install.qs
@@ -4,6 +4,14 @@ function Controller()
installer.setValue("GuiTestValue", "hello");
}
+Controller.prototype.IntroductionPageCallback = function()
+{
+ var widget = gui.currentPageWidget();
+ var updaterRadioButton = widget.findChild("UpdaterRadioButton");
+ updaterRadioButton.checked = true;
+ gui.clickButton(buttons.NextButton);
+}
+
Controller.prototype.ComponentSelectionPageCallback = function()
{
var notExistingButtonId = 9999999;
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp
index 23cb56dd0..91013d028 100644
--- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp
+++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp
@@ -56,6 +56,11 @@ public:
setPage(PackageManagerCore::Introduction, new IntroductionPage(core));
setPage(PackageManagerCore::ComponentSelection, new ComponentSelectionPage(core));
setPage(PackageManagerCore::InstallationFinished, new FinishedPage(core));
+
+ foreach (const int id, pageIds()) {
+ packageManagerCore()->controlScriptEngine()->addQObjectChildren(page(id));
+ packageManagerCore()->componentScriptEngine()->addQObjectChildren(page(id));
+ }
}
virtual void init() {}
@@ -306,8 +311,6 @@ private slots:
testGui.loadControlScript(":///data/auto-install.qs");
QCOMPARE(m_core.value("GuiTestValue"), QString("hello"));
- // show event calls automatically the first callback which does not exist
- setExpectedScriptOutput("Control script callback \"IntroductionPageCallback\" does not exist. ");
testGui.show();
// inside the auto-install script we are clicking the next button, with a not existing button