r62061 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62060‎ | r62061 | r62062 >
Date:09:51, 6 February 2010
Author:dale
Status:deferred
Tags:
Comment:
* initial selenium testing framework test set

* fix for appending "share" options
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/Player_Timed_Text.html (modified) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/_FULL_TEST_SET.html (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/amw-all-providers.html (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/audio-player-menu.html (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/audio-player-playback-progress.html (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/player-themable-display.html (added) (history)
  • /branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/player-timed-text.html (added) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/tests/Player_Timed_Text.html
@@ -34,10 +34,10 @@
3535 </td>
3636 </tr>
3737
38 -
 38+ <!--
3939 <tr>
4040 <td valign="top" width="410">
41 -
 41+
4242 <video style="width:544;height:304"
4343 poster="http://www.annodex.net/~silvia/itext/elephants_dream/elephant.png"
4444 duration="10:53"
@@ -224,7 +224,7 @@
225225 </textarea>
226226 </td>
227227 </tr>
228 -
 228+ -->
229229 <!--
230230
231231
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/audio-player-menu.html
@@ -0,0 +1,82 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<link rel="selenium.base" href="" />
 8+<title>audio-player-menu</title>
 9+</head>
 10+<body>
 11+<table cellpadding="1" cellspacing="1" border="1">
 12+<thead>
 13+<tr><td rowspan="1" colspan="3">audio-player-menu</td></tr>
 14+</thead><tbody>
 15+<tr>
 16+ <td>open</td>
 17+ <td>js/mwEmbed/tests/Player_Audio.html</td>
 18+ <td></td>
 19+</tr>
 20+<tr>
 21+ <td>waitForElementPresent</td>
 22+ <td>//div[@class='interface_wrap k-player']</td>
 23+ <td>9000</td>
 24+</tr>
 25+<tr>
 26+ <td>click</td>
 27+ <td>//span</td>
 28+ <td></td>
 29+</tr>
 30+<tr>
 31+ <td>waitForElementPresent</td>
 32+ <td>//div[@id=&quot;blackbg_v0&quot;]</td>
 33+ <td></td>
 34+</tr>
 35+<tr>
 36+ <td>click</td>
 37+ <td>link=Players</td>
 38+ <td></td>
 39+</tr>
 40+<tr>
 41+ <td>waitForElementPresent</td>
 42+ <td>//div[@class=&quot;menu-screen menu-playerSelect&quot;]</td>
 43+ <td></td>
 44+</tr>
 45+<tr>
 46+ <td>click</td>
 47+ <td>link=Download</td>
 48+ <td></td>
 49+</tr>
 50+<tr>
 51+ <td>waitForElementPresent</td>
 52+ <td>//div[@class=&quot;menu-screen menu-download&quot;]</td>
 53+ <td></td>
 54+</tr>
 55+<tr>
 56+ <td>click</td>
 57+ <td>link=Share</td>
 58+ <td></td>
 59+</tr>
 60+<tr>
 61+ <td>waitForElementPresent</td>
 62+ <td>//div[@class=&quot;menu-screen menu-share&quot;]</td>
 63+ <td></td>
 64+</tr>
 65+<tr>
 66+ <td>click</td>
 67+ <td>link=Credits</td>
 68+ <td></td>
 69+</tr>
 70+<tr>
 71+ <td>waitForElementPresent</td>
 72+ <td>//div[@class=&quot;menu-screen menu-credits&quot;]</td>
 73+ <td></td>
 74+</tr>
 75+<tr>
 76+ <td>click</td>
 77+ <td>//span</td>
 78+ <td></td>
 79+</tr>
 80+
 81+</tbody></table>
 82+</body>
 83+</html>
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/player-themable-display.html
@@ -0,0 +1,37 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<link rel="selenium.base" href="" />
 8+<title>player-themable-display</title>
 9+</head>
 10+<body>
 11+<table cellpadding="1" cellspacing="1" border="1">
 12+<thead>
 13+<tr><td rowspan="1" colspan="3">player-themable-display</td></tr>
 14+</thead><tbody>
 15+<tr>
 16+ <td>open</td>
 17+ <td>js/mwEmbed/tests/Player_Themable.html</td>
 18+ <td></td>
 19+</tr>
 20+<tr>
 21+ <td>waitForElementPresent</td>
 22+ <td>//div[@class=&quot;interface_wrap k-player&quot;]</td>
 23+ <td>9000</td>
 24+</tr>
 25+<tr>
 26+ <td>waitForElementPresent</td>
 27+ <td>//div[@class=&quot;interface_wrap mv-player&quot;]</td>
 28+ <td>9000</td>
 29+</tr>
 30+<tr>
 31+ <td>waitForElementPresent</td>
 32+ <td>//div[@class=&quot;ui-state-default play-btn-large&quot;]</td>
 33+ <td>9000</td>
 34+</tr>
 35+
 36+</tbody></table>
 37+</body>
 38+</html>
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/player-timed-text.html
@@ -0,0 +1,67 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<link rel="selenium.base" href="" />
 8+<title>player-timed-text</title>
 9+</head>
 10+<body>
 11+<table cellpadding="1" cellspacing="1" border="1">
 12+<thead>
 13+<tr><td rowspan="1" colspan="3">player-timed-text</td></tr>
 14+</thead><tbody>
 15+<tr>
 16+ <td>open</td>
 17+ <td>js/mwEmbed/tests/Player_Timed_Text.html</td>
 18+ <td></td>
 19+</tr>
 20+<tr>
 21+ <td>waitForElementPresent</td>
 22+ <td>//span[@class=&quot;ui-icon ui-icon-comment&quot;]</td>
 23+ <td>9000</td>
 24+</tr>
 25+<tr>
 26+ <td>click</td>
 27+ <td>//div[3]/span</td>
 28+ <td></td>
 29+</tr>
 30+<tr>
 31+ <td>waitForElementPresent</td>
 32+ <td>//li[@role=&quot;menuitem&quot;]</td>
 33+ <td>9000</td>
 34+</tr>
 35+<tr>
 36+ <td>click</td>
 37+ <td>link=Chose text</td>
 38+ <td></td>
 39+</tr>
 40+<tr>
 41+ <td>click</td>
 42+ <td>link=en, English</td>
 43+ <td></td>
 44+</tr>
 45+<tr>
 46+ <td>waitForElementPresent</td>
 47+ <td>//div[@class='itext itext_SUB']</td>
 48+ <td>9000</td>
 49+</tr>
 50+<tr>
 51+ <td>click</td>
 52+ <td>//span[@class='ui-icon ui-icon-play']</td>
 53+ <td></td>
 54+</tr>
 55+<tr>
 56+ <td>click</td>
 57+ <td>//td[1]/div/div[3]/span</td>
 58+ <td></td>
 59+</tr>
 60+<tr>
 61+ <td>waitForCondition</td>
 62+ <td>var value = selenium.getText(&quot;//div[@class='itext itext_SUB']&quot;); value == 'When I say user autonomy, what I\'m talking about';</td>
 63+ <td>20000</td>
 64+</tr>
 65+
 66+</tbody></table>
 67+</body>
 68+</html>
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/audio-player-playback-progress.html
@@ -0,0 +1,42 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<link rel="selenium.base" href="" />
 8+<title>audio-player-playback-progress</title>
 9+</head>
 10+<body>
 11+<table cellpadding="1" cellspacing="1" border="1">
 12+<thead>
 13+<tr><td rowspan="1" colspan="3">audio-player-playback-progress</td></tr>
 14+</thead><tbody>
 15+<tr>
 16+ <td>open</td>
 17+ <td>js/mwEmbed/tests/Player_Audio.html</td>
 18+ <td></td>
 19+</tr>
 20+<tr>
 21+ <td>waitForElementPresent</td>
 22+ <td>//div[@class='interface_wrap k-player']</td>
 23+ <td>9000</td>
 24+</tr>
 25+<tr>
 26+ <td>click</td>
 27+ <td>//div[2]/span</td>
 28+ <td></td>
 29+</tr>
 30+<tr>
 31+ <td>waitForElementPresent</td>
 32+ <td>//div[@class='ui-widget time-disp']</td>
 33+ <td>1000</td>
 34+</tr>
 35+<tr>
 36+ <td>waitForCondition</td>
 37+ <td>var value = selenium.getText(&quot;//div[@class='ui-widget time-disp']&quot;); value == '0:00:01'</td>
 38+ <td>9000</td>
 39+</tr>
 40+
 41+</tbody></table>
 42+</body>
 43+</html>
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/amw-all-providers.html
@@ -0,0 +1,112 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
 6+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 7+<link rel="selenium.base" href="http://localhost/js2-work/" />
 8+<title>amw-all-providers</title>
 9+</head>
 10+<body>
 11+<table cellpadding="1" cellspacing="1" border="1">
 12+<thead>
 13+<tr><td rowspan="1" colspan="3">amw-all-providers</td></tr>
 14+</thead><tbody>
 15+<tr>
 16+ <td>open</td>
 17+ <td>js/mwEmbed/tests/Add_Media_Wizard.html</td>
 18+ <td></td>
 19+</tr>
 20+<tr>
 21+ <td>click</td>
 22+ <td>add_media_link</td>
 23+ <td></td>
 24+</tr>
 25+<tr>
 26+ <td>waitForCondition</td>
 27+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'res_kaltura__0' )</td>
 28+ <td>9000</td>
 29+</tr>
 30+<tr>
 31+ <td>click</td>
 32+ <td>res_kaltura__0</td>
 33+ <td></td>
 34+</tr>
 35+<tr>
 36+ <td>click</td>
 37+ <td>//div[3]/a[1]/span[2]</td>
 38+ <td></td>
 39+</tr>
 40+<tr>
 41+ <td>click</td>
 42+ <td>add_media_link</td>
 43+ <td></td>
 44+</tr>
 45+<tr>
 46+ <td>click</td>
 47+ <td>//div[@id='rsd_media_filter']/div[2]</td>
 48+ <td></td>
 49+</tr>
 50+<tr>
 51+ <td>waitForCondition</td>
 52+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'rsd_media_filter' )</td>
 53+ <td>9000</td>
 54+</tr>
 55+<tr>
 56+ <td>click</td>
 57+ <td>rsd_media_filter_Media_movie</td>
 58+ <td></td>
 59+</tr>
 60+<tr>
 61+ <td>type</td>
 62+ <td>rsd_q</td>
 63+ <td>cats</td>
 64+</tr>
 65+<tr>
 66+ <td>click</td>
 67+ <td>//form[@id='rsd_form']/a/span[1]</td>
 68+ <td></td>
 69+</tr>
 70+<tr>
 71+ <td>click</td>
 72+ <td>//div[@name='wiki_commons']</td>
 73+ <td></td>
 74+</tr>
 75+<tr>
 76+ <td>waitForCondition</td>
 77+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'rsd_search_description' )</td>
 78+ <td>9000</td>
 79+</tr>
 80+<tr>
 81+ <td>click</td>
 82+ <td>//div[@name='archive_org']</td>
 83+ <td></td>
 84+</tr>
 85+<tr>
 86+ <td>waitForCondition</td>
 87+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'rsd_search_description' )</td>
 88+ <td>9000</td>
 89+</tr>
 90+<tr>
 91+ <td>click</td>
 92+ <td>//div[@name='flickr']</td>
 93+ <td></td>
 94+</tr>
 95+<tr>
 96+ <td>waitForCondition</td>
 97+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'rsd_search_description' )</td>
 98+ <td>9000</td>
 99+</tr>
 100+<tr>
 101+ <td>click</td>
 102+ <td>//div[@name='metavid']</td>
 103+ <td></td>
 104+</tr>
 105+<tr>
 106+ <td>waitForCondition</td>
 107+ <td>selenium.browserbot.getCurrentWindow().document.getElementById( 'rsd_search_description' )</td>
 108+ <td>9000</td>
 109+</tr>
 110+
 111+</tbody></table>
 112+</body>
 113+</html>
Index: branches/js2-work/phase3/js/mwEmbed/tests/selenium_tests/_FULL_TEST_SET.html
@@ -0,0 +1,18 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 4+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 5+<head>
 6+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
 7+ <title>Test Suite</title>
 8+</head>
 9+<body>
 10+<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
 11+<tr><td><b>Test Suite</b></td></tr>
 12+<tr><td><a href="amw-all-providers.html">amw-all-providers</a></td></tr>
 13+<tr><td><a href="audio-player-playback-progress.html">audio-player-playback-progress</a></td></tr>
 14+<tr><td><a href="audio-player-menu.html">audio-player-menu</a></td></tr>
 15+<tr><td><a href="player-themable-display.html">player-themable-display</a></td></tr>
 16+<tr><td><a href="player-timed-text.html">player-timed-text</a></td></tr>
 17+</tbody></table>
 18+</body>
 19+</html>
Index: branches/js2-work/phase3/js/mwEmbed/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -2350,7 +2350,7 @@
23512351 showShare:function( $target ) {
23522352 var embed_code = this.getEmbeddingHTML();
23532353 var _this = this;
2354 -
 2354+ $target.empty();
23552355 $shareList = $j( '<ul />' );
23562356
23572357 $shareList

Status & tagging log