本文整理汇总了PHP中AcceptanceTester::seeInCurrentUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::seeInCurrentUrl方法的具体用法?PHP AcceptanceTester::seeInCurrentUrl怎么用?PHP AcceptanceTester::seeInCurrentUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::seeInCurrentUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteNewsTickConfirmation
/**
* @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');
}
示例2: _before
public function _before(\AcceptanceTester $I)
{
$I->am('guest user');
$I->amGoingTo('Load the homepage');
$I->amOnPage('/');
$I->seeInCurrentUrl('/');
}
示例3: editCategoryNotExposed
public function editCategoryNotExposed(AcceptanceTester $I)
{
$I->logInAsAnAdmin();
$I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
$title = time() . 'title';
$description = time() . 'body';
$from = date_time();
$until = date_time(time() + 10000);
$I->fillField('title', $title);
$I->fillField('description', $description);
$I->uncheckOption('#exposed');
$I->fillField('available_from', $from);
$I->fillField('available_until', $until);
$I->click('Save changes');
$I->waitForText('Edit category');
$I->seeInCurrentUrl('/edit_category');
$I->seeInField('title', $title);
$I->seeInField('description', $description);
$I->dontSeeCheckboxIsChecked('#exposed');
$I->seeInField('available_from', $from);
$I->seeInField('available_until', $until);
$I->amOnPage('/challenges');
$I->dontSee($title);
$I->amOnPage('/scores');
$I->dontSee($title);
}
示例4: it_prevents_guests_from_seeing_profiles
public function it_prevents_guests_from_seeing_profiles(AcceptanceTester $I)
{
$user = $this->userActor->create();
$I->amOnRoute('profile.show', $user->username);
$I->seeInCurrentUrl('auth/login');
$I->seeCurrentRouteIs('auth.login');
$I->dontSee('Profile of user');
}
示例5: seeMembers
public function seeMembers(\AcceptanceTester $I)
{
$I->am('guest user');
$I->amGoingTo('Load the members section');
$I->amOnPage('/');
$I->click('Members');
$I->seeInCurrentUrl('/members');
$I->see('Name');
$I->see('Role');
}
示例6: submitCorrect
public function submitCorrect(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, CI_DEFAULT_CHALLENGE_FLAG);
$I->click('#flag-submit-' . CI_DEFAULT_CHALLENGE_ID);
$I->seeInCurrentUrl('status=correct');
$I->dontSeeElement($flag_field);
}
示例7: register
public function register(\AcceptanceTester $I)
{
$I->amGoingTo('register');
$I->amOnPage('/auth/register');
$I->fillField('name', 'codeception');
$I->fillField('password', 'acceptance');
$I->fillField('email', 'marcel.patzwahl+cept@gmail.com');
$I->click('submit');
$I->see('Registered successfully!');
$I->seeLink('Go back to Home');
$I->click('Go back to Home');
$I->seeInCurrentUrl('/');
}
示例8: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('see note can not be edited without required fields');
$I->testLogin();
$I->amOnPage('/notes/1/edit');
$I->fillField('Name', '');
$I->fillField('Text', '');
$I->click('Save');
$I->seeInCurrentUrl('/notes/1/edit');
$I->see('Name is required');
$I->see('Text is required');
示例9: AcceptanceTester
$I = new AcceptanceTester($scenario);
//login as a user
$I->amOnPage('/oc-panel/auth/login');
$I->fillField('email', 'gazzasdasd@reoc.lo');
$I->fillField('password', '1234');
$I->click('auth_redirect');
$I->am("a user");
$I->wantTo('visit pages on the user dropdown menu');
$I->wantTo('see the panel');
//green profile button
$I->lookForwardTo('see the title "my advertisements" and url contains "/myads"');
$I->click("a[href='http://reoc.lo/oc-panel']");
$I->see('my advertisements', 'h1');
$I->dontSee('homepage');
$I->seeInCurrentUrl('/myads');
$I->amOnPage('/');
//back on homepage
$I->wantTo('see the my ads');
//my advertisements on dropdown menu
$I->lookForwardTo('see the title "my advertisements" and url contains "/myads"');
$I->click("a[href='http://reoc.lo/oc-panel/myads']");
$I->see('my advertisements', 'h1');
$I->dontSee('homepage');
$I->seeInCurrentUrl('/myads');
$I->amOnPage('/');
//back on homepage
$I->wantTo('see the my favorites');
//my favorites on dropdown menu
$I->lookForwardTo('see the title "my favorites" and url contains "/profile/favorites"');
$I->click("a[href='http://reoc.lo/oc-panel/profile/favorites']");
示例10: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantToTest('force password reset redirects properly');
// Test user
$I->haveInDatabase('users', ['id' => 1, 'email' => 'tester@example.com', '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' => 1]);
// First - ensure that we are logged out
$I->amOnPage('/logout');
$I->amOnPage('/login');
//--------------------------------------------------------------------
// Successfully login
//--------------------------------------------------------------------
$I->expect('am sent to change password page');
$I->seeElement('#submit');
$I->submitForm('#login_form', ['email' => 'tester@example.com', 'password' => 'mylittlepony'], '#submit');
$I->dontSeeElement('.alert-danger');
$I->see('Change Password');
$I->seeInCurrentUrl('password');
示例11: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->am('Guest Site User');
$I->wantTo('View a Product\'s Details Page');
$I->amOnPage('/');
$I->click('View');
$I->seeInCurrentUrl('/product/details/');
$I->see('Product Description');
$I->see('Checkout');
$I->see('Add To Cart');
示例12: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('see pad can not be created without required fields');
$I->testLogin();
$I->amOnPage('/pads/create');
$I->click('Save');
$I->dontSee('Example pad');
$I->seeInCurrentUrl('/pads/create');
$I->see('Name is required');
示例13:
$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???');
$I->click('Add Category');
$I->seeCurrentUrlEquals('/home');
$I->see('My Next Category');
$I->see('I can put whatever I want');
$I->wantTo('add a bookmark to Test Category');
$I->click('Test Category');
$I->seeInCurrentUrl('edit-category');
$I->see('This category has 0 bookmarks.');
$I->see('Add a Bookmark to this Category:');
$I->fillField('Bookmark Name', 'Laravel');
$I->fillField('Bookmark URL', 'https://laravel.com/');
$I->fillField('Bookmark Description', 'The PHP Framework for Web Artisans');
$I->click('Add Bookmark');
$I->seeInCurrentUrl('edit-category');
$I->see('This category has 1 bookmark.');
$I->see('Laravel');
$I->see('The PHP Framework for Web Artisans');
$I->wantTo('change the category description while I\'m here');
$I->see('Editing Category: Test Category');
$I->fillField('Category Description', 'The best damn category, period.');
$I->click('Save Changes');
$I->seeInCurrentUrl('edit-category');
示例14: AcceptanceTester
<?php
$userName = 'ad@min.com';
$I = new AcceptanceTester($scenario);
$I->wantTo('log in as regular user');
$I->amOnPage('/admin/login');
$I->appendField('login', $userName);
$I->appendField('password', 'admin');
$I->click('Войти');
$I->seeInCurrentUrl('/components/run/shop/dashboard');
//$I->amOnPage('/admin/');
//$I->click('//nav/ul/li[3]/a');
//$I->click('//nav/ul/li[3]/ul/li[1]/a');
//$I->waitForElement('.//*[@id="mainContent"]/section/div[1]/div[2]/div/a');
//$I->click('.//*[@id="mainContent"]/section/div[1]/div[2]/div/a');
//$I->waitForElement('#inputName');
//$I->appendField('#inputName', 'Категория');
//$I->click('a.chosen-single');
//$I->click('//div[@id="inputMainC_chosen"]/div/ul/li[4]');
//$I->click('//*[@id="mainContent"]/section/div/div[2]/div/button[2]');
//
//sleep('5');
$I->see;
示例15: AcceptanceTester
<?php
$i = new AcceptanceTester($scenario);
$i->wantTo('login in and see the panel');
$i->amOnPage('/login');
$i->fillField('_username', 'francesco.viglino');
$i->fillField('Password', 'testtest');
$i->click('Log in');
$i->seeInCurrentUrl('/');
$i->see('Welcome to Gpanel');