Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/EmbedValueWithShowParserFunction.php |
— | — | @@ -0,0 +1,65 @@ |
| 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 EmbedValueWithShowParserFunction extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/TC_Embed_value_with_show_parser_function"); |
| 13 | + $this->type("searchInput", "PleaseShowMyValues"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("10000"); |
| 16 | + $this->click("link=PleaseShowMyValues"); |
| 17 | + $this->waitForPageToLoad("10000"); |
| 18 | + $this->type("wpTextbox1", "[[EmbedThisValue::succesful]]\n[[EmbedThisValue::prosperous]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("10000"); |
| 21 | + } |
| 22 | + |
| 23 | + public function test01() |
| 24 | + { |
| 25 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 26 | + $this->type("searchInput", "EmbedValueToThisTestPage"); |
| 27 | + $this->click("searchGoButton"); |
| 28 | + $this->waitForPageToLoad("10000"); |
| 29 | + $this->click("link=EmbedValueToThisTestPage"); |
| 30 | + $this->waitForPageToLoad("10000"); |
| 31 | + $this->type("wpTextbox1", "{{#show: PleaseShowMyValues | ?EmbedThisValue}}"); |
| 32 | + $this->type("wpTextbox1", "This test was {{#show: PleaseShowMyValues | ?EmbedThisValue}}."); |
| 33 | + $this->click("wpSave"); |
| 34 | + $this->waitForPageToLoad("10000"); |
| 35 | + } |
| 36 | + |
| 37 | + public function test02() |
| 38 | + { |
| 39 | + $this->open($this->getUrl() ."index.php/EmbedValueToThisTestPage"); |
| 40 | + |
| 41 | + $this->assertTrue($this->isElementPresent("link=Succesful")); |
| 42 | + |
| 43 | + |
| 44 | + $this->assertTrue($this->isElementPresent("link=Prosperous")); |
| 45 | + |
| 46 | + } |
| 47 | + |
| 48 | + public function testTeardown() |
| 49 | + { |
| 50 | + $this->open($this->getUrl() ."index.php/EmbedValueToThisTestPage"); |
| 51 | + $this->click("//div[@id='p-cactions']/h5/a"); |
| 52 | + $this->click("link=Delete"); |
| 53 | + $this->waitForPageToLoad("10000"); |
| 54 | + $this->click("wpConfirmB"); |
| 55 | + $this->waitForPageToLoad("10000"); |
| 56 | + $this->type("searchInput", "PleaseShowMyValues"); |
| 57 | + $this->click("searchGoButton"); |
| 58 | + $this->waitForPageToLoad("10000"); |
| 59 | + $this->click("link=Delete"); |
| 60 | + $this->waitForPageToLoad("10000"); |
| 61 | + $this->click("wpConfirmB"); |
| 62 | + $this->waitForPageToLoad("10000"); |
| 63 | + $this->click("link=Main Page"); |
| 64 | + $this->waitForPageToLoad("10000"); |
| 65 | + } |
| 66 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/EmbedValueWithShowParserFunction.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 67 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 68 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshLinkForEveryPage.php |
— | — | @@ -0,0 +1,38 @@ |
| 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 RefreshLinkForEveryPage extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + ; |
| 13 | + } |
| 14 | + |
| 15 | + public function testTest() |
| 16 | + { |
| 17 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 18 | + $this->click("link=Random page"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + |
| 21 | + $this->assertTrue($this->isElementPresent("link=Refresh")); |
| 22 | + |
| 23 | + $this->click("link=Random page"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + |
| 26 | + $this->assertTrue($this->isElementPresent("link=Refresh")); |
| 27 | + |
| 28 | + $this->click("link=Random page"); |
| 29 | + $this->waitForPageToLoad("10000"); |
| 30 | + |
| 31 | + $this->assertTrue($this->isElementPresent("link=Refresh")); |
| 32 | + |
| 33 | + } |
| 34 | + |
| 35 | + public function testTeardown() |
| 36 | + { |
| 37 | + ; |
| 38 | + } |
| 39 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshLinkForEveryPage.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 40 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 41 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CopyQuerySyntaxFromSpecialAsk.php |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class CopyQuerySyntaxFromSpecialAsk extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 17 | + $this->type("q", "[["); |
| 18 | + $this->type("q", "[[We want::to test]]\n[[The query::syntax]]\n[[Category:Test case]]"); |
| 19 | + $this->type("add_property", "?Question\n?Mark"); |
| 20 | + $this->click("link=[Add sorting condition]"); |
| 21 | + $this->type("sort[0]", "?Mark"); |
| 22 | + $this->select("formatSelector", "label=Table"); |
| 23 | + $this->type("p[limit]", "50"); |
| 24 | + $this->select("p[headers]", "label=show"); |
| 25 | + $this->type("p[mainlabel]", "Test table"); |
| 26 | + $this->type("p[default]", "Test default"); |
| 27 | + $this->click("//input[@value='Find results']"); |
| 28 | + $this->waitForPageToLoad("10000"); |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * Each of these methods... |
| 33 | + * * should have one assertion. |
| 34 | + * * should start with test, e.g., testTest(). |
| 35 | + */ |
| 36 | + public function testTest() |
| 37 | + { |
| 38 | + $this->click("link=Show embed code"); |
| 39 | + |
| 40 | + $this->assertTrue($this->isTextPresent("exact:{{#ask:[[We want::to test]] [[The query::syntax]] [[Category:Test case]] |?Question |?Mark |format=broadtable |limit=50 |headers=show |mainlabel=Test table |link=all |default=Test default |order=ASC |sort=?Mark |offset=0 }}")); |
| 41 | + |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * Done at the end to purge the test data. |
| 46 | + */ |
| 47 | + public function testTeardown() |
| 48 | + { |
| 49 | + $this->click("//div[@id='p-logo']/a"); |
| 50 | + $this->waitForPageToLoad("10000"); |
| 51 | + } |
| 52 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CopyQuerySyntaxFromSpecialAsk.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 53 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 54 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyValue.php |
— | — | @@ -0,0 +1,82 @@ |
| 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 SelectPagesByPropertyValue extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "TestPageABCDEF"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("10000"); |
| 16 | + $this->click("link=TestPageABCDEF"); |
| 17 | + $this->waitForPageToLoad("10000"); |
| 18 | + $this->type("wpTextbox1", "[[ThreeLetters::ABC]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("10000"); |
| 21 | + $this->type("searchInput", "TestPageCDEFGH"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("10000"); |
| 24 | + $this->click("link=TestPageCDEFGH"); |
| 25 | + $this->waitForPageToLoad("10000"); |
| 26 | + $this->type("wpTextbox1", "[[ThreeLetters::ABC]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("10000"); |
| 29 | + $this->type("searchInput", "TestPageEFGHIJ"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("10000"); |
| 32 | + $this->click("link=TestPageEFGHIJ"); |
| 33 | + $this->waitForPageToLoad("10000"); |
| 34 | + $this->type("wpTextbox1", "[[ThreeLetters::GHI]]"); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("10000"); |
| 37 | + } |
| 38 | + |
| 39 | + public function testTest() |
| 40 | + { |
| 41 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 42 | + $this->type("q", "[[ThreeLetters::ABC]]"); |
| 43 | + $this->click("//input[@value='Find results']"); |
| 44 | + $this->waitForPageToLoad("10000"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isTextPresent("TestPageABCDEF")); |
| 47 | + |
| 48 | + |
| 49 | + $this->assertTrue($this->isTextPresent("TestPageCDEFGH")); |
| 50 | + |
| 51 | + |
| 52 | + $this->assertFalse($this->isTextPresent("TestPageEFGHIJ")); |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + public function testTeardown() |
| 57 | + { |
| 58 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 59 | + $this->type("searchInput", "TestPageABCDEF"); |
| 60 | + $this->click("searchGoButton"); |
| 61 | + $this->waitForPageToLoad("10000"); |
| 62 | + $this->click("link=Delete"); |
| 63 | + $this->waitForPageToLoad("10000"); |
| 64 | + $this->click("wpConfirmB"); |
| 65 | + $this->waitForPageToLoad("10000"); |
| 66 | + $this->type("searchInput", "TestPageCDEFGH"); |
| 67 | + $this->click("searchGoButton"); |
| 68 | + $this->waitForPageToLoad("10000"); |
| 69 | + $this->click("link=Delete"); |
| 70 | + $this->waitForPageToLoad("10000"); |
| 71 | + $this->click("wpConfirmB"); |
| 72 | + $this->waitForPageToLoad("10000"); |
| 73 | + $this->type("searchInput", "TestPageEFGHIJ"); |
| 74 | + $this->click("searchGoButton"); |
| 75 | + $this->waitForPageToLoad("10000"); |
| 76 | + $this->click("link=Delete"); |
| 77 | + $this->waitForPageToLoad("10000"); |
| 78 | + $this->click("wpConfirmB"); |
| 79 | + $this->waitForPageToLoad("10000"); |
| 80 | + $this->click("link=Main Page"); |
| 81 | + $this->waitForPageToLoad("10000"); |
| 82 | + } |
| 83 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyValue.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 84 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 85 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyAnnotationByWildcard.php |
— | — | @@ -0,0 +1,82 @@ |
| 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 SelectPagesByPropertyAnnotationByWildcard extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "TestPageABCDEF"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("10000"); |
| 16 | + $this->click("link=TestPageABCDEF"); |
| 17 | + $this->waitForPageToLoad("10000"); |
| 18 | + $this->type("wpTextbox1", "[[ThreeLetters::ABC]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("10000"); |
| 21 | + $this->type("searchInput", "TestPageCDEFGH"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("10000"); |
| 24 | + $this->click("link=TestPageCDEFGH"); |
| 25 | + $this->waitForPageToLoad("10000"); |
| 26 | + $this->type("wpTextbox1", "[[ThreeLetters::DEF]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("10000"); |
| 29 | + $this->type("searchInput", "TestPageEFGHIJ"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("10000"); |
| 32 | + $this->click("link=TestPageEFGHIJ"); |
| 33 | + $this->waitForPageToLoad("10000"); |
| 34 | + $this->type("wpTextbox1", "[[ThreeLetters::GHI]]"); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("10000"); |
| 37 | + } |
| 38 | + |
| 39 | + public function testTest() |
| 40 | + { |
| 41 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 42 | + $this->type("q", "[[ThreeLetters::+]]"); |
| 43 | + $this->click("//input[@value='Find results']"); |
| 44 | + $this->waitForPageToLoad("10000"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isTextPresent("TestPageABCDEF")); |
| 47 | + |
| 48 | + |
| 49 | + $this->assertTrue($this->isTextPresent("TestPageCDEFGH")); |
| 50 | + |
| 51 | + |
| 52 | + $this->assertTrue($this->isTextPresent("TestPageEFGHIJ")); |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + public function testTeardown() |
| 57 | + { |
| 58 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 59 | + $this->type("searchInput", "TestPageABCDEF"); |
| 60 | + $this->click("searchGoButton"); |
| 61 | + $this->waitForPageToLoad("10000"); |
| 62 | + $this->click("link=Delete"); |
| 63 | + $this->waitForPageToLoad("10000"); |
| 64 | + $this->click("wpConfirmB"); |
| 65 | + $this->waitForPageToLoad("10000"); |
| 66 | + $this->type("searchInput", "TestPageCDEFGH"); |
| 67 | + $this->click("searchGoButton"); |
| 68 | + $this->waitForPageToLoad("10000"); |
| 69 | + $this->click("link=Delete"); |
| 70 | + $this->waitForPageToLoad("10000"); |
| 71 | + $this->click("wpConfirmB"); |
| 72 | + $this->waitForPageToLoad("10000"); |
| 73 | + $this->type("searchInput", "TestPageEFGHIJ"); |
| 74 | + $this->click("searchGoButton"); |
| 75 | + $this->waitForPageToLoad("10000"); |
| 76 | + $this->click("link=Delete"); |
| 77 | + $this->waitForPageToLoad("10000"); |
| 78 | + $this->click("wpConfirmB"); |
| 79 | + $this->waitForPageToLoad("10000"); |
| 80 | + $this->click("link=Main Page"); |
| 81 | + $this->waitForPageToLoad("10000"); |
| 82 | + } |
| 83 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyAnnotationByWildcard.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 84 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 85 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuiltInTypeString.php |
— | — | @@ -0,0 +1,70 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class BuiltInTypeString extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open("/bka/SeleniumSMW_AUT/SeleniumSMW/index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "ABoldString"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=ABoldString"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[TestAnyString::This is a longer text with some '''bold''' characters| ]] __SHOWFACTBOX__"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + |
| 26 | + $this->assertTrue($this->isElementPresent("link=This is a longer text with some bold characters")); |
| 27 | + |
| 28 | + $this->click("link=TestAnyString"); |
| 29 | + $this->waitForPageToLoad("10000"); |
| 30 | + $this->type("wpTextbox1", "[[Has type::String]]"); |
| 31 | + $this->click("wpSave"); |
| 32 | + $this->waitForPageToLoad("10000"); |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * Each of these methods... |
| 37 | + * * should have one assertion. |
| 38 | + * * should start with test, e.g., testTest(). |
| 39 | + */ |
| 40 | + public function testTest() |
| 41 | + { |
| 42 | + $this->open("/bka/SeleniumSMW_AUT/SeleniumSMW/index.php/ABoldString"); |
| 43 | + |
| 44 | + $this->assertTrue($this->isTextPresent("This is a longer text with some bold characters")); |
| 45 | + |
| 46 | + |
| 47 | + $this->assertFalse($this->isElementPresent("link=This is a longer text with some bold characters")); |
| 48 | + |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * Done at the end to purge the test data. |
| 53 | + */ |
| 54 | + public function testTeardown() |
| 55 | + { |
| 56 | + $this->open("/bka/SeleniumSMW_AUT/SeleniumSMW/index.php/ABoldString"); |
| 57 | + $this->click("link=Delete"); |
| 58 | + $this->waitForPageToLoad("10000"); |
| 59 | + $this->click("wpConfirmB"); |
| 60 | + $this->waitForPageToLoad("10000"); |
| 61 | + $this->type("searchInput", "Property:TestAnyString"); |
| 62 | + $this->click("searchGoButton"); |
| 63 | + $this->waitForPageToLoad("10000"); |
| 64 | + $this->click("link=Delete"); |
| 65 | + $this->waitForPageToLoad("10000"); |
| 66 | + $this->click("wpConfirmB"); |
| 67 | + $this->waitForPageToLoad("10000"); |
| 68 | + $this->click("link=Main Page"); |
| 69 | + $this->waitForPageToLoad("10000"); |
| 70 | + } |
| 71 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuiltInTypeString.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 72 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 73 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildInTypeNumber.php |
— | — | @@ -0,0 +1,100 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class BuildInTypeNumber extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "Property:AnyNewNumber"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=exact:Property:AnyNewNumber"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[Has type::Number]]"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + $this->type("searchInput", "TestAnyNewNumber1"); |
| 26 | + $this->click("searchGoButton"); |
| 27 | + $this->waitForPageToLoad("10000"); |
| 28 | + $this->click("link=TestAnyNewNumber1"); |
| 29 | + $this->waitForPageToLoad("10000"); |
| 30 | + $this->type("wpTextbox1", "[[AnyNewNumber::445000]] __SHOWFACTBOX__"); |
| 31 | + $this->click("wpSave"); |
| 32 | + $this->waitForPageToLoad("10000"); |
| 33 | + $this->type("searchInput", "TestAnyNewNumber2"); |
| 34 | + $this->click("searchGoButton"); |
| 35 | + $this->waitForPageToLoad("10000"); |
| 36 | + $this->click("link=TestAnyNewNumber2"); |
| 37 | + $this->waitForPageToLoad("10000"); |
| 38 | + $this->type("wpTextbox1", "[[AnyNewNumber::445 000]] __SHOWFACTBOX__"); |
| 39 | + $this->click("wpSave"); |
| 40 | + $this->waitForPageToLoad("10000"); |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * Each of these methods... |
| 45 | + * * should have one assertion. |
| 46 | + * * should start with test, e.g., testTest(). |
| 47 | + */ |
| 48 | + public function test01() |
| 49 | + { |
| 50 | + $this->open($this->getUrl() ."index.php/TestAnyNewNumber2"); |
| 51 | + |
| 52 | + $this->assertTrue($this->isTextPresent("445,000")); |
| 53 | + |
| 54 | + $this->open($this->getUrl() ."index.php/TestAnyNewNumber1"); |
| 55 | + |
| 56 | + $this->assertTrue($this->isTextPresent("445,000")); |
| 57 | + |
| 58 | + } |
| 59 | + |
| 60 | + public function test02() |
| 61 | + { |
| 62 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 63 | + $this->type("q", "[[AnyNewNumber::445,000]]"); |
| 64 | + $this->click("//input[@value='Find results']"); |
| 65 | + $this->waitForPageToLoad("10000"); |
| 66 | + |
| 67 | + $this->assertTrue($this->isElementPresent("link=TestAnyNewNumber1")); |
| 68 | + |
| 69 | + |
| 70 | + $this->assertTrue($this->isElementPresent("link=TestAnyNewNumber2")); |
| 71 | + |
| 72 | + } |
| 73 | + |
| 74 | + /** |
| 75 | + * Done at the end to purge the test data. |
| 76 | + */ |
| 77 | + public function testTeardown() |
| 78 | + { |
| 79 | + $this->open($this->getUrl() ."index.php/TestAnyNewNumber1"); |
| 80 | + $this->click("link=Delete"); |
| 81 | + $this->waitForPageToLoad("10000"); |
| 82 | + $this->click("wpConfirmB"); |
| 83 | + $this->waitForPageToLoad("10000"); |
| 84 | + $this->type("searchInput", "TestAnyNewNumber2"); |
| 85 | + $this->click("searchGoButton"); |
| 86 | + $this->waitForPageToLoad("10000"); |
| 87 | + $this->click("link=Delete"); |
| 88 | + $this->waitForPageToLoad("10000"); |
| 89 | + $this->click("wpConfirmB"); |
| 90 | + $this->waitForPageToLoad("10000"); |
| 91 | + $this->type("searchInput", "Property:AnyNewNumber"); |
| 92 | + $this->click("searchGoButton"); |
| 93 | + $this->waitForPageToLoad("10000"); |
| 94 | + $this->click("link=Delete"); |
| 95 | + $this->waitForPageToLoad("10000"); |
| 96 | + $this->click("wpConfirmB"); |
| 97 | + $this->waitForPageToLoad("10000"); |
| 98 | + $this->click("link=Main Page"); |
| 99 | + $this->waitForPageToLoad("10000"); |
| 100 | + } |
| 101 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildInTypeNumber.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 102 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 103 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CreatePropertyPageTestCase.php |
— | — | @@ -0,0 +1,87 @@ |
| 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 CreatePropertyPageTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:Create1"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:Create1"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "This is a test property."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "CreateTest"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=CreateTest"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[Create1::Yes]]\n[[Create2::Yes]]\n__SHOWFACTBOX__"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function test_checkfactbox_CreatePropertyPage() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/CreateTest"); |
| 34 | + |
| 35 | + $this->assertTrue($this->isElementPresent("link=Create1")); |
| 36 | + |
| 37 | + |
| 38 | + $this->assertTrue($this->isElementPresent("link=Create2")); |
| 39 | + |
| 40 | + } |
| 41 | + |
| 42 | + public function test_checkpropertypages_CreatePropertyPage() |
| 43 | + { |
| 44 | + $this->open($this->getUrl() ."index.php/Property:Create1"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isElementPresent("link=CreateTest")); |
| 47 | + |
| 48 | + $this->open($this->getUrl() ."index.php/Property:Create2"); |
| 49 | + |
| 50 | + $this->assertTrue($this->isElementPresent("link=CreateTest")); |
| 51 | + |
| 52 | + } |
| 53 | + |
| 54 | + public function test_redlink_CreatePropertyPage() |
| 55 | + { |
| 56 | + $this->open($this->getUrl() ."index.php/CreateTest"); |
| 57 | + $this->click("link=Create2"); |
| 58 | + $this->waitForPageToLoad("30000"); |
| 59 | + $this->type("wpTextbox1", "This is also a test property."); |
| 60 | + $this->click("wpSave"); |
| 61 | + $this->waitForPageToLoad("30000"); |
| 62 | + } |
| 63 | + |
| 64 | + public function testTeardown() |
| 65 | + { |
| 66 | + $this->open($this->getUrl() ."index.php/Property:Create1"); |
| 67 | + $this->click("link=Delete"); |
| 68 | + $this->waitForPageToLoad("30000"); |
| 69 | + $this->click("wpConfirmB"); |
| 70 | + $this->waitForPageToLoad("30000"); |
| 71 | + $this->type("searchInput", "Property:Create2"); |
| 72 | + $this->click("searchGoButton"); |
| 73 | + $this->waitForPageToLoad("30000"); |
| 74 | + $this->click("link=Delete"); |
| 75 | + $this->waitForPageToLoad("30000"); |
| 76 | + $this->click("wpConfirmB"); |
| 77 | + $this->waitForPageToLoad("30000"); |
| 78 | + $this->type("searchInput", "CreateTest"); |
| 79 | + $this->click("searchGoButton"); |
| 80 | + $this->waitForPageToLoad("30000"); |
| 81 | + $this->click("link=Delete"); |
| 82 | + $this->waitForPageToLoad("30000"); |
| 83 | + $this->click("wpConfirmB"); |
| 84 | + $this->waitForPageToLoad("30000"); |
| 85 | + $this->click("//div[@id='p-logo']/a"); |
| 86 | + $this->waitForPageToLoad("30000"); |
| 87 | + } |
| 88 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CreatePropertyPageTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 89 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 90 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SpecialAskProvidesGUIForQueries.php |
— | — | @@ -0,0 +1,60 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class SpecialAskProvidesGUIForQueries extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + ; |
| 17 | + } |
| 18 | + |
| 19 | + /** |
| 20 | + * Each of these methods... |
| 21 | + * * should have one assertion. |
| 22 | + * * should start with test, e.g., testTest(). |
| 23 | + */ |
| 24 | + public function testTest() |
| 25 | + { |
| 26 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 27 | + |
| 28 | + $this->assertEquals("Semantic search", $this->getTitle()); |
| 29 | + |
| 30 | + } |
| 31 | + |
| 32 | + public function testTest2() |
| 33 | + { |
| 34 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 35 | + |
| 36 | + $this->assertTrue($this->isElementPresent("q")); |
| 37 | + |
| 38 | + |
| 39 | + $this->assertTrue($this->isElementPresent("add_property")); |
| 40 | + |
| 41 | + |
| 42 | + $this->assertTrue($this->isElementPresent("link=[Add sorting condition]")); |
| 43 | + |
| 44 | + $this->select("formatSelector", "label=Enumeration"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isElementPresent("//div[@id='other_options']/div[2]")); |
| 47 | + |
| 48 | + $this->click("//input[@value='Find results']"); |
| 49 | + $this->waitForPageToLoad("10000"); |
| 50 | + $this->click("//div[@id='p-logo']/a"); |
| 51 | + $this->waitForPageToLoad("10000"); |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * Done at the end to purge the test data. |
| 56 | + */ |
| 57 | + public function testTeardown() |
| 58 | + { |
| 59 | + ; |
| 60 | + } |
| 61 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SpecialAskProvidesGUIForQueries.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 62 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 63 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/MakePropertySubpropertyOfAnotherOneTestCase.php |
— | — | @@ -0,0 +1,99 @@ |
| 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 MakePropertySubpropertyOfAnotherOneTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:TeamMemberTest"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:TeamMemberTest"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "This describes team members of a project."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "Property:TeamLeaderTest"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=exact:Property:TeamLeaderTest"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[subproperty of::Property:TeamMemberTest]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + $this->type("searchInput", "Chris"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("30000"); |
| 32 | + $this->click("link=Chris"); |
| 33 | + $this->waitForPageToLoad("30000"); |
| 34 | + $this->type("wpTextbox1", "[[TeamMemberTest::Subproperty Project]]"); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + $this->type("searchInput", "Ben"); |
| 38 | + $this->click("searchGoButton"); |
| 39 | + $this->waitForPageToLoad("30000"); |
| 40 | + $this->click("link=Ben"); |
| 41 | + $this->waitForPageToLoad("30000"); |
| 42 | + $this->type("wpTextbox1", "[[TeamLeaderTest::Subproperty Project]]\n__SHOWFACTBOX__"); |
| 43 | + $this->click("wpSave"); |
| 44 | + $this->waitForPageToLoad("30000"); |
| 45 | + } |
| 46 | + |
| 47 | + public function test_factbox_MakePropertySubpropertyOfAnotherOne() |
| 48 | + { |
| 49 | + $this->open($this->getUrl() ."index.php/Ben"); |
| 50 | + |
| 51 | + $this->assertTrue($this->isElementPresent("link=TeamLeaderTest")); |
| 52 | + |
| 53 | + |
| 54 | + $this->assertFalse($this->isElementPresent("link=TeamMemberTest")); |
| 55 | + |
| 56 | + } |
| 57 | + |
| 58 | + public function test_semanticsearch_MakePropertySubpropertyOfAnotherOne() |
| 59 | + { |
| 60 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 61 | + $this->type("q", "[[TeamMemberTest::Subproperty Project]]"); |
| 62 | + $this->click("//input[@value='Find results']"); |
| 63 | + $this->waitForPageToLoad("30000"); |
| 64 | + |
| 65 | + $this->assertTrue($this->isElementPresent("link=Ben")); |
| 66 | + |
| 67 | + } |
| 68 | + |
| 69 | + public function testTeardown() |
| 70 | + { |
| 71 | + $this->open($this->getUrl() ."index.php/Ben"); |
| 72 | + $this->click("link=Delete"); |
| 73 | + $this->waitForPageToLoad("30000"); |
| 74 | + $this->click("wpConfirmB"); |
| 75 | + $this->waitForPageToLoad("30000"); |
| 76 | + $this->type("searchInput", "Chris"); |
| 77 | + $this->click("searchGoButton"); |
| 78 | + $this->waitForPageToLoad("30000"); |
| 79 | + $this->click("link=Delete"); |
| 80 | + $this->waitForPageToLoad("30000"); |
| 81 | + $this->click("wpConfirmB"); |
| 82 | + $this->waitForPageToLoad("30000"); |
| 83 | + $this->type("searchInput", "Property:TeamLeaderTest"); |
| 84 | + $this->click("searchGoButton"); |
| 85 | + $this->waitForPageToLoad("30000"); |
| 86 | + $this->click("link=Delete"); |
| 87 | + $this->waitForPageToLoad("30000"); |
| 88 | + $this->click("wpConfirmB"); |
| 89 | + $this->waitForPageToLoad("30000"); |
| 90 | + $this->type("searchInput", "Property:TeamMemberTest"); |
| 91 | + $this->click("searchGoButton"); |
| 92 | + $this->waitForPageToLoad("30000"); |
| 93 | + $this->click("link=Delete"); |
| 94 | + $this->waitForPageToLoad("30000"); |
| 95 | + $this->click("wpConfirmB"); |
| 96 | + $this->waitForPageToLoad("30000"); |
| 97 | + $this->click("link=Main Page"); |
| 98 | + $this->waitForPageToLoad("30000"); |
| 99 | + } |
| 100 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/MakePropertySubpropertyOfAnotherOneTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 101 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 102 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/UnusedPropertiesOnSpecialPageTestCase.php |
— | — | @@ -0,0 +1,65 @@ |
| 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 UnusedPropertiesOnSpecialPageTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:NoPageWillUseMe"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:NoPageWillUseMe"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "This is a test property..."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "UseProp"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=UseProp"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[NoPageWillUseMe::Not right]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function test_propertyused_UnusedPropertiesOnSpecialPage() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/Special:UnusedProperties"); |
| 34 | + |
| 35 | + $this->assertFalse($this->isElementPresent("link=NoPageWillUseMe")); |
| 36 | + |
| 37 | + } |
| 38 | + |
| 39 | + public function test_propertynotused_UnusedPropertiesOnSpecialPage() |
| 40 | + { |
| 41 | + $this->type("searchInput", "UseProp"); |
| 42 | + $this->click("searchGoButton"); |
| 43 | + $this->waitForPageToLoad("30000"); |
| 44 | + $this->click("link=Delete"); |
| 45 | + $this->waitForPageToLoad("30000"); |
| 46 | + $this->click("wpConfirmB"); |
| 47 | + $this->waitForPageToLoad("30000"); |
| 48 | + $this->open($this->getUrl() ."index.php/Special:UnusedProperties"); |
| 49 | + |
| 50 | + $this->assertTrue($this->isElementPresent("link=NoPageWillUseMe")); |
| 51 | + |
| 52 | + } |
| 53 | + |
| 54 | + public function testTeardown() |
| 55 | + { |
| 56 | + $this->open($this->getUrl() ."index.php/Special:UnusedProperties"); |
| 57 | + $this->click("link=NoPageWillUseMe"); |
| 58 | + $this->waitForPageToLoad("30000"); |
| 59 | + $this->click("link=Delete"); |
| 60 | + $this->waitForPageToLoad("30000"); |
| 61 | + $this->click("wpConfirmB"); |
| 62 | + $this->waitForPageToLoad("30000"); |
| 63 | + $this->click("link=Main Page"); |
| 64 | + $this->waitForPageToLoad("30000"); |
| 65 | + } |
| 66 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/UnusedPropertiesOnSpecialPageTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 67 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 68 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AnnotatePageWithProperty.php |
— | — | @@ -0,0 +1,192 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class AnnotatePageWithProperty extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "TestPerson Judith Silver"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=TestPerson Judith Silver"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "Some text for Judith. __SHOWFACTBOX__"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + } |
| 26 | + |
| 27 | + /** |
| 28 | + * Each of these methods... |
| 29 | + * * should have one assertion. |
| 30 | + * * should start with test, e.g., testTest(). |
| 31 | + */ |
| 32 | + public function testTest() |
| 33 | + { |
| 34 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 35 | + $this->click("link=Edit"); |
| 36 | + $this->waitForPageToLoad("10000"); |
| 37 | + $this->type("wpTextbox1", "Some text for Judith. __SHOWFACTBOX__\n[[Favored drink::Martini]]"); |
| 38 | + $this->click("wpSave"); |
| 39 | + $this->waitForPageToLoad("10000"); |
| 40 | + |
| 41 | + $this->assertTrue($this->isElementPresent("link=Favored drink")); |
| 42 | + |
| 43 | + |
| 44 | + $this->assertTrue($this->isElementPresent("//div[@id='mw-data-after-content']/div/table/tbody/tr/td[2]/a")); |
| 45 | + |
| 46 | + $this->click("link=Edit"); |
| 47 | + $this->waitForPageToLoad("10000"); |
| 48 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]"); |
| 49 | + $this->click("wpSave"); |
| 50 | + $this->waitForPageToLoad("10000"); |
| 51 | + |
| 52 | + $this->assertTrue($this->isElementPresent("link=Martini")); |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + public function testTest02() { |
| 57 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 58 | + $this->click("link=Edit"); |
| 59 | + $this->waitForPageToLoad("10000"); |
| 60 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}"); |
| 61 | + $this->click("wpSave"); |
| 62 | + $this->waitForPageToLoad("10000"); |
| 63 | + |
| 64 | + $this->assertFalse($this->isTextPresent("pizza")); |
| 65 | + |
| 66 | + |
| 67 | + $this->assertFalse($this->isTextPresent("Funghi")); |
| 68 | + |
| 69 | + |
| 70 | + $this->assertFalse($this->isTextPresent("pasta")); |
| 71 | + |
| 72 | + |
| 73 | + $this->assertFalse($this->isTextPresent("Aglio e Oglio")); |
| 74 | + |
| 75 | + $this->click("link=Edit"); |
| 76 | + $this->waitForPageToLoad("10000"); |
| 77 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n__SHOWFACTBOX__"); |
| 78 | + $this->click("wpSave"); |
| 79 | + $this->waitForPageToLoad("10000"); |
| 80 | + |
| 81 | + $this->assertTrue($this->isElementPresent("link=Favored pasta")); |
| 82 | + |
| 83 | + |
| 84 | + $this->assertTrue($this->isElementPresent("link=Favored pizza")); |
| 85 | + |
| 86 | + |
| 87 | + $this->assertTrue($this->isElementPresent("link=Aglio e Oglio")); |
| 88 | + |
| 89 | + |
| 90 | + $this->assertTrue($this->isElementPresent("link=Funghi")); |
| 91 | + |
| 92 | + } |
| 93 | + |
| 94 | + public function testTest03() { |
| 95 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 96 | + $this->click("link=Edit"); |
| 97 | + $this->waitForPageToLoad("10000"); |
| 98 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n__SHOWFACTBOX__\n[[Is child of::Margareth Silver|Maggie Silver]]"); |
| 99 | + $this->click("wpSave"); |
| 100 | + $this->waitForPageToLoad("10000"); |
| 101 | + |
| 102 | + $this->assertTrue($this->isElementPresent("link=Maggie Silver")); |
| 103 | + |
| 104 | + |
| 105 | + $this->assertTrue($this->isElementPresent("link=Margareth Silver")); |
| 106 | + |
| 107 | + $this->click("link=Edit"); |
| 108 | + $this->waitForPageToLoad("10000"); |
| 109 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n[[Is child of::Margareth Silver|Maggie Silver]]"); |
| 110 | + $this->click("wpSave"); |
| 111 | + $this->waitForPageToLoad("10000"); |
| 112 | + |
| 113 | + $this->assertTrue($this->isElementPresent("link=Maggie Silver")); |
| 114 | + |
| 115 | + |
| 116 | + $this->assertFalse($this->isElementPresent("link=Margareth Silver")); |
| 117 | + |
| 118 | + } |
| 119 | + |
| 120 | + public function testTest04() { |
| 121 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 122 | + $this->click("link=Edit"); |
| 123 | + $this->waitForPageToLoad("10000"); |
| 124 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n[[Is child of::Margareth Silver|Maggie Silver]]\n[[Is working for::Drives car from::Toyota]]"); |
| 125 | + $this->click("wpSave"); |
| 126 | + $this->waitForPageToLoad("10000"); |
| 127 | + try { |
| 128 | + $this->assertTrue($this->isElementPresent("link=Toyota")); |
| 129 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 130 | + //array_push($this->verificationErrors, $e->toString()); |
| 131 | + } |
| 132 | + try { |
| 133 | + $this->assertFalse($this->isElementPresent("link=Drives car from")); |
| 134 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 135 | + //array_push($this->verificationErrors, $e->toString()); |
| 136 | + } |
| 137 | + try { |
| 138 | + $this->assertFalse($this->isElementPresent("link=Is working for")); |
| 139 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 140 | + //array_push($this->verificationErrors, $e->toString()); |
| 141 | + } |
| 142 | + $this->click("link=Edit"); |
| 143 | + $this->waitForPageToLoad("10000"); |
| 144 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n[[Is child of::Margareth Silver|Maggie Silver]]\n[[Is working for::Drives car from::Toyota]]\n__SHOWFACTBOX__"); |
| 145 | + $this->click("wpSave"); |
| 146 | + $this->waitForPageToLoad("10000"); |
| 147 | + try { |
| 148 | + $this->assertTrue($this->isElementPresent("link=Drives car from")); |
| 149 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 150 | + //array_push($this->verificationErrors, $e->toString()); |
| 151 | + } |
| 152 | + try { |
| 153 | + $this->assertTrue($this->isElementPresent("link=Is working for")); |
| 154 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 155 | + //array_push($this->verificationErrors, $e->toString()); |
| 156 | + } |
| 157 | + } |
| 158 | + |
| 159 | + public function testTest05() { |
| 160 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 161 | + $this->click("link=Edit"); |
| 162 | + $this->waitForPageToLoad("10000"); |
| 163 | + $this->type("wpTextbox1", "Some text for Judith. \n[[Favored drink::Martini]]\n{{#set:Favored pizza=Funghi|Favored pasta=Aglio e Oglio}}\n[[Is child of::Margareth Silver|Maggie Silver]]\n[[Is working for::Drives car from::Toyota]]\n__SHOWFACTBOX__\n[[Lives together with::Jeremy Green-White]] [[Lives together with::Julia Pink-Red]]"); |
| 164 | + $this->click("wpSave"); |
| 165 | + $this->waitForPageToLoad("10000"); |
| 166 | + |
| 167 | + $this->assertTrue($this->isElementPresent("link=Lives together with")); |
| 168 | + |
| 169 | + |
| 170 | + $this->assertTrue($this->isElementPresent("//div[@id='mw-data-after-content']/div/table/tbody/tr[7]/td[2]/a[1]")); |
| 171 | + |
| 172 | + |
| 173 | + $this->assertTrue($this->isElementPresent("//div[@id='mw-data-after-content']/div/table/tbody/tr[7]/td[2]/a[2]")); |
| 174 | + |
| 175 | + |
| 176 | + $this->assertTrue($this->isTextPresent("and")); |
| 177 | + |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * Done at the end to purge the test data. |
| 182 | + */ |
| 183 | + public function testTeardown() |
| 184 | + { |
| 185 | + $this->open($this->getUrl() ."index.php/TestPerson_Judith_Silver"); |
| 186 | + $this->click("link=Delete"); |
| 187 | + $this->waitForPageToLoad("10000"); |
| 188 | + $this->click("wpConfirmB"); |
| 189 | + $this->waitForPageToLoad("10000"); |
| 190 | + $this->click("link=Main Page"); |
| 191 | + $this->waitForPageToLoad("10000"); |
| 192 | + } |
| 193 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AnnotatePageWithProperty.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 194 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 195 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithNumericValueTestCase.php |
— | — | @@ -0,0 +1,107 @@ |
| 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 SearchByPropertyWithNumericValueTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:NumericTest"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:NumericTest"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[Has type::Number]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "NumericTestPage1"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=NumericTestPage1"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[NumericTest::123]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + $this->type("searchInput", "NumericTestPage2"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("30000"); |
| 32 | + $this->click("link=NumericTestPage2"); |
| 33 | + $this->waitForPageToLoad("30000"); |
| 34 | + $this->type("wpTextbox1", "[[NumericTest::234]]"); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + $this->type("searchInput", "NumericTestPage3"); |
| 38 | + $this->click("searchGoButton"); |
| 39 | + $this->waitForPageToLoad("30000"); |
| 40 | + $this->click("link=NumericTestPage3"); |
| 41 | + $this->waitForPageToLoad("30000"); |
| 42 | + $this->type("wpTextbox1", "[[NumericTest::345]]"); |
| 43 | + $this->click("wpSave"); |
| 44 | + $this->waitForPageToLoad("30000"); |
| 45 | + } |
| 46 | + |
| 47 | + public function testTest() |
| 48 | + { |
| 49 | + $this->open($this->getUrl() ."index.php/Special:SearchByProperty"); |
| 50 | + $this->type("property", "NumericTest"); |
| 51 | + $this->type("value", "123"); |
| 52 | + $this->click("//input[@value='Find results']"); |
| 53 | + $this->waitForPageToLoad("30000"); |
| 54 | + |
| 55 | + $this->assertEquals("NumericTest 123", $this->getText("firstHeading")); |
| 56 | + |
| 57 | + |
| 58 | + $this->assertTrue($this->isElementPresent("link=NumericTestPage1")); |
| 59 | + |
| 60 | + |
| 61 | + $this->assertTrue($this->isElementPresent("link=NumericTestPage2")); |
| 62 | + |
| 63 | + |
| 64 | + $this->assertTrue($this->isElementPresent("link=NumericTestPage3")); |
| 65 | + |
| 66 | + |
| 67 | + $this->assertTrue($this->isTextPresent("345")); |
| 68 | + |
| 69 | + |
| 70 | + $this->assertEquals("NumericTest", $this->getValue("property")); |
| 71 | + |
| 72 | + |
| 73 | + $this->assertEquals("123", $this->getValue("value")); |
| 74 | + |
| 75 | + } |
| 76 | + |
| 77 | + public function testTeardown() |
| 78 | + { |
| 79 | + $this->open($this->getUrl() ."index.php/NumericTestPage1"); |
| 80 | + $this->click("link=Delete"); |
| 81 | + $this->waitForPageToLoad("30000"); |
| 82 | + $this->click("wpConfirmB"); |
| 83 | + $this->waitForPageToLoad("30000"); |
| 84 | + $this->type("searchInput", "NumericTestPage2"); |
| 85 | + $this->click("searchGoButton"); |
| 86 | + $this->waitForPageToLoad("30000"); |
| 87 | + $this->click("link=Delete"); |
| 88 | + $this->waitForPageToLoad("30000"); |
| 89 | + $this->click("wpConfirmB"); |
| 90 | + $this->waitForPageToLoad("30000"); |
| 91 | + $this->type("searchInput", "NumericTestPage3"); |
| 92 | + $this->click("searchGoButton"); |
| 93 | + $this->waitForPageToLoad("30000"); |
| 94 | + $this->click("link=Delete"); |
| 95 | + $this->waitForPageToLoad("30000"); |
| 96 | + $this->click("wpConfirmB"); |
| 97 | + $this->waitForPageToLoad("30000"); |
| 98 | + $this->type("searchInput", "Property:NumericTest"); |
| 99 | + $this->click("searchGoButton"); |
| 100 | + $this->waitForPageToLoad("30000"); |
| 101 | + $this->click("link=Delete"); |
| 102 | + $this->waitForPageToLoad("30000"); |
| 103 | + $this->click("wpConfirmB"); |
| 104 | + $this->waitForPageToLoad("30000"); |
| 105 | + $this->click("link=Main Page"); |
| 106 | + $this->waitForPageToLoad("30000"); |
| 107 | + } |
| 108 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithNumericValueTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 109 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 110 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSpecialBrowse.php |
— | — | @@ -0,0 +1,57 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class FactboxLinksToSpecialBrowse extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "TestPerson James Orange"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=TestPerson James Orange"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[Has dad::TestPerson Mike Orange]]\n[[Has mum::TestPerson Sandra Red-Orange]]\n[[Has half sister::TestPerson Olivia Red]]\n[[Has half sister::TestPerson Michelle Orange]]\n__SHOWFACTBOX__"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + } |
| 26 | + |
| 27 | + /** |
| 28 | + * Each of these methods... |
| 29 | + * * should have one assertion. |
| 30 | + * * should start with test, e.g., testTest(). |
| 31 | + */ |
| 32 | + public function testTest() |
| 33 | + { |
| 34 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 35 | + $this->click("link=TestPerson James Orange"); |
| 36 | + $this->waitForPageToLoad("10000"); |
| 37 | + |
| 38 | + $this->assertEquals("Browse wiki", $this->getText("firstHeading")); |
| 39 | + |
| 40 | + |
| 41 | + $this->assertTrue($this->isTextPresent("No properties link to this page.")); |
| 42 | + |
| 43 | + } |
| 44 | + |
| 45 | + /** |
| 46 | + * Done at the end to purge the test data. |
| 47 | + */ |
| 48 | + public function testTeardown() |
| 49 | + { |
| 50 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 51 | + $this->click("link=Delete"); |
| 52 | + $this->waitForPageToLoad("10000"); |
| 53 | + $this->click("wpConfirmB"); |
| 54 | + $this->waitForPageToLoad("10000"); |
| 55 | + $this->click("link=Main Page"); |
| 56 | + $this->waitForPageToLoad("10000"); |
| 57 | + } |
| 58 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSpecialBrowse.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 59 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 60 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineAllowedValuesTestCase.php |
— | — | @@ -0,0 +1,87 @@ |
| 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 DefineAllowedValuesTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:YesOrNo"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=Property:YesOrNo"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[Allows value::Yes]]\n[[Allows value::No]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "YesTest"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=YesTest"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[YesOrNo::Yes]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + $this->type("searchInput", "MaybeTest"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("30000"); |
| 32 | + $this->click("link=MaybeTest"); |
| 33 | + $this->waitForPageToLoad("30000"); |
| 34 | + $this->type("wpTextbox1", "[[YesOrNo::Maybe]]"); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + } |
| 38 | + |
| 39 | + public function test_checkmaybe_DefineAllowedValues() |
| 40 | + { |
| 41 | + $this->open($this->getUrl() ."index.php/MaybeTest"); |
| 42 | + |
| 43 | + $this->assertFalse($this->isElementPresent("link=Maybe")); |
| 44 | + |
| 45 | + } |
| 46 | + |
| 47 | + public function test_checktooltip_DefineAllowedValues() |
| 48 | + { |
| 49 | + $this->open($this->getUrl() ."index.php/MaybeTest"); |
| 50 | + $this->click("//div[@id='bodyContent']/p/span/img"); |
| 51 | + |
| 52 | + $this->assertTrue($this->isTextPresent("\"Maybe\" is not in the list of possible values (Yes, No) for this property.")); |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + public function test_checkyes_DefineAllowedValues() |
| 57 | + { |
| 58 | + $this->open($this->getUrl() ."index.php/YesTest"); |
| 59 | + |
| 60 | + $this->assertEquals("Yes", $this->getText("link=Yes")); |
| 61 | + |
| 62 | + } |
| 63 | + |
| 64 | + public function testTeardown() |
| 65 | + { |
| 66 | + $this->open($this->getUrl() ."index.php/YesTest"); |
| 67 | + $this->click("link=Delete"); |
| 68 | + $this->waitForPageToLoad("30000"); |
| 69 | + $this->click("wpConfirmB"); |
| 70 | + $this->waitForPageToLoad("30000"); |
| 71 | + $this->type("searchInput", "MaybeTest"); |
| 72 | + $this->click("searchGoButton"); |
| 73 | + $this->waitForPageToLoad("30000"); |
| 74 | + $this->click("link=Delete"); |
| 75 | + $this->waitForPageToLoad("30000"); |
| 76 | + $this->click("wpConfirmB"); |
| 77 | + $this->waitForPageToLoad("30000"); |
| 78 | + $this->type("searchInput", "Property:YesOrNo"); |
| 79 | + $this->click("searchGoButton"); |
| 80 | + $this->waitForPageToLoad("30000"); |
| 81 | + $this->click("link=Delete"); |
| 82 | + $this->waitForPageToLoad("30000"); |
| 83 | + $this->click("wpConfirmB"); |
| 84 | + $this->waitForPageToLoad("30000"); |
| 85 | + $this->click("//div[@id='p-logo']/a"); |
| 86 | + $this->waitForPageToLoad("30000"); |
| 87 | + } |
| 88 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineAllowedValuesTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 89 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 90 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ViewValuesOfPropertyOnSpecialPage.php |
— | — | @@ -0,0 +1,120 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class ViewValuesOfPropertyOnSpecialPage extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "FirstPageAnnotated"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=FirstPageAnnotated"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[CheckValuePP::Or get]]"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + $this->type("searchInput", "SecondPageAnnotated"); |
| 26 | + $this->click("searchGoButton"); |
| 27 | + $this->waitForPageToLoad("10000"); |
| 28 | + $this->click("link=SecondPageAnnotated"); |
| 29 | + $this->waitForPageToLoad("10000"); |
| 30 | + $this->type("wpTextbox1", "[[CheckValuePP::Get one value]]"); |
| 31 | + $this->click("wpSave"); |
| 32 | + $this->waitForPageToLoad("10000"); |
| 33 | + $this->type("searchInput", "ThirdPageAnnotated"); |
| 34 | + $this->click("searchGoButton"); |
| 35 | + $this->waitForPageToLoad("10000"); |
| 36 | + $this->click("link=ThirdPageAnnotated"); |
| 37 | + $this->waitForPageToLoad("10000"); |
| 38 | + $this->type("wpTextbox1", "[[CheckValuePP::Three values]]"); |
| 39 | + $this->click("wpSave"); |
| 40 | + $this->waitForPageToLoad("10000"); |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * Each of these methods... |
| 45 | + * * should have one assertion. |
| 46 | + * * should start with test, e.g., testTest(). |
| 47 | + */ |
| 48 | + public function testTest() |
| 49 | + { |
| 50 | + $this->open($this->getUrl() ."index.php/Special:PageProperty"); |
| 51 | + $this->type("from", "SecondPageAnnotated"); |
| 52 | + $this->type("type", "CheckValuePP"); |
| 53 | + $this->click("//input[@value='Find results']"); |
| 54 | + $this->waitForPageToLoad("10000"); |
| 55 | + |
| 56 | + $this->assertEquals("SecondPageAnnotated CheckValuePP", $this->getText("firstHeading")); |
| 57 | + |
| 58 | + |
| 59 | + $this->assertTrue($this->isElementPresent("link=Get one value")); |
| 60 | + |
| 61 | + |
| 62 | + $this->assertFalse($this->isElementPresent("link=Or get")); |
| 63 | + |
| 64 | + $this->type("from", ""); |
| 65 | + $this->type("type", ""); |
| 66 | + $this->click("//input[@value='Find results']"); |
| 67 | + $this->waitForPageToLoad("10000"); |
| 68 | + } |
| 69 | + |
| 70 | + public function testTest2() |
| 71 | + { |
| 72 | + $this->open($this->getUrl() ."index.php/Special:PageProperty"); |
| 73 | + $this->type("type", "CheckValuePP"); |
| 74 | + $this->click("//input[@value='Find results']"); |
| 75 | + $this->waitForPageToLoad("10000"); |
| 76 | + |
| 77 | + $this->assertEquals("CheckValuePP", $this->getText("firstHeading")); |
| 78 | + |
| 79 | + |
| 80 | + $this->assertTrue($this->isElementPresent("link=Get one value")); |
| 81 | + |
| 82 | + |
| 83 | + $this->assertTrue($this->isElementPresent("link=Or get")); |
| 84 | + |
| 85 | + |
| 86 | + $this->assertTrue($this->isElementPresent("link=Three values")); |
| 87 | + |
| 88 | + $this->type("from", ""); |
| 89 | + $this->type("type", ""); |
| 90 | + $this->click("//input[@value='Find results']"); |
| 91 | + $this->waitForPageToLoad("10000"); |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * Done at the end to purge the test data. |
| 96 | + */ |
| 97 | + public function testTeardown() |
| 98 | + { |
| 99 | + $this->open($this->getUrl() ."index.php/FirstPageAnnotated"); |
| 100 | + $this->click("link=Delete"); |
| 101 | + $this->waitForPageToLoad("10000"); |
| 102 | + $this->click("wpConfirmB"); |
| 103 | + $this->waitForPageToLoad("10000"); |
| 104 | + $this->type("searchInput", "SecondPageAnnotated"); |
| 105 | + $this->click("searchGoButton"); |
| 106 | + $this->waitForPageToLoad("10000"); |
| 107 | + $this->click("link=Delete"); |
| 108 | + $this->waitForPageToLoad("10000"); |
| 109 | + $this->click("wpConfirmB"); |
| 110 | + $this->waitForPageToLoad("10000"); |
| 111 | + $this->type("searchInput", "ThirdPageAnnotated"); |
| 112 | + $this->click("searchGoButton"); |
| 113 | + $this->waitForPageToLoad("10000"); |
| 114 | + $this->click("link=Delete"); |
| 115 | + $this->waitForPageToLoad("10000"); |
| 116 | + $this->click("wpConfirmB"); |
| 117 | + $this->waitForPageToLoad("10000"); |
| 118 | + $this->click("link=Main Page"); |
| 119 | + $this->waitForPageToLoad("10000"); |
| 120 | + } |
| 121 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ViewValuesOfPropertyOnSpecialPage.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 122 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 123 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSearchByProperty.php |
— | — | @@ -0,0 +1,61 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class FactboxLinksToSearchByProperty extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "TestPerson James Orange"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=TestPerson James Orange"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[Has dad::TestPerson Mike Orange]]\n[[Has mum::TestPerson Sandra Red-Orange]]\n[[Has half sister::TestPerson Olivia Red]]\n[[Has half sister::TestPerson Michelle Orange]]\n__SHOWFACTBOX__"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + } |
| 26 | + |
| 27 | + /** |
| 28 | + * Each of these methods... |
| 29 | + * * should have one assertion. |
| 30 | + * * should start with test, e.g., testTest(). |
| 31 | + */ |
| 32 | + public function testTest() |
| 33 | + { |
| 34 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 35 | + $this->click("//div[@id='mw-data-after-content']/div/table/tbody/tr[2]/td[2]/span[1]/a"); |
| 36 | + $this->waitForPageToLoad("10000"); |
| 37 | + |
| 38 | + $this->assertTrue($this->isTextPresent("A list of all pages that have property \"Has half sister\" with value \"TestPerson Olivia Red\"")); |
| 39 | + |
| 40 | + $this->click("link=TestPerson James Orange"); |
| 41 | + $this->waitForPageToLoad("10000"); |
| 42 | + $this->click("link=+"); |
| 43 | + $this->waitForPageToLoad("10000"); |
| 44 | + |
| 45 | + $this->assertTrue($this->isTextPresent("A list of all pages that have property \"Has dad\" with value \"TestPerson Mike Orange\"")); |
| 46 | + |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Done at the end to purge the test data. |
| 51 | + */ |
| 52 | + public function testTeardown() |
| 53 | + { |
| 54 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 55 | + $this->click("link=Delete"); |
| 56 | + $this->waitForPageToLoad("10000"); |
| 57 | + $this->click("wpConfirmB"); |
| 58 | + $this->waitForPageToLoad("10000"); |
| 59 | + $this->click("link=Main Page"); |
| 60 | + $this->waitForPageToLoad("10000"); |
| 61 | + } |
| 62 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSearchByProperty.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 63 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 64 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertyTypePageIsDefaultTestCase.php |
— | — | @@ -0,0 +1,69 @@ |
| 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 PropertyTypePageIsDefaultTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:AaaDefaultType"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:AaaDefaultType"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "Test Property."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "TestDefaultType"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=TestDefaultType"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[AaaDefaultType::CheckLink]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function test_checkpropertylist_PropertyTypePageIsDefault() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/TestDefaultType"); |
| 34 | + $this->type("searchInput", "Special:Properties"); |
| 35 | + $this->click("searchGoButton"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + |
| 38 | + $this->assertTrue($this->isTextPresent("AaaDefaultType of type Page")); |
| 39 | + |
| 40 | + } |
| 41 | + |
| 42 | + public function test_verifylink_PropertyTypePageIsDefault() |
| 43 | + { |
| 44 | + $this->open($this->getUrl() ."index.php/TestDefaultType"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isElementPresent("link=CheckLink")); |
| 47 | + |
| 48 | + } |
| 49 | + |
| 50 | + public function testTeardown() |
| 51 | + { |
| 52 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 53 | + $this->type("searchInput", "TestDefaultType"); |
| 54 | + $this->click("searchGoButton"); |
| 55 | + $this->waitForPageToLoad("30000"); |
| 56 | + $this->click("link=Delete"); |
| 57 | + $this->waitForPageToLoad("30000"); |
| 58 | + $this->click("wpConfirmB"); |
| 59 | + $this->waitForPageToLoad("30000"); |
| 60 | + $this->type("searchInput", "Property:AaaDefaultType"); |
| 61 | + $this->click("searchGoButton"); |
| 62 | + $this->waitForPageToLoad("30000"); |
| 63 | + $this->click("link=Delete"); |
| 64 | + $this->waitForPageToLoad("30000"); |
| 65 | + $this->click("wpConfirmB"); |
| 66 | + $this->waitForPageToLoad("30000"); |
| 67 | + $this->click("link=Main Page"); |
| 68 | + $this->waitForPageToLoad("30000"); |
| 69 | + } |
| 70 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertyTypePageIsDefaultTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 71 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 72 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithStringValueTestCase.php |
— | — | @@ -0,0 +1,71 @@ |
| 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 SearchByPropertyWithStringValueTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "FirstPageToMatch"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=FirstPageToMatch"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[TestSBP::Yes]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "SecondPageToMatch"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=SecondPageToMatch"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[TestSBP::Yes]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function testTest() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/Special:SearchByProperty"); |
| 34 | + $this->type("property", "TestSBP"); |
| 35 | + $this->type("value", "Yes"); |
| 36 | + $this->click("//input[@value='Find results']"); |
| 37 | + $this->waitForPageToLoad("30000"); |
| 38 | + |
| 39 | + $this->assertEquals("TestSBP Yes", $this->getText("firstHeading")); |
| 40 | + |
| 41 | + |
| 42 | + $this->assertTrue($this->isElementPresent("link=FirstPageToMatch")); |
| 43 | + |
| 44 | + |
| 45 | + $this->assertTrue($this->isElementPresent("link=SecondPageToMatch")); |
| 46 | + |
| 47 | + |
| 48 | + $this->assertEquals("TestSBP", $this->getValue("property")); |
| 49 | + |
| 50 | + |
| 51 | + $this->assertEquals("Yes", $this->getValue("value")); |
| 52 | + |
| 53 | + } |
| 54 | + |
| 55 | + public function testTeardown() |
| 56 | + { |
| 57 | + $this->open($this->getUrl() ."index.php/FirstPageToMatch"); |
| 58 | + $this->click("link=Delete"); |
| 59 | + $this->waitForPageToLoad("30000"); |
| 60 | + $this->click("wpConfirmB"); |
| 61 | + $this->waitForPageToLoad("30000"); |
| 62 | + $this->type("searchInput", "SecondPageToMatch"); |
| 63 | + $this->click("searchGoButton"); |
| 64 | + $this->waitForPageToLoad("30000"); |
| 65 | + $this->click("link=Delete"); |
| 66 | + $this->waitForPageToLoad("30000"); |
| 67 | + $this->click("wpConfirmB"); |
| 68 | + $this->waitForPageToLoad("30000"); |
| 69 | + $this->click("link=Main Page"); |
| 70 | + $this->waitForPageToLoad("30000"); |
| 71 | + } |
| 72 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithStringValueTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 73 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 74 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineTypeOfPropertyTestCase.php |
— | — | @@ -0,0 +1,77 @@ |
| 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 DefineTypeOfPropertyTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Property:TestNumber"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=exact:Property:TestNumber"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "Test property."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "ChangeType"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=ChangeType"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[TestNumber::123456]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + |
| 30 | + $this->assertTrue($this->isElementPresent("link=123456")); |
| 31 | + |
| 32 | + } |
| 33 | + |
| 34 | + public function test_hastype_DefineTypeOfProperty() |
| 35 | + { |
| 36 | + $this->open($this->getUrl() ."index.php/Property:TestNumber"); |
| 37 | + $this->click("link=Edit"); |
| 38 | + $this->waitForPageToLoad("30000"); |
| 39 | + $this->type("wpTextbox1", "Test property.\n[[Has type::Number]]"); |
| 40 | + $this->click("wpSave"); |
| 41 | + $this->waitForPageToLoad("30000"); |
| 42 | + } |
| 43 | + |
| 44 | + public function test_verifynolink_DefineTypeOfProperty() |
| 45 | + { |
| 46 | + $this->open($this->getUrl() ."index.php/Property:TestNumber"); |
| 47 | + |
| 48 | + $this->assertFalse($this->isElementPresent("link=123456")); |
| 49 | + |
| 50 | + $this->click("link=ChangeType"); |
| 51 | + $this->waitForPageToLoad("30000"); |
| 52 | + $this->click("link=Refresh"); |
| 53 | + $this->waitForPageToLoad("30000"); |
| 54 | + |
| 55 | + $this->assertFalse($this->isElementPresent("link=123456")); |
| 56 | + |
| 57 | + } |
| 58 | + |
| 59 | + public function testTeardown() |
| 60 | + { |
| 61 | + $this->open($this->getUrl() ."index.php/ChangeType"); |
| 62 | + $this->click("link=Delete"); |
| 63 | + $this->waitForPageToLoad("30000"); |
| 64 | + $this->click("wpConfirmB"); |
| 65 | + $this->waitForPageToLoad("30000"); |
| 66 | + $this->click("link=Main Page"); |
| 67 | + $this->waitForPageToLoad("30000"); |
| 68 | + $this->type("searchInput", "Property:TestNumber"); |
| 69 | + $this->click("searchGoButton"); |
| 70 | + $this->waitForPageToLoad("30000"); |
| 71 | + $this->click("link=Delete"); |
| 72 | + $this->waitForPageToLoad("30000"); |
| 73 | + $this->click("wpConfirmB"); |
| 74 | + $this->waitForPageToLoad("30000"); |
| 75 | + $this->click("link=Main Page"); |
| 76 | + $this->waitForPageToLoad("30000"); |
| 77 | + } |
| 78 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineTypeOfPropertyTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 79 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 80 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildChainOfPropertiesInAQuery.php |
— | — | @@ -0,0 +1,104 @@ |
| 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 BuildChainOfPropertiesInAQuery extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + set_time_limit(0); |
| 13 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 14 | + $this->type("searchInput", "Testing person Michael Green"); |
| 15 | + $this->click("searchGoButton"); |
| 16 | + $this->waitForPageToLoad("30000"); |
| 17 | + $this->click("link=Testing person Michael Green"); |
| 18 | + $this->waitForPageToLoad("30000"); |
| 19 | + $this->type("wpTextbox1", "[[In love with::Testing person Laura Blue]]"); |
| 20 | + $this->click("wpSave"); |
| 21 | + $this->waitForPageToLoad("30000"); |
| 22 | + $this->click("link=Testing person Laura Blue"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->type("wpTextbox1", "[[Daughter of::Testing person Jimmy Red]]"); |
| 25 | + $this->click("wpSave"); |
| 26 | + $this->waitForPageToLoad("30000"); |
| 27 | + $this->type("searchInput", "Testing person Sarah Yellow"); |
| 28 | + $this->click("searchGoButton"); |
| 29 | + $this->waitForPageToLoad("30000"); |
| 30 | + $this->click("link=Testing person Sarah Yellow"); |
| 31 | + $this->waitForPageToLoad("30000"); |
| 32 | + $this->type("wpTextbox1", "[[In love with::Testing person Denise Grey]]"); |
| 33 | + $this->click("wpSave"); |
| 34 | + $this->waitForPageToLoad("30000"); |
| 35 | + $this->click("link=Testing person Denise Grey"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + $this->type("wpTextbox1", "[[Daughter of::Testing person Jimmy Red]]"); |
| 38 | + $this->click("wpSave"); |
| 39 | + $this->waitForPageToLoad("30000"); |
| 40 | + $this->type("searchInput", "Testing person Mary Pink"); |
| 41 | + $this->click("searchGoButton"); |
| 42 | + $this->waitForPageToLoad("30000"); |
| 43 | + $this->click("link=Testing person Mary Pink"); |
| 44 | + $this->waitForPageToLoad("30000"); |
| 45 | + $this->type("wpTextbox1", "[[In love with::Testing person Jimmy Red]]"); |
| 46 | + $this->click("wpSave"); |
| 47 | + $this->waitForPageToLoad("30000"); |
| 48 | + } |
| 49 | + |
| 50 | + public function testTest() |
| 51 | +{ |
| 52 | + $this->open($this->getUrl() ."index.php/Special:Ask"); |
| 53 | + $this->type("q", "[[In love with.Daughter of::Testing person Jimmy Red]]"); |
| 54 | + $this->click("//input[@value='Find results']"); |
| 55 | + $this->waitForPageToLoad("30000"); |
| 56 | + try { |
| 57 | + $this->assertTrue($this->isTextPresent("Testing person Michael Green")); |
| 58 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 59 | + array_push($this->verificationErrors, $e->toString()); |
| 60 | + } |
| 61 | + try { |
| 62 | + $this->assertTrue($this->isTextPresent("Testing person Sarah Yellow")); |
| 63 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 64 | + array_push($this->verificationErrors, $e->toString()); |
| 65 | + } |
| 66 | + try { |
| 67 | + $this->assertFalse($this->isTextPresent("Testing person Mary Pink")); |
| 68 | + } catch (PHPUnit_Framework_AssertionFailedError $e) { |
| 69 | + array_push($this->verificationErrors, $e->toString()); |
| 70 | + } |
| 71 | + } |
| 72 | + |
| 73 | + public function testTeardown() |
| 74 | + { |
| 75 | + $this->open($this->getUrl() ."index.php/Testing person Michael Green"); |
| 76 | + $this->click("link=Delete"); |
| 77 | + $this->waitForPageToLoad("30000"); |
| 78 | + $this->click("wpConfirmB"); |
| 79 | + $this->waitForPageToLoad("30000"); |
| 80 | + |
| 81 | + $this->open($this->getUrl() ."index.php/Testing person Laura Blue"); |
| 82 | + $this->click("link=Delete"); |
| 83 | + $this->waitForPageToLoad("30000"); |
| 84 | + $this->click("wpConfirmB"); |
| 85 | + $this->waitForPageToLoad("30000"); |
| 86 | + |
| 87 | + $this->open($this->getUrl() ."index.php/Testing person Sarah Yellow"); |
| 88 | + $this->click("link=Delete"); |
| 89 | + $this->waitForPageToLoad("30000"); |
| 90 | + $this->click("wpConfirmB"); |
| 91 | + $this->waitForPageToLoad("30000"); |
| 92 | + |
| 93 | + $this->open($this->getUrl() ."index.php/Testing person Denise Grey"); |
| 94 | + $this->click("link=Delete"); |
| 95 | + $this->waitForPageToLoad("30000"); |
| 96 | + $this->click("wpConfirmB"); |
| 97 | + $this->waitForPageToLoad("30000"); |
| 98 | + |
| 99 | + $this->open($this->getUrl() ."index.php/Testing person Mary Pink"); |
| 100 | + $this->click("link=Delete"); |
| 101 | + $this->waitForPageToLoad("30000"); |
| 102 | + $this->click("wpConfirmB"); |
| 103 | + $this->waitForPageToLoad("30000"); |
| 104 | + } |
| 105 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildChainOfPropertiesInAQuery.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 106 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 107 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshInlineQuery.php |
— | — | @@ -0,0 +1,66 @@ |
| 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 RefreshInlineQuery extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "SCFBestTeamInWorld"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("10000"); |
| 16 | + $this->click("link=SCFBestTeamInWorld"); |
| 17 | + $this->waitForPageToLoad("10000"); |
| 18 | + $this->type("wpTextbox1", "[[BTIWProperty::SCF]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("10000"); |
| 21 | + $this->type("searchInput", "TestPageForRefreshing"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("10000"); |
| 24 | + $this->click("link=TestPageForRefreshing"); |
| 25 | + $this->waitForPageToLoad("10000"); |
| 26 | + $this->type("wpTextbox1", "The best football team in world is {{#show: SCFBestTeamInWorld | ?BTIWProperty }}"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("10000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function testTest() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/SCFBestTeamInWorld"); |
| 34 | + $this->click("link=Edit"); |
| 35 | + $this->waitForPageToLoad("10000"); |
| 36 | + $this->type("wpTextbox1", "[[BTIWProperty::SC Freiburg]]"); |
| 37 | + $this->click("wpSave"); |
| 38 | + $this->waitForPageToLoad("10000"); |
| 39 | + $this->type("searchInput", "TestPageForRefreshing"); |
| 40 | + $this->click("searchGoButton"); |
| 41 | + $this->waitForPageToLoad("10000"); |
| 42 | + |
| 43 | + $this->click("link=Refresh"); |
| 44 | + $this->waitForPageToLoad("10000"); |
| 45 | + |
| 46 | + $this->assertTrue($this->isTextPresent("SC Freiburg")); |
| 47 | + |
| 48 | + } |
| 49 | + |
| 50 | + public function testTeardown() |
| 51 | + { |
| 52 | + $this->open($this->getUrl() ."index.php?title=TestPageForRefreshing&action=purge"); |
| 53 | + $this->click("link=Delete"); |
| 54 | + $this->waitForPageToLoad("10000"); |
| 55 | + $this->click("wpConfirmB"); |
| 56 | + $this->waitForPageToLoad("10000"); |
| 57 | + $this->type("searchInput", "SCFBestTeamInWorld"); |
| 58 | + $this->click("searchGoButton"); |
| 59 | + $this->waitForPageToLoad("10000"); |
| 60 | + $this->click("link=Delete"); |
| 61 | + $this->waitForPageToLoad("10000"); |
| 62 | + $this->click("wpConfirmB"); |
| 63 | + $this->waitForPageToLoad("10000"); |
| 64 | + $this->click("link=Main Page"); |
| 65 | + $this->waitForPageToLoad("10000"); |
| 66 | + } |
| 67 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshInlineQuery.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 68 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 69 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ShowFactboxTestCase.php |
— | — | @@ -0,0 +1,40 @@ |
| 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 ShowFactboxTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "Factboxtest"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=Factboxtest"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[Factbox::is shown]]\n__SHOWFACTBOX__"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + } |
| 22 | + |
| 23 | + public function testTest() |
| 24 | + { |
| 25 | + $this->open($this->getUrl() ."index.php/Factboxtest"); |
| 26 | + |
| 27 | + $this->assertTrue($this->isTextPresent("Facts about")); |
| 28 | + |
| 29 | + } |
| 30 | + |
| 31 | + public function testTeardown() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/Factboxtest"); |
| 34 | + $this->click("link=Delete"); |
| 35 | + $this->waitForPageToLoad("30000"); |
| 36 | + $this->click("wpConfirmB"); |
| 37 | + $this->waitForPageToLoad("30000"); |
| 38 | + $this->click("//div[@id='p-logo']/a"); |
| 39 | + $this->waitForPageToLoad("30000"); |
| 40 | + } |
| 41 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ShowFactboxTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 42 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 43 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/WantedPropertiesOnSpecialPageTestCase.php |
— | — | @@ -0,0 +1,63 @@ |
| 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 WantedPropertiesOnSpecialPageTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "WantedPropertyTest"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=WantedPropertyTest"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[RedLinkProperty::Is used]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "WantedPropertyTest2"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=WantedPropertyTest2"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[RedLinkProperty::Is used]]"); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + } |
| 30 | + |
| 31 | + public function test_numberofuses_WantedPropertiesOnSpecialPage() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/Special:WantedProperties"); |
| 34 | + |
| 35 | + $this->assertTrue($this->isTextPresent("RedLinkProperty (2 uses)")); |
| 36 | + |
| 37 | + } |
| 38 | + |
| 39 | + public function test_showsproperty_WantedPropertiesOnSpecialPage() |
| 40 | + { |
| 41 | + $this->open($this->getUrl() ."index.php/Special:WantedProperties"); |
| 42 | + |
| 43 | + $this->assertTrue($this->isElementPresent("link=RedLinkProperty")); |
| 44 | + |
| 45 | + } |
| 46 | + |
| 47 | + public function testTeardown() |
| 48 | + { |
| 49 | + $this->open($this->getUrl() ."index.php/WantedPropertyTest"); |
| 50 | + $this->click("link=Delete"); |
| 51 | + $this->waitForPageToLoad("30000"); |
| 52 | + $this->click("wpConfirmB"); |
| 53 | + $this->waitForPageToLoad("30000"); |
| 54 | + $this->type("searchInput", "WantedPropertyTest2"); |
| 55 | + $this->click("searchGoButton"); |
| 56 | + $this->waitForPageToLoad("30000"); |
| 57 | + $this->click("link=Delete"); |
| 58 | + $this->waitForPageToLoad("30000"); |
| 59 | + $this->click("wpConfirmB"); |
| 60 | + $this->waitForPageToLoad("30000"); |
| 61 | + $this->click("link=Main Page"); |
| 62 | + $this->waitForPageToLoad("30000"); |
| 63 | + } |
| 64 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/WantedPropertiesOnSpecialPageTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 65 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 66 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxShowsProperties.php |
— | — | @@ -0,0 +1,61 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class FactboxShowsProperties extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "TestPerson James Orange"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=TestPerson James Orange"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[Has dad::TestPerson Mike Orange]]\n[[Has mum::TestPerson Sandra Red-Orange]]\n[[Has half sister::TestPerson Olivia Red]]\n[[Has half sister::TestPerson Michelle Orange]]\n__SHOWFACTBOX__"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + } |
| 26 | + |
| 27 | + /** |
| 28 | + * Each of these methods... |
| 29 | + * * should have one assertion. |
| 30 | + * * should start with test, e.g., testTest(). |
| 31 | + */ |
| 32 | + public function testTest() |
| 33 | + { |
| 34 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 35 | + |
| 36 | + $this->assertTrue($this->isTextPresent("Has dad")); |
| 37 | + |
| 38 | + |
| 39 | + $this->assertTrue($this->isTextPresent("TestPerson Mike Orange +")); |
| 40 | + |
| 41 | + |
| 42 | + $this->assertTrue($this->isElementPresent("link=Has mum")); |
| 43 | + |
| 44 | + |
| 45 | + $this->assertTrue($this->isTextPresent("and")); |
| 46 | + |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Done at the end to purge the test data. |
| 51 | + */ |
| 52 | + public function testTeardown() |
| 53 | + { |
| 54 | + $this->open($this->getUrl() ."index.php/TestPerson_James_Orange"); |
| 55 | + $this->click("link=Delete"); |
| 56 | + $this->waitForPageToLoad("10000"); |
| 57 | + $this->click("wpConfirmB"); |
| 58 | + $this->waitForPageToLoad("10000"); |
| 59 | + $this->click("link=Main Page"); |
| 60 | + $this->waitForPageToLoad("10000"); |
| 61 | + } |
| 62 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxShowsProperties.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 63 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 64 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertiesListedOnSpecialPageTestCase.php |
— | — | @@ -0,0 +1,106 @@ |
| 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 PropertiesListedOnSpecialPageTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "PropertyListTest1"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=PropertyListTest1"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "[[AaaProperty::FirstUse]]\nTest page."); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + $this->type("searchInput", "PropertyListTest2"); |
| 22 | + $this->click("searchGoButton"); |
| 23 | + $this->waitForPageToLoad("30000"); |
| 24 | + $this->click("link=PropertyListTest2"); |
| 25 | + $this->waitForPageToLoad("30000"); |
| 26 | + $this->type("wpTextbox1", "[[AaaProperty::SecondUse]]\nTest page."); |
| 27 | + $this->click("wpSave"); |
| 28 | + $this->waitForPageToLoad("30000"); |
| 29 | + $this->type("searchInput", "Property:AabProperty"); |
| 30 | + $this->click("searchGoButton"); |
| 31 | + $this->waitForPageToLoad("30000"); |
| 32 | + $this->click("link=exact:Property:AabProperty"); |
| 33 | + $this->waitForPageToLoad("30000"); |
| 34 | + $this->type("wpTextbox1", "This is a unused property."); |
| 35 | + $this->click("wpSave"); |
| 36 | + $this->waitForPageToLoad("30000"); |
| 37 | + } |
| 38 | + |
| 39 | + public function test_linkspresent_PropertiesListedOnSpecialPage() |
| 40 | + { |
| 41 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 42 | + |
| 43 | + $this->assertTrue($this->isElementPresent("link=AaaProperty")); |
| 44 | + |
| 45 | + |
| 46 | + $this->assertTrue($this->isElementPresent("link=Page")); |
| 47 | + |
| 48 | + } |
| 49 | + |
| 50 | + public function test_numberofusage_PropertiesListedOnSpecialPage() |
| 51 | + { |
| 52 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 53 | + |
| 54 | + $this->assertTrue($this->isTextPresent("AaaProperty of type Page (2)")); |
| 55 | + |
| 56 | + } |
| 57 | + |
| 58 | + public function test_textpresent_PropertiesListedOnSpecialPage() |
| 59 | + { |
| 60 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 61 | + |
| 62 | + $this->assertTrue($this->isTextPresent("AaaProperty of type Page")); |
| 63 | + |
| 64 | + } |
| 65 | + |
| 66 | + public function test_tooltipicon_PropertiesListedOnSpecialPage() |
| 67 | + { |
| 68 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 69 | + $this->click("//div[@id='bodyContent']/ol/li[1]/span[2]/img"); |
| 70 | + $this->click("//div[9]"); |
| 71 | + } |
| 72 | + |
| 73 | + public function test_unusedpropertynotpresent_PropertiesListedOnSpecialPage() |
| 74 | + { |
| 75 | + $this->open($this->getUrl() ."index.php/Special:Properties"); |
| 76 | + |
| 77 | + $this->assertFalse($this->isTextPresent("AabProperty")); |
| 78 | + |
| 79 | + } |
| 80 | + |
| 81 | + public function testTeardown() |
| 82 | + { |
| 83 | + $this->type("searchInput", "Property:AabProperty"); |
| 84 | + $this->click("searchGoButton"); |
| 85 | + $this->waitForPageToLoad("30000"); |
| 86 | + $this->click("link=Delete"); |
| 87 | + $this->waitForPageToLoad("30000"); |
| 88 | + $this->click("wpConfirmB"); |
| 89 | + $this->waitForPageToLoad("30000"); |
| 90 | + $this->type("searchInput", "PropertyListTest1"); |
| 91 | + $this->click("searchGoButton"); |
| 92 | + $this->waitForPageToLoad("30000"); |
| 93 | + $this->click("link=Delete"); |
| 94 | + $this->waitForPageToLoad("30000"); |
| 95 | + $this->click("wpConfirmB"); |
| 96 | + $this->waitForPageToLoad("30000"); |
| 97 | + $this->type("searchInput", "PropertyListTest2"); |
| 98 | + $this->click("searchGoButton"); |
| 99 | + $this->waitForPageToLoad("30000"); |
| 100 | + $this->click("link=Delete"); |
| 101 | + $this->waitForPageToLoad("30000"); |
| 102 | + $this->click("wpConfirmB"); |
| 103 | + $this->waitForPageToLoad("30000"); |
| 104 | + $this->click("link=Main page"); |
| 105 | + $this->waitForPageToLoad("30000"); |
| 106 | + } |
| 107 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertiesListedOnSpecialPageTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 108 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 109 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ChangeSeparatorForTypeNumber.php |
— | — | @@ -0,0 +1,113 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class ChangeSeparatorForTypeNumber extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 17 | + $this->type("searchInput", "Property:AnyNewNumber"); |
| 18 | + $this->click("searchGoButton"); |
| 19 | + $this->waitForPageToLoad("10000"); |
| 20 | + $this->click("link=exact:Property:AnyNewNumber"); |
| 21 | + $this->waitForPageToLoad("10000"); |
| 22 | + $this->type("wpTextbox1", "[[Has type::Number]]"); |
| 23 | + $this->click("wpSave"); |
| 24 | + $this->waitForPageToLoad("10000"); |
| 25 | + $this->type("searchInput", "Property:AnyOtherNumber"); |
| 26 | + $this->click("searchGoButton"); |
| 27 | + $this->waitForPageToLoad("10000"); |
| 28 | + $this->click("link=exact:Property:AnyOtherNumber"); |
| 29 | + $this->waitForPageToLoad("10000"); |
| 30 | + $this->type("wpTextbox1", "[[Has type::Number]]"); |
| 31 | + $this->click("wpSave"); |
| 32 | + $this->waitForPageToLoad("10000"); |
| 33 | + $this->type("searchInput", "TestAnyNewNumber1"); |
| 34 | + $this->click("searchGoButton"); |
| 35 | + $this->waitForPageToLoad("10000"); |
| 36 | + $this->click("link=TestAnyNewNumber1"); |
| 37 | + $this->waitForPageToLoad("10000"); |
| 38 | + $this->type("wpTextbox1", "[[AnyNewNumber::445000.000]] __SHOWFACTBOX__"); |
| 39 | + $this->click("wpSave"); |
| 40 | + $this->waitForPageToLoad("10000"); |
| 41 | + |
| 42 | + $this->assertTrue($this->isTextPresent("445,000")); |
| 43 | + |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * Each of these methods... |
| 48 | + * * should have one assertion. |
| 49 | + * * should start with test, e.g., testTest(). |
| 50 | + */ |
| 51 | + public function testTest() |
| 52 | + { |
| 53 | + $this->open($this->getUrl() ."index.php/MediaWiki:Smw_kiloseparator"); |
| 54 | + $this->click("link=Edit"); |
| 55 | + $this->waitForPageToLoad("10000"); |
| 56 | + $this->type("wpTextbox1", "."); |
| 57 | + $this->click("wpSave"); |
| 58 | + $this->waitForPageToLoad("10000"); |
| 59 | + $this->type("searchInput", "MediaWiki:Smw_decseparator"); |
| 60 | + $this->click("searchGoButton"); |
| 61 | + $this->waitForPageToLoad("10000"); |
| 62 | + $this->click("link=Edit"); |
| 63 | + $this->waitForPageToLoad("10000"); |
| 64 | + $this->type("wpTextbox1", ","); |
| 65 | + $this->click("wpSave"); |
| 66 | + $this->waitForPageToLoad("10000"); |
| 67 | + } |
| 68 | + |
| 69 | + public function testTest2() |
| 70 | + { |
| 71 | + $this->open($this->getUrl() ."index.php/TestAnyNewNumber1"); |
| 72 | + |
| 73 | + $this->assertTrue($this->isTextPresent("445.000.000")); |
| 74 | + |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Done at the end to purge the test data. |
| 79 | + */ |
| 80 | + public function testTeardown() |
| 81 | + { |
| 82 | + $this->open($this->getUrl() ."index.php/TestAnyNewNumber1"); |
| 83 | + $this->click("link=Delete"); |
| 84 | + $this->waitForPageToLoad("10000"); |
| 85 | + $this->click("wpConfirmB"); |
| 86 | + $this->waitForPageToLoad("10000"); |
| 87 | + $this->type("searchInput", "Property:AnyNewNumber"); |
| 88 | + $this->click("searchGoButton"); |
| 89 | + $this->waitForPageToLoad("10000"); |
| 90 | + $this->click("link=Delete"); |
| 91 | + $this->waitForPageToLoad("10000"); |
| 92 | + $this->click("wpConfirmB"); |
| 93 | + $this->waitForPageToLoad("10000"); |
| 94 | + $this->type("searchInput", "Property:AnyOtherNumber"); |
| 95 | + $this->click("searchGoButton"); |
| 96 | + $this->waitForPageToLoad("10000"); |
| 97 | + $this->click("link=Delete"); |
| 98 | + $this->waitForPageToLoad("10000"); |
| 99 | + $this->click("wpConfirmB"); |
| 100 | + $this->waitForPageToLoad("10000"); |
| 101 | + $this->open($this->getUrl() ."index.php/MediaWiki:Smw_kiloseparator"); |
| 102 | + $this->waitForPageToLoad("10000"); |
| 103 | + $this->click("link=Delete"); |
| 104 | + $this->waitForPageToLoad("10000"); |
| 105 | + $this->click("wpConfirmB"); |
| 106 | + $this->waitForPageToLoad("10000"); |
| 107 | + $this->open($this->getUrl() ."index.php/MediaWiki:smw_decseparator"); |
| 108 | + $this->waitForPageToLoad("10000"); |
| 109 | + $this->click("link=Delete"); |
| 110 | + $this->waitForPageToLoad("10000"); |
| 111 | + $this->click("wpConfirmB"); |
| 112 | + $this->waitForPageToLoad("10000"); |
| 113 | + } |
| 114 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ChangeSeparatorForTypeNumber.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 115 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 116 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AvoidPropertyCreationTestCase.php |
— | — | @@ -0,0 +1,40 @@ |
| 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 AvoidPropertyCreationTestCase extends SeleniumTestCase { |
| 8 | + |
| 9 | + |
| 10 | + public function testSetup() |
| 11 | + { |
| 12 | + $this->open($this->getUrl() ."index.php/Main_Page"); |
| 13 | + $this->type("searchInput", "AvoidPropertyCreationTest"); |
| 14 | + $this->click("searchGoButton"); |
| 15 | + $this->waitForPageToLoad("30000"); |
| 16 | + $this->click("link=AvoidPropertyCreationTest"); |
| 17 | + $this->waitForPageToLoad("30000"); |
| 18 | + $this->type("wpTextbox1", "This is a test page.\n\n[[:Avoid::Property]]"); |
| 19 | + $this->click("wpSave"); |
| 20 | + $this->waitForPageToLoad("30000"); |
| 21 | + } |
| 22 | + |
| 23 | + public function testTest() |
| 24 | + { |
| 25 | + $this->open($this->getUrl() ."index.php/AvoidPropertyCreationTest"); |
| 26 | + |
| 27 | + $this->assertEquals("Avoid::Property", $this->getText("link=exact:Avoid::Property")); |
| 28 | + |
| 29 | + } |
| 30 | + |
| 31 | + public function testTeardown() |
| 32 | + { |
| 33 | + $this->open($this->getUrl() ."index.php/AvoidPropertyCreationTest"); |
| 34 | + $this->click("link=Delete"); |
| 35 | + $this->waitForPageToLoad("30000"); |
| 36 | + $this->click("wpConfirmB"); |
| 37 | + $this->waitForPageToLoad("30000"); |
| 38 | + $this->click("link=Main Page"); |
| 39 | + $this->waitForPageToLoad("30000"); |
| 40 | + } |
| 41 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AvoidPropertyCreationTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 42 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 43 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/SMWSeleniumTestSuite.php |
— | — | @@ -0,0 +1,55 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * This test suite is made for a standard MediaWiki and Semantic MediaWiki installation. |
| 6 | + * |
| 7 | + * For a description of how to use a Selenium test suite for SMW, |
| 8 | + * see http://www.semantic-mediawiki.org/wiki/SMW_System_Testing_with_Selenium |
| 9 | + * |
| 10 | + * Prerequisites |
| 11 | + * => Empty wiki (pages may also have been deleted, simply) |
| 12 | + * => Vector Skin |
| 13 | + * |
| 14 | + * @author Benedikt Kämpgen, Jonas Wäckerle |
| 15 | + * |
| 16 | + */ |
| 17 | +class SMWSeleniumTestSuite extends SeleniumTestSuite |
| 18 | +{ |
| 19 | + public function setUp() { |
| 20 | + $this->setLoginBeforeTests( true ); |
| 21 | + parent::setUp(); |
| 22 | + } |
| 23 | + public function addTests() { |
| 24 | + $testFiles = array( |
| 25 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AvoidPropertyCreationTestCase.php', |
| 26 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CreatePropertyPageTestCase.php', |
| 27 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineAllowedValuesTestCase.php', |
| 28 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/DefineTypeOfPropertyTestCase.php', |
| 29 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/MakePropertySubpropertyOfAnotherOneTestCase.php', |
| 30 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertiesListedOnSpecialPageTestCase.php', |
| 31 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/PropertyTypePageIsDefaultTestCase.php', |
| 32 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithNumericValueTestCase.php', |
| 33 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SearchByPropertyWithStringValueTestCase.php', |
| 34 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ShowFactboxTestCase.php', |
| 35 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/UnusedPropertiesOnSpecialPageTestCase.php', |
| 36 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/WantedPropertiesOnSpecialPageTestCase.php', |
| 37 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildChainOfPropertiesInAQuery.php', |
| 38 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/EmbedValueWithShowParserFunction.php', |
| 39 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshLinkForEveryPage.php', |
| 40 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyAnnotationByWildcard.php', |
| 41 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SelectPagesByPropertyValue.php', |
| 42 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/RefreshInlineQuery.php', |
| 43 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/BuildInTypeNumber.php', |
| 44 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ChangeSeparatorForTypeNumber.php', |
| 45 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/CopyQuerySyntaxFromSpecialAsk.php', |
| 46 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSearchByProperty.php', |
| 47 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxLinksToSpecialBrowse.php', |
| 48 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/FactboxShowsProperties.php', |
| 49 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/SpecialAskProvidesGUIForQueries.php', |
| 50 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/ViewValuesOfPropertyOnSpecialPage.php', |
| 51 | + 'extensions/SemanticMediaWiki/tests/selenium/suites/cases_SMWSeleniumTestSuite/AnnotatePageWithProperty.php' |
| 52 | + |
| 53 | + ); |
| 54 | + parent::addTestFiles( $testFiles ); |
| 55 | + } |
| 56 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/SMWSeleniumTestSuite.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 57 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 58 | + native |
Index: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/TemplateTestCase.php |
— | — | @@ -0,0 +1,35 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Template test to be filled with PHP using Selenium, e.g., IDE: |
| 6 | + * @author b-kaempgen |
| 7 | + * |
| 8 | + */ |
| 9 | +class TemplateTestCase extends SeleniumTestCase { |
| 10 | + |
| 11 | + /** |
| 12 | + * Done up-front for setup and not testing |
| 13 | + */ |
| 14 | + public function testSetup() |
| 15 | + { |
| 16 | + ; |
| 17 | + } |
| 18 | + |
| 19 | + /** |
| 20 | + * Each of these methods... |
| 21 | + * * should have one assertion. |
| 22 | + * * should start with test, e.g., testTest(). |
| 23 | + */ |
| 24 | + public function testTest() |
| 25 | + { |
| 26 | + ; |
| 27 | + } |
| 28 | + |
| 29 | + /** |
| 30 | + * Done at the end to purge the test data. |
| 31 | + */ |
| 32 | + public function testTeardown() |
| 33 | + { |
| 34 | + ; |
| 35 | + } |
| 36 | +} |
Property changes on: trunk/extensions/SemanticMediaWiki/tests/selenium/suites/TemplateTestCase.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 37 | + LastChangedDate LastChangedRevision LastChangedBy Id |
Added: svn:eol-style |
2 | 38 | + native |