本文整理汇总了PHP中AcceptanceTester::seeCurrentUrlEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::seeCurrentUrlEquals方法的具体用法?PHP AcceptanceTester::seeCurrentUrlEquals怎么用?PHP AcceptanceTester::seeCurrentUrlEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::seeCurrentUrlEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loginWithInvalidCredentials
public function loginWithInvalidCredentials(AcceptanceTester $I)
{
$I->amOnPage('/login');
$I->click('Login');
$I->seeCurrentUrlEquals('/login');
$I->see('Invalid Credentials', '.flash');
}
示例2: editTask
public function editTask(AcceptanceTester $I)
{
$description = $this->faker->text(100);
$I->wantTo('edit a task');
$I->amOnPage('/tasks/1/edit');
$I->seeCurrentUrlEquals('/tasks/1/edit');
$I->fillField('#description', $description);
$I->click('Save');
$I->seeInDatabase('tasks', ['description' => $description]);
}
示例3: editClient
public function editClient(AcceptanceTester $I)
{
$I->wantTo('Edit a client');
//$id = Helper::getRandom('Client', 'public_id');
//$url = sprintf('/clients/%d/edit', $id);
$url = '/clients/1/edit';
$I->amOnPage($url);
$I->seeCurrentUrlEquals($url);
//update fields
$name = $this->faker->firstName;
$I->fillField(['name' => 'name'], $name);
$I->click('Save');
$I->see($name);
}
示例4: testAddProductToCart
/**
* 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);
}
示例5: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('Site Administrator');
$I->wantTo('Add a new Product');
$I->amLoggedAs($I->aSiteAdministrator());
$I->amOnPage('/admin/products');
$I->click('Add Product');
$I->seeCurrentUrlEquals('/admin/products/create');
$category = \App\Repositories\Category::get()->toArray();
$I->selectOption('category', $category[0]['id']);
$I->fillField('name', 'Malt Liquor');
$I->fillField('description', 'Malt Liquor for you to describe');
$I->fillField('price', '34.00');
$I->fillField('quantity', '150');
$I->selectOption('status', '1');
$I->attachFile('image', 'roundrect8537796.gif');
$I->click('Create Product');
$I->seeCurrentUrlEquals('/admin/products');
$I->see('New Product: Malt Liquor Created');
示例6: AcceptanceTester
<?php
/**
* @link http://www.diemeisterei.de/
* @copyright Copyright (c) 2015 diemeisterei GmbH, Stuttgart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that language urls and redirects work');
$I->amOnPage('/');
$I->seeCurrentUrlEquals('/en/user/login');
$I->amOnPage('/de');
$I->seeCurrentUrlEquals('/de/user/login');
$I->see('Anmelden');
$I->makeScreenshot('language-de');
$I->amOnPage('/en-us');
$I->see('Not Found');
示例7: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('Validate the login function with zhaobing\' email and password! ');
$I->amOnPage('/');
$I->see('赵兵的电影');
$I->canSeeInCurrentUrl('/auth/login');
$I->fillField('email', 'zhaobing024@gmail.com');
$I->fillField('password', '123456');
$I->click('Login');
$I->seeCurrentUrlEquals('/movies');
$I->see('欢迎赵兵登录');
示例8: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('Site Administrator');
$I->wantTo('View all products');
$I->amLoggedAs($I->aSiteAdministrator());
$I->amOnPage('/admin/dashboard');
$I->click('Products');
$I->seeCurrentUrlEquals('/admin/products');
$I->see('Products Administration');
示例9: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('Site User');
$I->wantTo('Be restricted from the Administrator\'s section');
$I->amLoggedAs($I->siteUser());
$I->amOnPage('/admin/dashboard');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/categories');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/products');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/administrators');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/clients');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
示例10: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('see the Home page');
$I->amOnPage('/');
$I->see('My albums');
$I->seeInDatabase('album', array('artist' => 'Adele', 'title' => '21'));
$I->seeLink('Add new album');
$I->click('Add new album');
$I->see('Title');
$I->see('Artist');
$I->seeCurrentUrlEquals('/album/add');
$I->fillField('title', 'foo');
$I->fillField('artist', 'bar');
// enable repopulate and cleanup in codeception.yml to reset the db before each test
// enabld module Db in acceptance.suite.yml to use this feature
// click submit to add the new album
//$I->dontSee('foo');
//$I->click('submit');
//$I->see('foo');
示例11: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('test everything under the sun... one moment...');
$I->wantTo('sign up for a new account');
$I->amOnPage('/register');
$I->fillField('Name', 'Test User');
$I->fillField('Email Address', 'test.user@gmail.com');
$I->fillField('Password', 'batman');
$I->fillField('Confirm Password', 'batman');
$I->click('Sign Up');
$I->seeCurrentUrlEquals('/home');
$I->wantTo('sign out and check I can log back in successfully');
$I->see('Sign Out');
$I->click('Sign Out');
$I->seeCurrentURlEquals('/');
$I->amOnPage('/login');
$I->fillField('Email Address', 'test.user@gmail.com');
$I->fillField('Password', 'batman');
$I->click('Log In');
$I->seeCurrentUrlEquals('/home');
$I->wantTo('add a category and get started');
$I->amOnPage('/home');
$I->see('Add a Category Below');
$I->fillField('Category Name', 'Test Category');
$I->click('Add Category');
$I->seeCurrentUrlEquals('/home');
$I->see('Test Category');
$I->wantTo('add another category');
$I->fillField('Category Name', 'My Next Category');
$I->fillField('Category Description', 'I can put whatever I want here???');
示例12: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('Site User');
$I->wantTo('Log in as a Site User');
$I->amOnPage('/');
$I->click('Login');
$I->seeCurrentUrlEquals('/auth/login');
$I->fillField('email', 'jbmatikinye@gmail.com');
$I->fillField('password', 'joshua');
$I->click('login_user');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('User Dashboard');
示例13: AcceptanceTester
<?php
/**
* ownCloud - galleryplus
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Olivier Paroz <owncloud@interfasys.ch>
*
* @copyright Olivier Paroz 2015
*/
use Page\Acceptance\Login;
use Page\Gallery as GalleryPage;
$I = new AcceptanceTester($scenario);
$I->am('a standard user');
$I->wantTo('load the Gallery+ app');
$I->lookForwardTo('seeing my holiday pictures');
$loginPage = new Login($I);
$loginPage->login('admin', 'admin');
$loginPage->confirmLogin();
$I->click('.menutoggle');
$I->click('Gallery+', '#navigation');
$I->seeCurrentUrlEquals(GalleryPage::$URL);
$I->seeElement(GalleryPage::$contentDiv);
示例14: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('a guest');
$I->wantTo('clean slug and redirect');
$I->amOnPage('test@');
$I->seeCurrentUrlEquals('/testat');
$I->amOnPage(' this will have dash between');
$I->seeCurrentUrlEquals('/this-will-have-dash-between');
$I->amOnPage('password@/login');
$I->seeCurrentUrlEquals('/passwordat');
示例15: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('a guest');
$I->wantTo('have password prompt if page is protected');
$I->amOnPage('password');
$I->seeCurrentUrlEquals('/password/login');