|
From: <d_w...@us...> - 2011-04-28 07:45:19
|
Revision: 21079
http://qooxdoo-contrib.svn.sourceforge.net/qooxdoo-contrib/?rev=21079&view=rev
Author: d_wagner
Date: 2011-04-28 07:45:13 +0000 (Thu, 28 Apr 2011)
Log Message:
-----------
fixed theme selection
Modified Paths:
--------------
trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js
Modified: trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js
===================================================================
--- trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-04-27 13:55:07 UTC (rev 21078)
+++ trunk/qooxdoo-contrib/Simulator/trunk/tool/selenium/simulation/demobrowser/test_demobrowser.js 2011-04-28 07:45:13 UTC (rev 21079)
@@ -368,6 +368,7 @@
this.qxType('qxh=[@classname=demobrowser.DemoBrowser]/qx.ui.splitpane.Pane/qx.ui.container.Composite/qx.ui.container.Composite/qx.ui.form.TextField', "");
if (include.length === 0) {
+ var firstSample = true;
this.runScript(treeSelect(2), "Selecting first category");
this.runScript(qxAppInst + '.tree.getSelection()[0].setOpen(true)', "Opening first category");
var finalSampleScript = selWin + '.' + qxAppInst + '.tree.getItems()[' + selWin + '.' + qxAppInst + '.tree.getItems().length - 1].getLabel()';
@@ -379,13 +380,6 @@
this.currentCategory = this.lastCategory = currentCatSam[0];
this.currentSample = currentCatSam[1];
- if (this.getConfigSetting("theme", false)) {
- var chosenTheme = this.getConfigSetting("theme");
- this.log("Switching theme to " + chosenTheme, "info");
- this.qxClick('qxh=[@classname="demobrowser.DemoBrowser"]/qx.ui.toolbar.ToolBar/child[1]/[@label="Theme"]', "", "Clicking Theme button");
- this.qxClick('qxh=[@classname="demobrowser.DemoBrowser"]/qx.ui.toolbar.ToolBar/child[1]/[@label="Theme"]/qx.ui.menu.Menu/[@label="' + chosenTheme + '"]', "", "Selecting theme " + chosenTheme);
- }
-
while (this.currentSample != this.lastSample) {
if (this.lastCategory) {
if (this.currentCategory != this.lastCategory && this.getConfigSetting("reloadBrowser")) {
@@ -398,6 +392,16 @@
}
}
+ if (firstSample) {
+ firstSample = false;
+ if (this.getConfigSetting("theme", false)) {
+ var chosenTheme = this.getConfigSetting("theme");
+ this.log("Switching theme to " + chosenTheme, "info");
+ this.qxClick('qxhv=*/qx.ui.toolbar.ToolBar/*/[@label=Theme]', "", "Clicking Theme button");
+ this.qxClick('qxhv=*/qx.ui.toolbar.ToolBar/*/[@label=Theme]/qx.ui.menu.Menu/[@label="' + chosenTheme + '"]', "", "Selecting theme " + chosenTheme);
+ }
+ }
+
if (this.currentCategory != finalCategory || (this.currentCategory == finalCategory && this.currentSample != finalSample) ) {
this.lastCategory = this.currentCategory;
this.lastSample = this.currentSample;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|