当前位置: 首页>>代码示例>>PHP>>正文


PHP WebGuy::dontSee方法代码示例

本文整理汇总了PHP中WebGuy::dontSee方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::dontSee方法的具体用法?PHP WebGuy::dontSee怎么用?PHP WebGuy::dontSee使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebGuy的用法示例。


在下文中一共展示了WebGuy::dontSee方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('ensure that contact works');
$I->amOnPage('?r=site/contact');
$I->see('Contact', 'h1');
$I->submitForm('#contact-form', []);
$I->see('Contact', 'h1');
$I->see('Name cannot be blank');
$I->see('Email cannot be blank');
$I->see('Subject cannot be blank');
$I->see('Body cannot be blank');
$I->see('The verification code is incorrect');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester.email', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSee('Name cannot be blank', '.help-inline');
$I->see('Email is not a valid email address.');
$I->dontSee('Subject cannot be blank', '.help-inline');
$I->dontSee('Body cannot be blank', '.help-inline');
$I->dontSee('The verification code is incorrect', '.help-inline');
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester@example.com', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->dontSeeElement('#contact-form');
$I->see('Thank you for contacting us. We will respond to you as soon as possible.');
开发者ID:pathman,项目名称:yii-basic,代码行数:22,代码来源:ContactCept.php

示例2: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('be denied "publish" permissions on Pages as pagewriter user');
$I->loginAs($users['pagewriter']);
$I->see('New Page');
$I->click('New Page');
$I->see('Actions for this Page');
$I->fillField('title', 'A page I made');
$I->fillField('teaser', 'Woop woop woop! Crazy nice stuff inside!');
$I->fillField('body', 'Take it, take it! I have three more of these!');
// make sure the page cannot be published by setting its status in the
// edit form
$I->dontSeeInField('status', 'Published');
// let's save this page anyway, because we'll be needing it...
$I->click('Save Page');
// also check that the "publish page" context menu option isn't shown
$I->amOnPage('bolt');
$I->dontSee('Publish Page');
开发者ID:Hoplite-Software,项目名称:observatory,代码行数:19,代码来源:012-pagesEditorCannotPublishPagesCept.php

示例3: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('ensure that login works');
$I->amOnPage('?r=site/login');
$I->see('Application', 'h1');
$I->submitForm('#login-form', array());
$I->dontSee('Logout (admin)');
$I->see('Username cannot be blank');
$I->see('Password cannot be blank');
$I->submitForm('#login-form', array('LoginForm[username]' => 'admin', 'LoginForm[password]' => 'wrong'));
$I->dontSee('Logout (admin)');
$I->see('Incorrect username or password');
$I->submitForm('#login-form', array('LoginForm[username]' => 'admin', 'LoginForm[password]' => 'admin'));
$I->see('Logout (admin)');
开发者ID:crisu83,项目名称:yii-app,代码行数:15,代码来源:LoginCept.php

示例4: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('ensure that frontpage works');
$I->see('Welcome');
$I->see('CodeIgniter');
$I->dontSee('Error');
开发者ID:ashiina,项目名称:ci3-tdd-stack,代码行数:7,代码来源:WelcomeCept.php

示例5:

$I->see('Email cannot be blank.');
$I->see('First Name cannot be blank.');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
$I->see('Confirm Password cannot be blank.');
// signup with invalid email
$I->amOnPage('/account/account/signUp');
$I->fillField('AccountSignUp_first_name', 'demo_first_name');
$I->fillField('AccountSignUp_last_name', 'demo_last_name');
$I->fillField('AccountSignUp_email', 'demo!mailinator.com');
$I->fillField('AccountSignUp_username', 'demo');
$I->fillField('AccountSignUp_password', 'demo123');
$I->fillField('AccountSignUp_confirm_password', 'demo123');
$I->click('Sign Up');
$I->see('Please fix the following input errors:');
$I->dontSee('Email cannot be blank.');
$I->dontSee('First Name cannot be blank.');
$I->dontSee('Username cannot be blank.');
$I->dontSee('Password cannot be blank.');
$I->dontSee('Confirm Password cannot be blank.');
$I->dontSee('Password cannot be blank.');
$I->see('Email is not a valid email address.');
// signup with mismatching password
$I->amOnPage('/account/account/signUp');
$I->fillField('AccountSignUp_first_name', 'demo_first_name');
$I->fillField('AccountSignUp_last_name', 'demo_last_name');
$I->fillField('AccountSignUp_email', 'demo@mailinator.com');
$I->fillField('AccountSignUp_username', 'demo');
$I->fillField('AccountSignUp_password', 'demo123');
$I->fillField('AccountSignUp_confirm_password', 'demo321');
$I->click('Sign Up');
开发者ID:cornernote,项目名称:yii-account-module,代码行数:31,代码来源:AccountAccountControllerSignUpCept.php

示例6:

$I->amOnPage('/account/account/login');
$I->see('Username');
$I->see('Password');
$I->see('Remember me next time');
// login with empty details
$I->amOnPage('/account/account/login');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
// login with empty password
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->dontSee('Username cannot be blank.');
$I->see('Password cannot be blank.');
// login with empty username
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->see('Username cannot be blank.');
$I->dontSee('Password cannot be blank.');
// login with correct username
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('You have successfully logged in.');
// check login name
开发者ID:cornernote,项目名称:yii-account-module,代码行数:31,代码来源:AccountAccountControllerLoginCept.php

示例7: foreach

        $I->wait(2);
        $I->click('Publish', '#publishing-action');
        $I->see('Post Published');
        $I->seeCheckboxIsChecked('#pubcode_' . $authcode['name']);
    }
    $I->amGoingTo('Log Out so we can check that the content is password protected');
    $WP->logout();
    $I->amGoingTo('Test the protected content');
    foreach ($pubcodes[$a] as $authcode) {
        $I->amOnPage('/');
        $I->click('Test Post for ' . $authcode['description']);
        $I->see('Enter your username and password below');
        $I->fillField('log', $sample_accounts[$a]['username']);
        $I->fillField('pwd', $sample_accounts[$a]['password']);
        $I->click('Log In');
        $I->see($sample_accounts[$a]['expected_results'][$authcode['name']]);
        $WP->logout();
    }
    $I->amGoingTo('Log in as admin');
    $WP->admin_login();
    $I->amGoingTo('Delete the ' . $a . ' pubcodes');
    $I->amOnPage($plugins['auth']['admin_page']);
    foreach ($pubcodes[$a] as $authcode) {
        $I->amGoingTo('Delete ' . $authcode['name']);
        $I->click('#delete_' . $authcode['name']);
        $I->acceptPopup();
        $I->waitForJS('return jQuery.active == 0', 5);
        $I->dontSee($authcode['description']);
    }
    $WP->logout();
}
开发者ID:gargallo,项目名称:tfs-test,代码行数:31,代码来源:AuthPluginCept.php

示例8: dontSeeContentAfterFailedAuthentication

 /**
  * Test we see expected content in page after authentication.
  *
  * @param WebGuy $I
  *   The Guy object being used to test.
  *
  * @env misconfigured
  */
 public function dontSeeContentAfterFailedAuthentication(WebGuy $I)
 {
     $I->amOnPage(self::HTTP_AUTH_PROTECTED_PATH);
     $I->dontSee(self::HTTP_AUTH_EXPECTED_PROTECTED_PAGE_CONTENT);
 }
开发者ID:ixis,项目名称:codeception-module-http-auth,代码行数:13,代码来源:HttpAuthenticationCest.php

示例9: WebGuy

<?php

/**
 * this acceptance test expects the path http://localhost/winkform/ to point to the directory /example/
 * All input elements are inside the TestForm and rendered in the example.
 */
$I = new WebGuy($scenario);
$I->wantTo('see the test form');
$I->amOnPage('/');
$I->see('form', '#container');
// no errors or warnings must be displayed
$I->dontSee('error');
$I->dontSee('Error');
$I->dontSee('Warning');
$I->dontSee('warning');
// address field
$I->wantTo('check the address field');
$I->see('.address');
$I->seeElement('label[for=address-postal-code]');
$I->seeElement('input#address-postal-code');
$I->seeInField('input#address-postal-code', 'postal code');
$I->see('focus', 'script');
// chained dropdowns
$I->wantTo('check the chained dropdowns');
$I->seeElement('select#one');
$I->see('chainedTo', 'script');
开发者ID:winkbrace,项目名称:winkform,代码行数:26,代码来源:FormCept.php

示例10: WebGuy

<?php

$I = new WebGuy($scenario);
$I->wantTo('make sure the page editor user cannot see any content types except pages');
$I->loginAs($users['pagewriter']);
$I->see('View Pages');
$I->dontSee('Edit Entries');
$I->dontSee('Edit Kitchensinks');
$I->dontSee('Edit Dummies');
开发者ID:Hoplite-Software,项目名称:observatory,代码行数:9,代码来源:001-pagesEditorSeesOnlyPagesCept.php


注:本文中的WebGuy::dontSee方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。