public function i_see_the_grid_buttons(\AcceptanceTester $I) { $I->clickNode('#creatorcreator-933e76acb06dec2ba6c31ba9c058a4e9-node'); $I->seeElement('button[data-creator-attribute-name="Name"]'); $I->seeElement('button[data-creator-attribute-name="Email"]'); $I->seeElement('button[data-creator-attribute-name="Password"]'); }
/** * @param AcceptanceTester $I */ public function testFindRafflerWinner(AcceptanceTester $I) { $I->amOnPage('/'); $visits = mt_rand(50, 1000); $I->seeElement('h1'); $i = 0; while ($visits > $i++) { $I->reloadPage(); $I->seeElement('h1'); } $winner = $I->grabTextFrom('h1'); $file = fopen("/vagrant/winner.txt", "w"); fwrite($file, PHP_EOL . "The winner is: " . $winner . PHP_EOL); fclose($file); }
function loginWithoutEmail(\AcceptanceTester $I, \Page\Login $loginPage) { $I->wantTo("Check login with No Email and Valid Password"); $loginPage->loginWithPasswordOnly('debby'); $I->seeElement('div[class = "control-group email error"]'); $I->dontSeeInCurrentUrl('activities'); }
/** * @test * it should render extended shortcode */ public function it_should_render_extended_shortcode(\AcceptanceTester $I) { $content = 'Lorem ipsum [idlikethis]Some idea of mine[/idlikethis]'; $I->havePostInDatabase(['post_name' => 'foo', 'post_content' => $content]); $I->amOnPage('/foo'); $text = "Some idea of mine"; $I->seeElement('.idlikethis-button[data-text="' . $text . '"] button'); }
/** * Tests add product to cart * * @group checkout * * @param $I \AcceptanceTester * */ public function testAddProductToCart(AT $I) { $I->am('Visitor'); $I->wantTo('Add product to cart'); $I->amGoingTo('open category page'); $I->amOnPage(Page\Catalog::$CATEGORY_URL); $I->expectTo('see category page'); $I->amGoingTo('open product page'); $I->click(Page\Catalog::$categoryFirstProduct); $I->expectTo('see product page'); $I->seeElement(Page\Catalog::$productBody); $I->amGoingTo('submit the form'); $I->submitForm(Page\Catalog::$addToCartForm, array()); $I->expectTo('see the cart page'); $I->seeCurrentUrlEquals(Page\Checkout::$CART_URL); $I->expectTo('see a success message'); $I->seeElement(Page\Catalog::$successMessage); }
/** * @depends openDocfiles */ public function addnewDocfiles(AcceptanceTester $I) { // excel $I->attachFile('UploadDocFile[docFile]', 'files/excel.xlsx'); $I->wait(2); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); $I->seeElement('//td/a[contains(text(),"excel.xlsx")]/preceding::td/span/i[@class="fa fa-file-excel-o"]/preceding::td/button[@title="Удалить"]'); $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "excel.xlsx"]'); // word $I->attachFile('UploadDocFile[docFile]', 'files/word.docx'); $I->wait(2); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); $I->seeElement('//td/a[contains(text(),"word.docx")]/preceding::td/span/i[@class="fa fa-file-word-o"]/preceding::td/button[@title="Удалить"]'); $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "word.docx"]'); // jpg $I->attachFile('UploadDocFile[docFile]', 'files/jpg.jpg'); $I->wait(2); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); $I->seeElement('//td/a[contains(text(),"jpg.jpg")]/preceding::td/span/i[@class="fa fa-file-image-o"]/preceding::td/button[@title="Удалить"]'); $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "jpg.jpg"]'); // png $I->attachFile('UploadDocFile[docFile]', 'files/png.png'); $I->wait(2); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); $I->seeElement('//td/a[contains(text(),"png.png")]/preceding::td/span/i[@class="fa fa-file-image-o"]/preceding::td/button[@title="Удалить"]'); $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "png.png"]'); //txt $I->attachFile('UploadDocFile[docFile]', 'files/text.txt'); $I->wait(2); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); $I->seeElement('//td/a[contains(text(),"text.txt")]/preceding::td/span/i[@class="fa fa-file-text-o"]/preceding::td/button[@title="Удалить"]'); $I->dontSeeElement('//span[@style="text-decoration: line-through" and text() = "text.txt"]'); //unknown $I->attachFile('UploadDocFile[docFile]', 'files/unknown.unk'); $I->wait(2); $I->see('Разрешена загрузка файлов только со следующими расширениями: png, jpg, jpeg, tiff, pdf, xls, xlsx, doc, docx, txt.'); $I->click('//a[contains(@title, "Загрузить выбранные файлы")]'); $I->wait(2); }
public function doFindTable(\AcceptanceTester $I) { $I->amGoingTo('find a table in the selected restaurant'); $I->lookForwardTo('reserve a reservation time slot'); $I->amOnPage('/reservation'); $I->seeElement('.panel-find-table'); $I->selectOption('location', 'Lewisham'); $I->selectOption('guest_num', '4'); $I->fillField('reserve_date', date('d-m-Y', strtotime('+ 1 month', time()))); $I->fillField('reserve_time', '2:45 PM'); $I->click('Find Table', '#find-table-form'); $I->expect('success with available reservation times slot displayed'); $I->seeElement('.panel-time-slots'); $I->seeNumberOfElements('#time-slots .btn-group > .btn', 5); // 5 elements $I->click('#time-slots .btn-group > .btn:nth-child(4)'); $I->click('Select Time', '#find-table-form'); $I->expectTo('see the reservation summary'); $I->seeElement('.panel-summary'); }
public function submitIncorrect(AcceptanceTester $I) { $I->logInAsANormalUser(); $I->amOnPage('/challenges?category=' . to_permalink(CI_DEFAULT_CATEGORY_TITLE)); $I->see(CI_DEFAULT_CHALLENGE_TITLE); $I->see(CI_DEFAULT_CHALLENGE_DESCRIPTION); $flag_field = '#flag-input-' . CI_DEFAULT_CHALLENGE_ID; $I->fillField($flag_field, 'NOT_THE_FLAG'); $I->click('#flag-submit-' . CI_DEFAULT_CHALLENGE_ID); $I->seeInCurrentUrl('status=incorrect'); $I->seeElement($flag_field); }
public function tryToTransferFundsBetweenMembers(AcceptanceTester $I) { $I->am('ewallet member'); $I->wantTo('pay a debt'); $I->lookForwardTo('transfer funds to my friend'); $I->amOnPage(TransferFundsPage::$formPage); $I->selectOption(TransferFundsPage::$toMember, 'Luis Montealegre'); $I->fillField(TransferFundsPage::$amount, 5); $I->click(TransferFundsPage::$transfer); $I->seeCurrentUrlMatches('/' . TransferFundsPage::$transferPage . '/'); $I->seeElement(TransferFundsPage::$successMessage); }
public function grabDragonInfo(AcceptanceTester $I) { $this->dragons = json_decode(file_get_contents('dragons.json')); foreach ($this->dragons as $index => $dragonName) { if (in_array($dragonName, array_keys($this->dragonInfo))) { continue; } $I->wantTo("Read data of dragon {$dragonName}"); $I->amOnPage("/wiki/{$dragonName}"); $I->waitForElementVisible("#WikiaPageHeader > div > div.header-column.header-title"); try { $I->see("Article {$dragonName} was not found"); } catch (\Exception $e) { unset($this->dragons[$index]); continue; } $isClassicDragon = true; try { $I->seeElement("#mw-content-text > table.infobox.Template > tbody"); } catch (\Exception $e) { $isClassicDragon = false; } if ($isClassicDragon) { $dragon = new Dragon(); $dragon->name = $dragonName; $dragon->fishPerHour = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Fish.png')]]/td[2]"); $dragon->woodPerHour = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Wood.png')]]/td[2]"); try { $dragon->collectionTime = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Time.png')]]/td[2]"); } catch (\Exception $e) { $dragon->collectionTime = "TODO: add"; } $dragon->iron = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Iron-Icon.png')]]/td[2]"); if ($dragon->iron != "Cannot Collect") { $dragon->ironCollectionTime = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Time.png')]][2]/td[2]"); } else { $dragon->ironCollectionTime = "Cannot Collect"; } try { $dragon->battleRange = $I->grabTextFrom("//*[@id=\"mw-content-text\"]/table[1]/tbody/tr[td//text()[contains(., 'Range_Icon.png')]]/td[2]"); } catch (\Exception $e) { $dragon->battleRange = "TODO: add"; } $this->dragonInfo[$dragonName] = $dragon; } else { $this->dragonInfo[$dragonName] = "Not classic dragon."; } } }
/** * @param \AcceptanceTester $I */ public function submitASession(AcceptanceTester $I) { $I->am('an attendee'); $I->wantTo('submit a session'); $I->expect('to be able a submit a new session'); // Login user. $I->amOnPage('/user/login'); $I->submitForm('#user-login-form', ['name' => 'user1', 'pass' => '123456']); $I->seeElement('body.user-logged-in'); // Fill session submission. $I->amOnPage('/node/add/session'); $node_title = $this->faker->text(30); $I->fillField('title[0][value]', $node_title); $I->fillCkEditorByName('body[0][value]', $this->faker->text(100)); $I->fillField('field_author[0][target_id]', 'user1 (2)'); $I->selectOption('field_exp_level', 0); $I->selectOption('field_session_track', 'development'); $I->makeScreenshot('session_form'); $I->submitForm('#node-session-form', [], 'op'); $I->makeScreenshot('session_view'); $I->see($node_title, '.l-content'); }
/** * @depends checkUniqueDolzh */ public function openUpdateDolzh(AcceptanceTester $I) { $I->click('//td[text()="МЕДСЕСТРА"]/preceding-sibling::td/a[@title="Обновить"]'); $I->wait(2); $I->fillField('Dolzh[dolzh_name]', 'Старшая медсестра'); $I->click('//button[contains(text(), "Обновить")]'); $I->wait(2); $I->seeElement(['id' => 'dolzhgrid_gw']); $I->see('СТАРШАЯ МЕДСЕСТРА'); }
$I->see('welcome admin'); // search_multi_catloc $I->amOnPage('/oc-panel/Config/update/search_multi_catloc'); $I->fillField('#formorm_config_value', '1'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/search.html'); $I->see('Search', 'h1'); $I->selectOption('form select[id=category]', array('Jobs', 'House')); $I->click("submit"); $I->see('title for the ad', 'a'); $I->see('just random title here', 'a'); $I->see('another great title', 'a'); $I->see('some nice title here', 'a'); $I->amOnPage('/search.html'); $I->see('Search', 'h1'); $I->selectOption('form select[id=location]', array('London', 'Madrid')); $I->click("submit"); $I->dontSee('title for the ad', 'a'); $I->dontSee('just random title here', 'a'); $I->see('another great title', 'a'); $I->see('some nice title here', 'a'); $I->amOnPage('/oc-panel/Config/update/search_multi_catloc'); $I->fillField('#formorm_config_value', '0'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/search.html?title=&category[]=house&category[]=jobs&price-min=&price-max=&submit='); $I->seeElement('div', ['id' => 'kohana_error']); $I->amOnPage('/search.html?title=&location[]=madrid&location[]=london&price-min=&price-max=&submit='); $I->seeElement('div', ['id' => 'kohana_error']); $I->amOnPage('/');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('verify the add new recipe page has required has information'); $I->amOnPage('/add-new-recipe'); $I->see('Tilføj ny opskrift til databasen', 'h2'); /* * Checking the basic information inputs exists */ $I->seeElement('#name'); $I->seeElement('#storage'); $I->seeElement('#guide'); /* * Checking the different types of recipes exists */ $I->seeElement('html/body/div[5]/form/div[1]/select/option[1]'); $I->seeElement('html/body/div[5]/form/div[1]/select/option[2]'); /* * Checking the tables exists */ $I->seeElement('table'); $I->seeElement('#plantTable'); $I->seeElement('#ingredientTable'); /* * Checking submit btn exists */ $I->seeElement('html/body/div[5]/form/div[3]/input'); /* * Checking the links exists */ $I->seeLink('Forside');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('see the main-header id on the main site header on a single site'); // set the theme to `_blogs` $I->haveOptionInDatabase('template', 'Twentysixteen'); $I->haveOptionInDatabase('stylesheet', '_blogs'); $I->haveOptionInDatabase('current_theme', '_Blogs'); // add a nav menu $menu_id = $I->haveTermInDatabase('Menu 1', 'nav_menu', ['slug' => 'menu1']); // set theme options to use the `primary` location $I->haveOptionInDatabase('theme_mods__blogs', ['nav_menu_locations' => ['primary' => $menu_id]]); // add one element to the menu $menu_item_id = $I->havePostInDatabase(['post_title' => 'theAverageDev', 'menu_order' => 1, 'post_type' => 'nav_menu_item']); $meta = ['_menu_item_type' => 'custom', '_menu_item_object_id' => $menu_item_id, '_menu_item_object' => 'custom', '_menu_item_url' => 'http://theaveragedev.com']; foreach ($meta as $key => $value) { $I->havePostmetaInDatabase($menu_item_id, $key, $value); } $I->amOnPage('/'); $I->seeElement('div#site-header-menu > nav.main-navigation'); $I->seeElement('div#site-header-menu > nav.main-header');
/** * @depends checkUniquePodraz */ public function openUpdatePodraz(AcceptanceTester $I) { $I->click('//td[text()="СТАЦИОНАР"]/preceding-sibling::td/a[@title="Обновить"]'); $I->wait(2); $I->fillField('Podraz[podraz_name]', 'Дневной стационар'); $I->click('//button[contains(text(), "Обновить")]'); $I->wait(2); $I->seeElement(['id' => 'podrazgrid_gw']); $I->seeElement('//td[text()="ДНЕВНОЙ СТАЦИОНАР"]'); // $I->see('ДНЕВНОЙ СТАЦИОНАР'); НЕ РАБОТАЕТ }
<?php $I = new AcceptanceTester($scenario); $I->wantTo('login a valid user'); // Test user $I->haveInDatabase('users', ['id' => 1, 'email' => '*****@*****.**', 'username' => 'tester', 'password_hash' => '$2y$10$wEzfeu4AdmR4mQSit3TCH.je1THv/Z8XqzDI4AOCov4lssqeA/gwS', 'created_on' => date('Y-m-d H:i:s', strtotime('-1 month')), 'active' => 1, 'deleted' => 0, 'force_pass_reset' => 0]); // First - ensure that we are logged out $I->amOnPage('/logout'); $I->amOnPage('/login'); //-------------------------------------------------------------------- // Error without info //-------------------------------------------------------------------- $I->expect('the form is not submitted'); $I->seeElement('#submit'); $I->submitForm('form', [], '#submit'); $I->seeElement('.alert-danger'); //-------------------------------------------------------------------- // Error without bad password //-------------------------------------------------------------------- $I->expect('error returned due to bad password'); $I->seeElement('#submit'); $I->submitForm('#login_form', ['email' => '*****@*****.**', 'password' => 'badstuff'], '#submit'); $I->seeElement('.alert-danger'); $I->expect('login attempt was logged'); $I->seeInDatabase('auth_login_attempts', ['email' => '*****@*****.**']); //-------------------------------------------------------------------- // Error without bad email //-------------------------------------------------------------------- $I->expect('error returned due to bad email'); $I->seeElement('#submit'); $I->submitForm('#login_form', ['email' => '*****@*****.**', 'password' => 'mylittlepony'], '#submit');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('ensure that Campaign create works'); // ADMIN $I->customerLogin(); $I->go(['/campaign/item/create']); // wrong data $I->testForm('#campaign-form', 'Item', ['owner_id' => 123], ['partner_type' => 123, 'title' => '', 'partners[]' => 3, 'date_start' => '28/12/2015', 'date_end' => '2015-12-28', 'date_delivery' => '2015-12-30']); // correct data $I->testForm('#campaign-form', 'Item', ['partner_type' => 0, 'title' => 'test campaign', 'partners[]' => 2, 'date_start' => date('Y-m-d'), 'date_end' => date('Y-m-d', strtotime('+5days')), 'date_delivery' => date('Y-m-d')]); $I->seeElement('.alert-success'); $updateUrl = $I->getUrl(); $id = preg_replace('/.*(\\d+)/', '$1', $updateUrl); // ADDING TEMPLATE $I->click('.template-add-link'); // I am on template select page $I->click('template 1'); // I am on template add form $I->testForm('form', 'Template', [], ['partners[]' => 1]); $I->testForm('form', 'Template', ['partners[]' => 2]); // I am on template view page $I->go($updateUrl); // I see added template in campaign $I->see('template 1', 'strong'); // ADDING MATERIAL $I->click('.material-add-button'); // I am on material add page $I->click('.material-add-image'); // I am on material add page $I->testForm('#material-form', 'Material', [], ['title' => '']);
<?php $I = new AcceptanceTester($scenario); $I->wantTo('change general settings'); $I->login_admin(); /************************* ENABLE MAINTENANCE MODE **************************/ $I->amOnPage('/oc-panel/Config/update/maintenance'); $I->fillField('#formorm_config_value', '1'); $I->click('formorm[submit]'); $I->seeElement('.alert.alert-success'); $I->see('Item updated. Please to see the changes delete the cache'); $I->seeElement('.alert.alert-info'); $I->see('You are in maintenance mode, only you can see the website'); $I->amOnPage('/'); $I->seeElement('.alert.alert-info'); $I->see('You are in maintenance mode, only you can see the website'); // Logout $I->amOnPage('/oc-panel/auth/logout'); $I->see('Login', 'a'); $I->amOnPage('/'); $I->seeElement('.jumbotron'); $I->see('We are working on our site, please visit later. Thanks'); $I->seeElement('.glyphicon.glyphicon-user'); $I->login_admin(); $I->amOnPage('/oc-panel/Config/update/maintenance'); $I->fillField('#formorm_config_value', '0'); $I->click('formorm[submit]'); $I->seeElement('.alert.alert-success'); $I->see('Item updated. Please to see the changes delete the cache');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('log in'); $I->amOnPage('/'); $I->switchToIFrame('topframe'); $I->fillField('login', 'admin'); $I->fillField('passwort', 'admin'); $I->executeJS('parent.setTimeout(window.stop, 3000)'); $I->click('input[type=submit][value=Login]'); $I->seeElement('frame[name=chat]');
$I = new AcceptanceTester($scenario); $I->am('a visitor'); $I->wantTo('publish a new ad'); $I->amOnPage('publish-new.html'); $I->see('Publish new advertisement', 'h1'); $I->fillField('#title', 'New ad'); $I->click('.select-category'); $I->fillField('category', '18'); $I->fillField('location', '4'); $I->fillField('#description', 'This is a new ad'); $I->attachFile('input[type="file"]', 'photo.jpg'); $I->fillField('#phone', '99885522'); $I->fillField('#address', 'barcelona'); $I->fillField('#price', '25'); $I->fillField('#website', 'https://www.google.com'); $I->fillField('#name', 'David'); $I->fillField('#email', '*****@*****.**'); $I->click('submit_btn'); $I->see('Advertisement is posted. Congratulations!'); $I->amOnPage('/apartment/new-ad.html'); $I->see('New ad', 'h1'); $I->see('25.00', 'span'); $I->see('Phone: 99885522', 'a'); $I->see('This is a new ad'); $I->see('Barcelona'); $I->seeElement('a', ['href' => 'http://reoc.lo/user/david']); $I->seeElement('a', ['href' => 'https://www.google.com']); // Check if user has created $I->amOnPage('/user/david'); $I->see('David', 'h3'); $I->dontSee('Page not found');
$I->fillField('email', '*****@*****.**'); $I->fillField('password', '1234'); $I->click('auth_redirect'); $I->see('welcome admin'); // Enable Featured Ads + Bring on Top $I->amOnPage('/oc-panel/Config/update/to_featured'); $I->fillField('#formorm_config_value', '1'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/oc-panel/Config/update/to_top'); $I->fillField('#formorm_config_value', '1'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); // Read $I->amOnPage('/oc-panel/myads'); $I->seeElement('.glyphicon.glyphicon-circle-arrow-up'); $I->see('Featured', 'a'); $I->amOnPage('/jobs/some-nice-title-here.html'); $I->see('Your Advertisement can go on top again! For only', 'p'); $I->see('Go Top!', 'a'); $I->see('Your Advertisement can go to featured! For only', 'p'); $I->see('Go Featured!', 'a'); // Back to default $I->amOnPage('/oc-panel/Config/update/to_featured'); $I->fillField('#formorm_config_value', '0'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/oc-panel/Config/update/to_top'); $I->fillField('#formorm_config_value', '0'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache');
<?php $I = new AcceptanceTester($scenario); $I->am('Website Visitor'); $I->wantTo('ensure that frontpage loads without errors'); $I->amGoingTo('go to the homepage'); $I->lookForwardTo('logging in'); $I->amOnPage('/'); $I->seeElement('input[type=username]'); $I->seeElement('input[type=password]');
use yii\helpers\Url; /* @var $scenario Codeception\Scenario */ $I = new AcceptanceTester($scenario); $I->wantTo('vérifier que la page cms/web-texts/index fonctionne bien'); $pageUrl = Url::to(['/cms/web-texts/index']); $wait = 1; // secondes $I->checkAccessFiltersAndLog($pageUrl, '*****@*****.**', 'ew0oVQQkaCvCGwmIxK7a', 'Liste des textes'); $I->expect('le lien de création fonctionne'); $I->seeLink('Ajouter un texte'); $I->click('Ajouter un texte'); $I->see('Ajouter un texte', 'h1'); $I->expect('le lien de mise à jour fonctionne'); $I->amOnPage(Url::to(['/cms/web-texts/index'])); $url = Url::to(['/cms/web-texts/update', 'id' => 2], true); $I->seeElement(['css' => 'a[href="' . $url . '"]']); $I->click(['css' => 'a[href="' . $url . '"]']); $I->wait($wait); $I->see('Modifier un texte', 'h1'); $I->expect('le lien vers la fiche fonctionne'); $I->amOnPage(Url::to(['/cms/web-texts/index'])); $url = Url::to(['/cms/web-texts/view', 'id' => 2], true); $I->seeElement(['css' => 'a[href="' . $url . '"]']); $I->click(['css' => 'a[href="' . $url . '"]']); $I->wait($wait); $I->see('Fiche d\'un texte', 'h1'); $I->expect('la suppression fonctionne'); $I->amOnPage(Url::to(['/cms/web-texts/index'])); $url = Url::to(['/cms/web-texts/delete', 'id' => 2], true); $I->seeElement(['css' => 'a[href="' . $url . '"]']); $I->click(['css' => 'a[href="' . $url . '"]']);
$I = new AcceptanceTester($scenario); $I->am('the administrator'); $I->wantTo('enable disqus for Blog and FAQ'); $I->login_admin(); // Disqus for Blog $I->amOnPage('/oc-panel/Config/update/blog_disqus'); $I->fillField('#formorm_config_value', 'testoc'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/oc-panel/Config/update/blog'); $I->fillField("#formorm_config_value", '1'); $I->click("//button[@type='submit']"); //click save $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/'); $I->seeElement('a', ['href' => 'http://reoc.lo/blog']); // Create $I->amOnPage('/oc-panel/Blog/create'); $I->fillField('#formorm_title', 'Blog Post Title'); $I->fillField('#formorm_description', 'This is my test post on my Blog.'); $I->checkOption('#status'); $I->click("submit"); //click create // Read $I->amOnPage('/blog'); $I->see('Blog Post Title'); $I->click("a[href='http://reoc.lo/blog/blog-post-title.html']"); //click create $I->see('Blog Post Title', 'h1'); $I->see('This is my test post on my Blog'); $I->see("comments powered by Disqus");
<?php $I = new AcceptanceTester($scenario); $I->wantTo('add a new address field with custom options.'); $I->login('tester', 'test'); $I->amOnPage('/wp/wp-admin/post.php?post=4&action=edit'); $I->click('+ Add Field'); $I->fillField('.field-label', 'acf address custom test field'); $I->selectOption('form select.field-type', 'address'); $I->wait(2); $I->seeElement('.acf-address-1-row'); $I->wantTo('make changes to the default address settings.'); // has the form ${obj.id}-${widgetCount} $I->uncheckOption('#street2-1'); $I->wait(1); // has the form ${obj.id}-li-movable-${widgetCount} $I->dontSeeElement('#street2-li-movable-1'); $I->click('#publish'); $I->see('Field group updated.'); $I->wantTo('make sure my changes were persisted.'); $I->dontSeeCheckboxIsChecked('#street2-1'); $I->dontSeeElement('#street2-li-movable-1');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('Login as admin and test admin functionality'); $I->amOnPage('/signin'); $I->fillField('#email', '*****@*****.**'); $I->fillField('#password', 'password'); $I->click('.btn-signin'); $I->reloadPage(); $I->click('.user-menu-desktop'); $I->click('.admin_link_desktop'); $I->see('Admin Functionality'); $I->seeElement('.fa-picture-o'); $I->click('[data-section="comments"]'); $I->seeElement('.fa-comments'); $I->click('[data-section="users"]'); $I->seeElement('.fa-user'); $I->click('[data-section="categories"]'); $I->seeElement('.fa-list'); $I->click('[data-section="pages"]'); $I->seeElement('.fa-file'); $I->click('[data-section="settings"]'); $I->seeElement('.fa-cog'); $I->click('[data-section="custom_code"]'); $I->seeElement('.fa-code');
$I->see('Theme configuration updated'); $I->amOnPage('/'); $I->see('Homepage site slogan'); $I->amOnPage('/oc-panel/theme/options'); $I->fillField('#home_slogan', 'Search and place ads easily with open classifieds'); $I->click('submit'); $I->see('Theme configuration updated'); $I->amOnPage('/'); $I->see('Search and place ads easily with open classifieds'); $I->wantTo('activate Reclassifieds3 theme'); $I->amOnPage('/oc-panel/Config/update/theme'); $I->fillField('#formorm_config_value', 'reclassifieds3'); $I->click('button[type="submit"]'); $I->see('Item updated. Please to see the changes delete the cache'); $I->amOnPage('/housing'); $I->seeElement('.breadcrumb'); $I->amOnPage('/oc-panel/theme/options'); $I->selectOption('breadcrumb', '0'); $I->click('submit'); $I->see('Theme configuration updated'); $I->amOnPage('/housing'); $I->dontSeeElement('.breadcrumb'); $I->amOnPage('/oc-panel/theme/options'); $I->selectOption('breadcrumb', '1'); $I->click('submit'); $I->see('Theme configuration updated'); $I->amOnPage('/housing'); $I->seeElement('.breadcrumb'); $I->wantTo('activate Newspaper theme'); $I->amOnPage('/oc-panel/Config/update/theme'); $I->fillField('#formorm_config_value', 'newspaper');
<?php $I = new AcceptanceTester($scenario); $I->wantTo('ensure that User create work'); // ADMIN $I->login(); $I->go(['/user/user/create']); $I->testForm('#user-form', 'User', [], ['username' => 'admin', 'owner_id' => 'asd', 'email' => 123, 'phone' => 'DN', 'password' => '', 'notify' => 'DN', 'permissions[]' => 'uploader']); $I->testForm('#user-form', 'User', ['username' => 'test', 'owner_id' => '1', 'email' => '*****@*****.**', 'phone' => '+79125675656', 'password' => 'admin', 'notify' => '1', 'permissions[]' => 'partner']); $I->seeElement('.alert-success'); //CUSTOMER $I->customerLogin(); $I->go(['/user/user/create']); $I->testForm('#user-form', 'User', [], ['username' => 'admin', 'owner_id' => 3, 'email' => 123, 'phone' => 'DN', 'password' => '', 'notify' => 'DN', 'permissions[]' => 'root']); $I->testForm('#user-form', 'User', ['username' => 'test1', 'owner_id' => '2', 'email' => 'test1@test1.test1', 'phone' => '+79125675656', 'password' => 'admin', 'notify' => '1', 'permissions[]' => 'partner']); $I->seeElement('.alert-success');
<?php /** * ownCloud - gallery * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Olivier Paroz <*****@*****.**> * * @copyright Olivier Paroz 2015 */ use Page\Login as LoginPage; $I = new AcceptanceTester($scenario); $I->am('A standard user'); $I->wantTo('ensure that I can see the login page'); $I->amOnPage(LoginPage::$URL); $I->seeElement(LoginPage::$loginButton);