Making those of SeleniumTestConstants.php into class constants.
for i in $(grep -o 'const [A-Z_]*' SeleniumTestConstants.php | cut -c 7-); do
find -name \*.php -and -not -name SeleniumTestConstants.php -exec sed -i s/$i/SeleniumTestConstants::$i/g \{\} +
done
24 lines
718 B
PHP
24 lines
718 B
PHP
<?php
|
|
|
|
class SeleniumTestConstants {
|
|
const WIKI_TEST_WAIT_TIME = 3000; // Waiting time
|
|
|
|
//commonly used links
|
|
const LINK_MAIN_PAGE = 'link=Main page';
|
|
const LINK_RANDOM_PAGE = 'link=Random article';
|
|
const TEXT_PAGE_HEADING = 'firstHeading';
|
|
|
|
const LINK_START = 'link=';
|
|
const TEXT_EDITOR = 'wpTextbox1';
|
|
const LINK_PREVIEW = 'wpPreview';
|
|
const LINK_EDIT = 'link=Edit';
|
|
|
|
const WIKI_SEARCH_PAGE = 'Hair (musical)'; // Page name to search
|
|
const WIKI_TEXT_SEARCH = 'TV'; // Text to search
|
|
const WIKI_INTERNAL_LINK = 'Wikieditor-Fixture-Page'; // Exisiting page name to add as an internal tag
|
|
|
|
const INPUT_SEARCH_BOX = 'searchInput';
|
|
const BUTTON_SEARCH = 'mw-searchButton';
|
|
const BUTTON_SAVE = 'wpSave';
|
|
}
|
|
|