public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install WPML');
     $I->loginAsAdmin();
     $I->amGoingTo('Activate WPML Plugins');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('wpml-multilingual-cms');
     $I->amGoingTo('Configure WPML');
     $I->click('No thanks, I will configure myself');
     $I->click('Next');
     //Let's English as Default language
     $I->checkOption('Greek');
     $I->wait(1);
     $I->click('Next');
     $I->wait(5);
     $I->checkOption('form input[name=icl_lang_sel_footer]');
     $I->waitForElement(".button-primary", 15);
     $I->wait(1);
     $I->click('Next');
     $I->wait(3);
     $I->waitForElement(".button-primary", 15);
     $I->click('Remind me later');
     $I->wait(5);
     $I->click('Finish');
 }
 public function _before(AcceptanceTester $I)
 {
     $I->wantTo('Install and Configure WC');
     $I->loginAsAdmin();
     //Only if Run this test Seperately
     $I->amGoingTo('Activate Woocommerce Plugin');
     $I->amOnPluginsPage();
     //In order that the activatePlugin() works, the webdriver needs to be in Plugins page
     $I->activatePlugin('woocommerce');
     $I->amGoingTo('Run Woocommerce Setup');
     $I->waitForElement(".button-primary", 20);
     $I->click("Let's Go!");
     $I->waitForElement(".button-primary", 15);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->click("Continue");
     $I->wait(1);
     $I->checkOption('#woocommerce_enable_cod');
     $I->click("Continue");
     $I->waitForElement(".button-secondary", 15);
     $I->click("No thanks");
     $I->wait(1);
     $I->click("Return to the WordPress Dashboard");
 }
示例#3
0
 public function taxRates(AcceptanceTester $I)
 {
     $I->wantTo('test tax rates');
     $clientEmail = $this->faker->safeEmail;
     $productKey = $this->faker->text(10);
     $itemTaxRate = $this->faker->randomFloat(2, 5, 15);
     $itemTaxName = $this->faker->word();
     $invoiceTaxRate = $this->faker->randomFloat(2, 5, 15);
     $invoiceTaxName = $this->faker->word();
     $itemCost = $this->faker->numberBetween(1, 20);
     $total = $itemCost;
     $total += round($itemCost * $itemTaxRate / 100, 2);
     $total += round($itemCost * $invoiceTaxRate / 100, 2);
     // create tax rates
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $itemTaxName);
     $I->fillField(['name' => 'rate'], $itemTaxRate);
     $I->click('Save');
     $I->see($itemTaxName);
     $I->amOnPage('/tax_rates/create');
     $I->fillField(['name' => 'name'], $invoiceTaxName);
     $I->fillField(['name' => 'rate'], $invoiceTaxRate);
     $I->click('Save');
     $I->see($invoiceTaxName);
     // enable line item taxes
     $I->amOnPage('/settings/tax_rates');
     $I->checkOption('#invoice_item_taxes');
     $I->click('Save');
     // create product
     $I->amOnPage('/products/create');
     $I->fillField(['name' => 'product_key'], $productKey);
     $I->fillField(['name' => 'notes'], $this->faker->text(80));
     $I->fillField(['name' => 'cost'], $itemCost);
     $I->selectOption('select[name=default_tax_rate_id]', $itemTaxName . ' ' . $itemTaxRate . '%');
     $I->click('Save');
     $I->wait(1);
     $I->see($productKey);
     // create client
     $I->amOnPage('/clients/create');
     $I->fillField(['name' => 'contacts[0][email]'], $clientEmail);
     $I->click('Save');
     $I->see($clientEmail);
     // create invoice
     $I->amOnPage('/invoices/create');
     $I->selectDropdown($I, $clientEmail, '.client_select .dropdown-toggle');
     $I->fillField('table.invoice-table tbody tr:nth-child(1) #product_key', $productKey);
     $I->selectOption('#taxRateSelect', $invoiceTaxName . ' ' . $invoiceTaxRate . '%');
     $I->wait(2);
     // check total is right before saving
     $I->see("\${$total}");
     $I->click('Save');
     $I->wait(1);
     $I->see($clientEmail);
     // check total is right after saving
     $I->see("\${$total}");
     $I->amOnPage('/invoices');
     // check total is right in list view
     $I->see("\${$total}");
 }
示例#4
0
 /**
  * @depends deleteNewsNoTickConfirmation
  */
 public function deleteNewsTickConfirmation(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->amOnListNews();
     $I->click('Edit');
     $I->waitForText('Edit news item');
     $I->seeInCurrentUrl('/edit_news');
     $I->checkOption('#delete_confirmation');
     $I->click('Delete news item');
     $I->seeInCurrentUrl('/list_news');
     $I->dontSee('Edit');
 }
示例#5
0
 public function signUpAndGoPro(AcceptanceTester $I)
 {
     $userEmail = $this->faker->safeEmail;
     $userPassword = $this->faker->password;
     $I->wantTo('test purchasing a pro plan');
     $I->amOnPage('/invoice_now');
     $I->click('Sign Up');
     $I->wait(1);
     $I->checkOption('#terms_checkbox');
     $I->fillField(['name' => 'new_first_name'], $this->faker->firstName);
     $I->fillField(['name' => 'new_last_name'], $this->faker->lastName);
     $I->fillField(['name' => 'new_email'], $userEmail);
     $I->fillField(['name' => 'new_password'], $userPassword);
     $I->click('Save');
     $I->wait(1);
     $I->amOnPage('/dashboard');
     $I->click('Upgrade');
     $I->wait(1);
     $I->click('#changePlanButton');
     $I->wait(1);
     $I->click('Pay Now');
     $I->wait(1);
     $I->fillField(['name' => 'address1'], $this->faker->streetAddress);
     $I->fillField(['name' => 'address2'], $this->faker->streetAddress);
     $I->fillField(['name' => 'city'], $this->faker->city);
     $I->fillField(['name' => 'state'], $this->faker->state);
     $I->fillField(['name' => 'postal_code'], $this->faker->postcode);
     $I->selectDropdown($I, 'United States', '.country-select .dropdown-toggle');
     $I->fillField(['name' => 'card_number'], '4242424242424242');
     $I->fillField(['name' => 'cvv'], '1234');
     $I->selectOption('#expiration_month', 12);
     $I->selectOption('#expiration_year', date('Y'));
     $I->click('.btn-success');
     $I->wait(1);
     $I->see('Successfully applied payment');
     $I->amOnPage('/dashboard');
     $I->dontSee('Go Pro');
 }
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Create user roles for emarking and reserva de salas');
$I->login('admin', 'pepito.P0', 'Admin User');
// Rol Biblioteca
$I->amOnPage('admin/roles/define.php?action=add&lang=en');
$I->click('submitbutton');
$I->fillField('shortname', 'biblioteca');
$I->fillField('name', 'Biblioteca');
$I->checkOption('#cl10');
$I->checkOption('(//input[@name="local/reservasalas:advancesearch"])[2]');
$I->checkOption('(//input[@name="local/reservasalas:blocking"])[2]');
$I->checkOption('(//input[@name="local/reservasalas:bockinginfo"])[2]');
$I->checkOption('(//input[@name="local/reservasalas:libreryrules"])[2]');
$I->checkOption('(//input[@name="local/reservasalas:overwrite"])[2]');
$I->click('savechanges');
 */
$I->click('Tilføj ny plante');
/*
 * He now gets redirected to the creation page "create-new-plant".
 */
$I->seeInCurrentUrl('add-new-plant');
/*
 * Here he fills out the form.
 * Its a very special plant so he fills out all the information about the plant,
 * he even checks all the checkboxes.
 */
$I->fillField('#name', 'Test plant');
$I->fillField('#name_latin', 'Test plant latin');
$I->fillField('#description', 'Test description of a test plant');
$I->fillField('#history', 'Test history of a test plant');
$I->checkOption('spring');
$I->checkOption('summer');
$I->checkOption('autumn');
$I->checkOption('winter');
$I->checkOption('10');
// does not get tested
$I->checkOption('10-25');
$I->checkOption('25-40');
$I->checkOption('40-50');
$I->checkOption('50-75');
$I->checkOption('75-100');
$I->checkOption('100');
// does not get testec
$I->checkOption('red');
$I->checkOption('yellow');
$I->checkOption('blue');
示例#8
0
 /**
  * @depends deleteCategoryNoTickConfirmation
  */
 public function deleteCategoryTickConfirmation(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->makeCategoryAvailable(CI_EDITABLE_CATEGORY_ID);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $title = $I->grabValueFrom('title');
     $I->amOnAdminHome();
     $I->see($title);
     $I->amOnPage('/challenges');
     $I->see($title);
     $I->amOnPage('/scores');
     $I->see($title);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $I->checkOption('#delete_confirmation');
     $I->click('Delete category');
     $I->amOnAdminHome();
     $I->dontSee($title);
     $I->amOnPage('/challenges');
     $I->dontSee($title);
     $I->amOnPage('/scores');
     $I->dontSee($title);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $I->see('Error');
     $I->see('No category found with this ID');
 }
 /**
  * Create a 'developer' user with the 'developer' role
  *
  * @param \AcceptanceTester $I
  */
 public function createDeveloperTest(\AcceptanceTester $I)
 {
     $I->wantTo("Create a 'developer' user");
     // Set up the browser
     $I->setCookie('bolt_authtoken', $this->cookies['bolt_authtoken']);
     $I->setCookie('bolt_session', $this->cookies['bolt_session']);
     $I->amOnPage('/bolt/users');
     $I->click('Add a new user', Locator::href('/bolt/users/edit/'));
     $I->see('Create a new user account');
     // Fill in form
     $I->fillField('form[username]', $this->user['developer']['username']);
     $I->fillField('form[password]', $this->user['developer']['password']);
     $I->fillField('form[password_confirmation]', $this->user['developer']['password']);
     $I->fillField('form[email]', $this->user['developer']['email']);
     $I->fillField('form[displayname]', $this->user['developer']['displayname']);
     // Add the "developer" role
     $I->checkOption('#form_roles_3');
     // Submit
     $I->click('input[type=submit]');
     // Save is successful?
     $I->see("User {$this->user['developer']['displayname']} has been saved");
 }
示例#10
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('crud a page');
$I->login_admin();
// CREATE PAGE
$I->amOnPage('/oc-panel/content/create?type=page');
$I->see('Create Page', 'h1');
$I->fillField('#title', 'About');
$I->fillField('#description', 'All about us!!');
$I->fillField('#seotitle', 'about');
$I->checkOption('status');
$I->click('submit');
$I->seeElement('.alert.alert-success');
$I->see('Success');
// READ PAGE
$I->amOnPage('/about.html');
$I->see('About', 'h1');
$I->see('All about us!!');
// UPDATE PAGE
$I->amOnPage('/oc-panel/content/edit/13');
$I->see('Edit Page', 'h1');
$I->fillField('#title', 'About Us');
$I->fillField('#description', 'All you need to know about us!!');
$I->fillField('#seotitle', 'about-us');
$I->click('submit');
$I->seeElement('.alert.alert-success');
$I->see('page is edited');
// read updated page
$I->amOnPage('/about-us.html');
$I->see('About Us', 'h1');
示例#11
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Create user roles for emarking and reserva de salas');
$I->login('admin', 'pepito.P0', 'Admin User');
$I->amOnPage('/admin/roles/define.php?action=add');
$I->click('submitbutton');
$I->fillField('shortname', 'ayudante');
$I->fillField('name', 'Ayudante');
$I->checkOption('#cl10');
$I->checkOption('(//input[@name="mod/emarking:assignmarkers"])[2]');
$I->checkOption('(//input[@name="mod/emarking:grade"])[2]');
$I->checkOption('(//input[@name="mod/emarking:supervisegrading"])[2]');
$I->checkOption('(//input[@name="mod/emarking:view"])[2]');
$I->checkOption('(//input[@name="mod/emarking:viewpeerstatistics"])[2]');
$I->click('savechanges');
$I->see('Category created');
// Read 1
$I->amOnPage('/delete-category-one');
$I->dontSee('Page not found');
$I->see('Category to delete one', 'h1');
// Create 2
$I->amOnPage('/oc-panel/category/create');
$I->see('New Category');
$I->fillField('#formorm_name', 'Category to delete two');
$I->fillField('#formorm_seoname', 'delete-category-two');
$I->fillField('#formorm_description', 'Category to delete two');
$I->click('button[type="submit"]');
$I->see('Category created');
// Read 2
$I->amOnPage('/delete-category-two');
$I->dontSee('Page not found');
$I->see('Category to delete two', 'h1');
$I->amOnPage('/oc-panel/Category');
$I->checkOption('input[value="27"]');
$I->checkOption('input[value="28"]');
$I->click('delete');
$I->seeElement('.alert.alert-success');
$I->see('Category Category to delete one deleted');
$I->see('Category Category to delete two deleted');
// Read 1
$I->amOnPage('/delete-category-one');
$I->dontSee('Category to delete one', 'h1');
// Read 2
$I->amOnPage('/delete-category-two');
$I->dontSee('Category to delete two', 'h1');
$I->click('Logout');
示例#13
0
 /**
  * Create Delivery with specified parrameters
  * 
  * (array) $pay -string only if you transmit one payment method))
  * if you wont to skip some field type null
  * if you want to select several Payment methods transmit array
  * 
  * @param string            $name               Delivery name type off to skip
  * @param sting             $active             Active Checkbox on - enabled| off - disabled
  * @param string            $description        Method description type off to skip
  * @param string            $descriptionprice   Method price description type off to skip
  * @param int|float|string  $price              Delivery price type off to skip
  * @param int|float|string  $freefrom           Delivery free from type off to skip
  * @param string            $message            Delivery sum specified message type off to skip
  * @param string|array      $pay                Pass array or srting - Payment methods "_" - delimiter for few methods
  * @return void
  */
 protected function CreateDelivery(AcceptanceTester $I, $name = null, $active = null, $description = null, $descriptionprice = null, $price = null, $freefrom = null, $message = null, $pay = null)
 {
     $I->amOnPage('/admin/components/run/shop/deliverymethods/create');
     if (isset($name)) {
         $I->fillField(DeliveryCreatePage::$FieldName, $name);
     }
     if (isset($active)) {
         $I->checkOption(DeliveryCreatePage::$CheckboxActive);
     }
     if (isset($description)) {
         $I->fillField(DeliveryCreatePage::$FieldDescription, $description);
     }
     if (isset($descriptionprice)) {
         $I->fillField(DeliveryCreatePage::$FieldDescriptionPrice, $descriptionprice);
     }
     if (isset($price)) {
         $I->fillField(DeliveryCreatePage::$FieldPrice, $price);
     }
     if (isset($freefrom)) {
         $I->fillField(DeliveryCreatePage::$FieldFreeFrom, $freefrom);
     }
     if (isset($message)) {
         $I->checkOption(DeliveryCreatePage::$CheckboxPriceSpecified);
         $I->fillField(DeliveryCreatePage::$FieldPriceSpecified, $message);
     }
     if (isset($pay)) {
         foreach ((array) $pay as $value) {
             $I->click($value);
         }
     }
     $I->click(DeliveryCreatePage::$ButtonCreate);
     $I->wait("3");
 }
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Config SMS');
$I->login('admin', 'pepito.P0', 'Admin User');
$I->amOnPage('/admin/settings.php?section=modsettingemarking');
// Basic Config
$I->fillField('s__emarking_printsuccessinstructions', 'Mensaje de prueba');
$I->selectOption('#id_s__emarking_minimumdaysbeforeprinting', '2');
// Advanced Config
$I->fillField('s__emarking_parallelregex', '[0-9]+-[SV]-([0-9A-Z]+)-.*');
// Config SMS
$I->fillField('s__emarking_smsurl', 'http://api2.infobip.com/api/sendsms/xml');
$I->fillField('s__emarking_smsuser', 'UAI');
$I->fillField('s__emarking_smspassword', 'pepito.P0');
// Config Experimental
$I->checkOption('#id_s__emarking_enablejustice');
$I->checkOption('#id_s__emarking_justiceexperiment');
$I->checkOption('#id_s__emarking_enableprinting');
$I->fillField('s__emarking_printername', 'Mensaje de prueba');
$I->click('Save changes');
<?php

$I = new AcceptanceTester($scenario);
$I->am('the administrator');
$I->wantTo('crud a user custom field');
$I->login_admin();
$I->amOnPage('/oc-panel/userfields/new');
$I->see('New Custom Field', 'h1');
$I->fillField('name', 'telephone');
$I->fillField('label', 'telephone');
$I->fillField('tooltip', 'telephone');
$I->selectOption('form select[name="type"]', 'integer');
$I->checkOption('required');
$I->checkOption('searchable');
$I->checkOption('show_register');
$I->checkOption('show_profile');
$I->click('button[type="submit"]');
$I->see('Field telephone created');
$I->seeElement('.drag-item');
// delete all cache
$I->amOnPage('/oc-panel/tools/cache?force=1');
$I->see('All cache deleted');
// activate a premium theme to see the custom field!
$I->activate_theme('splash');
// delete all cache
$I->amOnPage('/oc-panel/tools/cache?force=1');
$I->see('All cache deleted');
// Not able to see my custom field from the test
// but it's displayed on http://reoc.lo/publish-new.html (Maybe an issue with PhpBrowser)
$I->amOnPage('/');
$I->click('Logout');
 public function systeminfo_セキュリティ管理SSL(\AcceptanceTester $I)
 {
     $I->wantTo('EA0804-UC01-T04 セキュリティ管理 - SSL強制');
     $testConfig = Fixtures::get('test_config');
     $I->amOnUrl('http://' . $testConfig['hostname'] . '/');
     $I->assertRegExp('/^http:\\/\\//', $I->executeJS('return location.href'), 'httpsにリダイレクトされない');
     $config = Fixtures::get('config');
     $I->amOnUrl('https://' . $testConfig['hostname'] . '/' . $config['admin_route'] . '/setting/system/security');
     $I->checkOption(['id' => 'admin_security_force_ssl']);
     $I->click('#aside_column div div div div div button');
     // httpでアクセスしたらhttpsにリダイレクトされる
     $I->amOnUrl('http://' . $testConfig['hostname'] . '/');
     $I->assertRegExp('/^https:\\/\\//', $I->executeJS('return location.href'), 'httpsにリダイレクトされる');
     // 後続テストのために戻しておく
     $I->amOnUrl('https://' . $testConfig['hostname'] . '/' . $config['admin_route'] . '/setting/system/security');
     $I->uncheckOption(['id' => 'admin_security_force_ssl']);
     $I->click('#aside_column div div div div div button');
 }
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Create user roles for emarking and reserva de salas');
$I->login('admin', 'pepito.P0', 'Admin User');
$I->amOnPage('/admin/roles/define.php?action=add');
$I->click('submitbutton');
$I->fillField('shortname', 'central_apuntes');
$I->fillField('name', 'Central de Apuntes');
$I->checkOption('#cl10');
$I->checkOption('#cl30');
$I->checkOption('#cl40');
$I->checkOption('(//input[@name="mod/emarking:downloadexam"])[2]');
$I->checkOption('(//input[@name="mod/emarking:receivenotification"])[2]');
$I->checkOption('(//input[@name="mod/emarking:printordersview"])[2]');
$I->click('savechanges');
$I->see('Location created');
// Read 1
$I->amOnPage('/all/delete-location-one');
$I->dontSee('Page not found');
$I->see('Location One', 'h1');
// Create 2
$I->amOnPage('/oc-panel/location/create');
$I->see('New Location');
$I->fillField('#name', 'Location Two');
$I->fillField('#seoname', 'delete-location-two');
$I->fillField('#description', 'Location to delete two');
$I->click('button[type="submit"]');
$I->see('Location created');
// Read 2
$I->amOnPage('/all/delete-location-two');
$I->dontSee('Page not found');
$I->see('Location Two', 'h1');
$I->amOnPage('/oc-panel/Location');
$I->checkOption('input[value="6"]');
$I->checkOption('input[value="7"]');
$I->click('delete');
$I->seeElement('.alert.alert-success');
$I->see('Location Location One deleted');
$I->see('Location Location Two deleted');
// Read 1
$I->amOnPage('/all/delete-location-one');
$I->dontSee('Location to delete one', 'h1');
// Read 2
$I->amOnPage('/all/delete-location-two');
$I->dontSee('Location to delete two', 'h1');
$I->click('Logout');
<?php

$I = new AcceptanceTester($scenario);
$I->am("the admin");
$I->wantTo('edit roles and see the changes');
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', '1234');
$I->click('auth_redirect');
$I->amOnPage('/oc-panel/');
$I->see('welcome admin');
// USER
// Update
$I->amOnPage('/oc-panel/Role/update/1');
$I->unCheckOption('profile|*');
$I->checkOption('profile|index');
$I->checkOption('profile|changepass');
$I->checkOption('profile|edit');
$I->checkOption('profile|notifications');
$I->checkOption('profile|public');
$I->checkOption('profile|ads');
$I->checkOption('profile|deactivate');
$I->checkOption('profile|activate');
$I->checkOption('profile|update');
$I->checkOption('profile|confirm');
$I->checkOption('profile|stats');
$I->click('submit');
$I->see('Item updated');
$I->amOnPage('/');
$I->click('Logout');
//login as a user
<?php

$I = new AcceptanceTester($scenario);
// Login successfully as the administrator
$I->am('the Administrator');
$I->wantTo('log in with valid account');
$I->lookForwardTo('see the welcome message in the Panel');
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', '1234');
$I->click('auth_redirect');
$I->see('welcome admin');
$I->wantTo('switch ON "only administrator can publish new ad"');
$I->amOnPage('/oc-panel/settings/form');
$I->see('Advertisement Configuration', 'h1');
$I->checkOption("#only_admin_post");
$I->click("submit");
//click save
$I->wantTo('logout and not to see publish new button');
$I->click("//a[@href='http://reoc.lo/oc-panel/auth/logout']");
$I->amOnPage('/');
$I->dontsee('publish new');
// bring it back to default option!
// login
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', '1234');
$I->click('auth_redirect');
// switch off only administrator can publish new ad
$I->amOnPage('/oc-panel/settings/form');
$I->see('Advertisement Configuration', 'h1');
<?php

//tests\acceptance\003_SimilarOrganizationName.php
$I = new AcceptanceTester($scenario);
$I->wantTo('Check similar organization name function');
$I->amOnPage('/register/staff');
$I->fillField("#staff_registration_organization_orgName", "Glenshire Maronite Fund");
$I->pressKey("#staff_registration_organization_orgName", "");
$I->waitForJS("return \$.active == 0;", 3);
$I->see("Glenshire Marmot Fund");
$I->checkOption("#orgNotListed");
$I->waitForJS("return \$.active == 0;", 3);
$I->dontSee("Glenshire Marmot Fund");
$orgName = $I->grabValueFrom("#staff_registration_organization_orgName");
$this->assertEquals($orgName, "Glenshire Maronite Fund");
示例#22
0
 /**
  * Fail creating a user where password matches user and display names and email address is invalid.
  *
  * @param \AcceptanceTester $I
  */
 public function createDerpaderpTest(\AcceptanceTester $I)
 {
     $I->wantTo('Fail creating a user where password matches user and display names and email address is invalid.');
     // Set up the browser
     $I->setCookie($this->tokenNames['authtoken'], $this->cookies[$this->tokenNames['authtoken']]);
     $I->setCookie($this->tokenNames['session'], $this->cookies[$this->tokenNames['session']]);
     $I->amOnPage('/bolt/users');
     $I->click('Add a new user', Locator::href('/bolt/users/edit/'));
     $I->see('Create a new user account');
     // Fill in form
     $I->fillField('form[username]', 'derpaderp');
     $I->fillField('form[password]', 'DerpADerp');
     $I->fillField('form[password_confirmation]', 'DerpADerp');
     $I->fillField('form[email]', 'derpaderp');
     $I->fillField('form[displayname]', 'Derpy Derpaderp');
     // Add the "admin" role
     $I->checkOption('#form_roles_2');
     // Submit
     $I->click('input[type=submit]');
     // Save is *not* successful?
     $I->see('Password must not match the username.');
     $I->see('Password must not be a part of the display name.');
     $I->see('This value is not a valid email address.');
 }
示例#23
0
<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Avoid to login with incorrect data');
$I->amOnPage('/apply.php?tourID=310');
$I->see('Вы собираетесь подать заявку в ЛИСТ ОЖИДАНИЯ на поход Лыжи: По монастырям Русского севера запланированного на даты 05.01.2016-09.01.2016');
$I->seeElement('#formLoginNewUser');
$I->seeElement('#formLogin #formLoginSubmit');
$I->fillField('#formLoginEmail', '*****@*****.**');
$I->fillField('#formLoginPassword', 'wrongpassword');
$I->click('#formLoginSubmit');
$I->canSee('неверный email или пароль');
$I->fillField('#formLoginEmail', '*****@*****.**');
$I->fillField('#formLoginPassword', 'wrongpassword');
$I->checkOption('#formLoginNewUser');
$I->click('#formLoginSubmit');
$I->canSee('данный e-mail уже зарегистрирован');
示例#24
0
$I->see('Basic Details');
$I->selectOption('id_domain', '101');
//Need to change Value every time before run
$I->selectOption('id_template', '101');
$I->fillField('campaign_id', '595');
$I->fillField('campaign_link', 'http://www.equinoxdna.com/o23new/direct_billing.php');
$I->fillField('website_title', 'Equinox DaynNight Serum Trial');
$I->fillField('company_id', '1');
$I->fillField('company_name', 'Equinox DaynNight Serum Trial');
$I->fillField('product_id', '4');
$I->fillField('product_name', 'Equinox DaynNight Serum Trial');
$I->fillField('email', 'abc' . $i . '@abc.com');
$I->fillField('cancel_order_email', 'abc' . $i . '@abc.com');
$I->selectOption('id_address', 'QA Address');
$I->selectOption('id_prices', 'QA Price');
$I->checkOption(['class' => 'show-hide-details', 'name' => 'is_us']);
$I->fillField('us_company_name', 'QA US' . $i . '');
$I->fillField('us_phone_number', '12345678901');
$I->selectOption('id_terms', 'QA Terms and Conditions');
$I->selectOption('id_privacy', 'QA Privacy policy');
$I->selectOption('id_ingredients', 'QA Ingredient');
$I->selectOption('id_disclaimer', 'QA Disclaimer');
$I->selectOption('id_billing_note', 'QA Billing Note');
$I->selectOption('id_billing_us', 'QA Billing US');
$I->selectOption('id_billing_uk', 'QA Billing UK');
$I->click(['class' => 'btn-primary']);
$I->see('Website added successfully');
$I->click('Logout');
$I->see('Login');
?>
$I->see('Item updated. Please to see the changes delete the cache');
/*************************
ACTIVATE BLOG
**************************/
// Enable Blog
$I->amOnPage('/oc-panel/Config/update/blog');
$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');
// Create Blog Post
$I->amOnPage('/oc-panel/Blog/create');
$I->see('Create Blog Post', 'h1');
$I->fillField('#formorm_title', 'First Post');
$I->fillField('#formorm_description', 'This is the First Post');
$I->checkOption('formorm[status]');
$I->click('submit');
$I->seeElement('.alert.alert-success');
$I->see('Blog post created. Please to see the changes delete the cache');
// Enable disqus for blog
$I->amOnPage('/oc-panel/Config/update/blog_disqus');
$I->fillField('formorm[config_value]', 'eshoplo');
$I->click('formorm[submit]');
$I->seeElement('.alert.alert-success');
$I->see('Item updated. Please to see the changes delete the cache');
// Read Blog
$I->amOnPage('/');
$I->see('Blog', 'a');
$I->amOnPage('/blog');
$I->see('Test OE Blog', 'h1');
$I->see('First Post', 'a');
<?php 
//barebones test of featured resource
$I = new AcceptanceTester($scenario);
$I->wantTo('make sure that featured resource is visible');
$I->amOnPage('/subjects/index.php');
$I->see("Featured Resource");
$I->amOnPage('/control/login.php');
$I->see('Please enter your credentials to proceed');
$I->fillField('Email', '*****@*****.**');
$I->fillField('Password', 'w3bm@n@g3r');
$I->click('Submit');
//changed course to featured
$I->click('Browse Items');
$I->click('Avalon Project');
$I->seeInCurrentUrl("control/records/record.php?record_id=261");
$I->checkOption('#featured');
$I->click("Save Record Now");
//check if it is featured
$I->amOnPage('/subjects/index.php');
$I->see("Avalon Project");
//undo above
$I->amOnPage('/control/login.php');
$I->see('Please enter your credentials to proceed');
$I->fillField('Email', '*****@*****.**');
$I->fillField('Password', 'w3bm@n@g3r');
$I->click('Submit');
$I->click('Browse Items');
$I->click('Avalon Project');
$I->seeInCurrentUrl("control/records/record.php?record_id=261");
$I->seeCheckboxIsChecked('#featured');
$I->checkOption('#featured');
$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");
// Delete BLOG
$I->amOnPage('/oc-panel/Blog/');
$I->see('Blog Post Title');
$I->click('.btn.btn-danger.index-delete');
sleep(1);
$I = new AcceptanceTester($scenario);
$I->am('the administrator');
$I->wantTo('crud a custom field');
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', '1234');
$I->click('auth_redirect');
$I->see('welcome admin');
$I->amOnPage('/oc-panel/fields/new');
$I->see('New Custom Field');
$I->fillField('name', 'My Custom Field');
$I->fillField('label', 'My Custom Field');
$I->fillField('tooltip', 'Test field for testing');
$I->selectOption('form select[name="type"]', 'string');
$I->checkOption('required');
$I->checkOption('searchable');
$I->checkOption('show_listing');
$I->click('button[type="submit"]');
$I->see('Field my_custom_field created');
$I->seeElement('.drag-item');
// delete all cache
$I->amOnPage('/oc-panel/tools/cache?force=1');
$I->see('All cache deleted');
/*
// activate a premium theme to see the custom field!
$I->amOnPage('/oc-panel/Config/update/theme');
$I->fillField('#formorm_config_value','splash');
$I->click('button[type="submit"]');
$I->see('Item updated. Please to see the changes delete the cache');