r85077 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85076‎ | r85077 | r85078 >
Date:18:54, 31 March 2011
Author:papyromancer
Status:deferred
Tags:
Comment:
adding in player loading simple test
Modified paths:
  • /trunk/extensions/TimedMediaHandler/tests (added) (history)
  • /trunk/extensions/TimedMediaHandler/tests/EmbedPlayerLoadsTestCase.php (added) (history)
  • /trunk/extensions/TimedMediaHandler/tests/EmbedPlayerTestSuite.php (added) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/tests/EmbedPlayerTestSuite.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/*
 4+ * Sample test suite.
 5+ * Two ways to configure MW for these tests
 6+ * 1) If you are running multiple test suites, add the following in LocalSettings.php
 7+ * require_once("tests/selenium/SimpleSeleniumConfig.php");
 8+ * $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings';
 9+ * OR
 10+ * 2) Add the following to your Localsettings.php
 11+ * $wgDefaultSkin = 'chick';
 12+ */
 13+class EmbedPlayerTestSuite extends SeleniumTestSuite
 14+{
 15+ public function setUp() {
 16+ parent::setUp();
 17+ }
 18+ public function addTests() {
 19+ $testFiles = array(
 20+ 'extensions/TimedMediaHandler/tests/EmbedPlayerLoadsTestCase.php'
 21+ );
 22+ parent::addTestFiles( $testFiles );
 23+ }
 24+
 25+
 26+}
Index: trunk/extensions/TimedMediaHandler/tests/EmbedPlayerLoadsTestCase.php
@@ -0,0 +1,23 @@
 2+<?php
 3+/*
 4+ * This test case is part of the SimpleSeleniumTestSuite.
 5+ * Configuration for these tests are documented as part of SimpleSeleniumTestSuite.php
 6+ */
 7+class EmbedPlayerLoadsTestCase extends SeleniumTestCase {
 8+ public $name = "Embed Player Loading Test";
 9+
 10+ public function testBasic()
 11+ {
 12+ global $wgSeleniumTestsWikiUrl;
 13+ $this->open($wgSeleniumTestsWikiUrl.'/');
 14+
 15+ $this->waitForPageToLoad(10000);
 16+
 17+ $this->isElementPresent("//div[@class='mwplayer_interface k-player']", 10000);
 18+ $this->isElementPresent("//div[@class='mwplayer_interface mv-player']", 10000);
 19+ $this->isElementPresent("//div[@class='ui-state-default play-btn-large']", 10000);
 20+
 21+ }
 22+
 23+
 24+}

Status & tagging log