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


PHP FunctionalTester::click方法代码示例

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


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

示例1: cantCreateDuplicateKeyEntry

 public function cantCreateDuplicateKeyEntry(FunctionalTester $I)
 {
     $I->am('an equipment team member');
     $I->wantTo('make sure I cant create duplicate entries');
     //Load and login a known member
     $I->loginEquipmentTeamMember();
     $I->amOnPage('/equipment');
     $I->canSee('Record a new item');
     $name = $this->faker->word;
     $slug = substr($this->faker->slug, 0, 10);
     //First item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Slug', $slug);
     $I->click('Save');
     $I->seeCurrentUrlEquals('/equipment/' . $slug . '/edit');
     /*
     //Second item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Key', $slug);
     
     $I->assertTrue(
         $I->seeExceptionThrown('BB\Exceptions\FormValidationException', function() use ($I){
             $I->click('Save');
         })
     );
     */
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:29,代码来源:EquipmentCest.php

示例2: viewIssues

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function viewIssues(FunctionalTester $I)
 {
     $I->am('Manager User');
     $I->expectTo('view issues in all projects');
     $user = $I->createUser(1, 3);
     $admin = $I->createUser(2, 4);
     $project1 = $I->createProject(1);
     $project2 = $I->createProject(2, [$user]);
     $issue1 = $I->createIssue(1, $admin, null, $project1);
     $issue2 = $I->createIssue(2, $admin, null, $project2);
     $comment1 = $I->createComment(1, $admin, $issue2);
     $I->amLoggedAs($user);
     $I->amOnAction('HomeController@getIndex');
     $I->see($project2->name, '#sidebar .project');
     $I->dontSee($project1->name, '#sidebar .project');
     $I->click($project2->name);
     $I->seeCurrentActionIs('ProjectController@getIndex', ['project' => $project2]);
     $I->seeLink($issue2->title);
     $I->dontSeeLink($issue1->title);
     $I->click($issue2->title);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project2, 'issue' => $issue2]);
     $I->see($comment1->comment, '#comment' . $comment1->id . ' .content');
     $I->amOnAction('Project\\IssueController@getNew', ['project' => $project1]);
     $I->seeResponseCodeIs(200);
     $I->click(trans('tinyissue.projects'));
     $I->see($project1->name);
     $I->see($project2->name);
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:35,代码来源:PermissionManagerCest.php

示例3: editAProfile

 public function editAProfile(FunctionalTester $I, UserSteps $userSteps)
 {
     $userSteps->loginAsFirstUser();
     $I->click('Profile');
     $I->dontSeeInFormFields('#profileForm', ['name' => 'John Doe']);
     $I->fillField('name', 'John Doe');
     $I->click('Update');
     $I->click('Log Out');
     $I->see('Goodbye John Doe!');
 }
开发者ID:codeception,项目名称:phalcon-demo,代码行数:10,代码来源:EditProfileCest.php

示例4: updateUser

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateUser(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing user details');
     $admin = $I->createUser(1, 4);
     $user = $I->createUser(2, 1);
     $I->amLoggedAs($admin);
     $I->amOnAction('Administration\\UsersController@getIndex');
     $I->click("//a[contains(.,'" . $user->fullname . "')]");
     $I->fillField('firstname', 'user1-update');
     $I->click(trans('tinyissue.update'));
     $I->seeCurrentActionIs('Administration\\UsersController@getIndex');
     $user = $I->fetchUserBy('id', $user->id);
     $I->see($user->fullname);
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:22,代码来源:CrudUserCest.php

示例5: seeContact

 /**
  * @param FunctionalTester $I
  */
 public function seeContact(FunctionalTester $I)
 {
     $I->wantToTest('if I can see the contact form as anonymous user');
     $I->amOnPage('/');
     $I->click(['link' => 'Contact']);
     $I->see('ContactForm');
 }
开发者ID:smartinmedia,项目名称:cunity-test,代码行数:10,代码来源:SmokeAnonymCest.php

示例6: checkCorrectChangePassword

 public function checkCorrectChangePassword(FunctionalTester $I)
 {
     $I->submitForm('#login-form', $this->loginFormParams('test-user@example.com', '123123'));
     $I->click('My Account');
     $I->submitForm('#change-password-form', $this->resetPasswordFormParams('123456', '123456'));
     $I->see('Password has been updated.');
 }
开发者ID:yii2mod,项目名称:base,代码行数:7,代码来源:ChangePasswordViaAccountPageCest.php

示例7: complete_reset_password_email_form

 private function complete_reset_password_email_form(FunctionalTester $I)
 {
     // fill & submit password reset email form
     $I->amOnPage('/password/reset');
     $I->fillField('email', self::EMAIL);
     $I->click(['class' => 'btn-email-password-reset']);
 }
开发者ID:neilrussell6,项目名称:l5-task-list,代码行数:7,代码来源:PasswordResetCest.php

示例8: testSpamRegistration

 public function testSpamRegistration(FunctionalTester $I)
 {
     $I->fillField('name', $this->tester['name']);
     $I->fillField('email', $this->tester['email']);
     $I->fillField('password', $this->tester['password']);
     $I->fillField('password_confirmation', $this->tester['password']);
     $I->fillField('agreement', 'yes');
     $I->click('Register', 'button');
     $I->dontSeeFormErrors();
     $I->click('Logout');
     $I->click('Login');
     $I->fillField('email', $this->tester['email']);
     $I->fillField('password', $this->tester['password']);
     $I->click('Login', 'button');
     $I->seeFormHasErrors();
     $I->dontSeeAuthentication();
 }
开发者ID:stellargames,项目名称:StellarDestiny,代码行数:17,代码来源:RegistrationCest.php

示例9: checkIfLogin

 /**
  * Define custom actions here
  */
 function checkIfLogin(\FunctionalTester $I)
 {
     //if ($I->loadSessionSnapshot('login')) return;
     $I->amOnPage('/login');
     $I->fillField(['name' => 'email'], Fixtures::get('username'));
     $I->fillField(['name' => 'password'], Fixtures::get('password'));
     $I->click('#loginButton');
     //$I->saveSessionSnapshot('login');
 }
开发者ID:magicians,项目名称:invoiceninja,代码行数:12,代码来源:FunctionalTester.php

示例10: authAsAdmin

 /**
  * @param \FunctionalTester $I
  */
 protected function authAsAdmin(\FunctionalTester $I)
 {
     $I->amOnPage(AuthorizationPage::$LOGOUT_URL);
     $I->amOnPage(AuthorizationPage::$LOGIN_URL);
     $I->fillField(AuthorizationPage::$USERNAME_FIELD, AuthorizationPage::$USERNAME);
     $I->fillField(AuthorizationPage::$PASSWORD_FIELD, AuthorizationPage::$PASSWORD);
     $I->click(AuthorizationPage::$SUBMIT_BUTTON);
     $I->expect(AuthorizationPage::$EXPECT_SUCCESS_LOGIN);
     $I->amOnPage(AuthorizationPage::$DASHBOARD_URL);
     $I->see(AuthorizationPage::$SEE_ELEMENT_ON_DASHBOARD);
 }
开发者ID:TeodorSolvic,项目名称:Symfony2-Base-Instance,代码行数:14,代码来源:AdminAuthBase.php

示例11: testRegisterSuccsess

 public function testRegisterSuccsess(FunctionalTester $I)
 {
     $I->wantTo('register a user');
     $I->amOnPage('/register');
     $I->fillField('name', 'JohnDoe');
     $I->fillField('email', 'johnDoe@gmail.com');
     $I->fillField('password', 'admin');
     $I->fillField('password_confirmation', 'admin');
     $I->click('Continue');
     $I->amOnPage('/');
 }
开发者ID:nguyentantintb,项目名称:wedding-card,代码行数:11,代码来源:WeddingCardTestCest.php

示例12: submit

 /**
  * Submit the project create/update form.
  * @param \AcceptanceTester|\FunctionalTester $I
  * @param array                               $fields
  */
 public static function submit($I, $fields)
 {
     if ($fields['image']) {
         $I->attachFile('#uploadform-newimage', $fields['image']);
     }
     $I->fillField(['name' => 'Project[name]'], $fields['name']);
     $I->selectOption(['name' => 'Project[coordinator]'], $fields['coordinator']);
     $I->fillField(['name' => 'Project[status]'], $fields['status']);
     $I->fillField(['name' => 'UploadForm[newImageDescription][]'], $fields['imageDescription']);
     $I->click('#project-form button');
 }
开发者ID:rhamlet1,项目名称:Hazid,代码行数:16,代码来源:FormPageFragment.php

示例13: loginFailsWhenPasswordIncorrect

 public function loginFailsWhenPasswordIncorrect(FunctionalTester $I)
 {
     $I->amOnPage('/auth/login');
     $I->see('Login');
     $I->fillField('email', 'wayne@chargemasterplc.com');
     $I->fillField('password', 'incorrect');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->dontSeeAuthentication();
     $I->see('These credentials do not match our records.');
 }
开发者ID:richmartell,项目名称:laravel,代码行数:11,代码来源:AuthCest.php

示例14: invalidUsernamePassword

 /**
  * @param FunctionalTester $I
  *
  * @return void
  */
 public function invalidUsernamePassword(FunctionalTester $I)
 {
     $I->wantTo('login with invalid username/password');
     $I->amOnAction('HomeController@getIndex');
     $I->dontSeeAuthentication();
     $I->see('Login');
     $I->fillField('Email', 'user@user.com');
     $I->fillField('Password', '1234');
     $I->click('Login');
     $I->dontSeeAuthentication();
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:16,代码来源:LoginCest.php

示例15: trySigninWithInvalidCredentials

 public function trySigninWithInvalidCredentials(FunctionalTester $I)
 {
     $I->wantTo('Login as user with invalid credentials');
     $I->dontSeeAuthentication();
     $I->amOnPage('/login');
     $I->fillField('identifier', 'spectator');
     $I->fillField('password', 'invalid');
     $I->click('button[type=submit]');
     $I->seeCurrentUrlEquals('/login');
     $I->dontSeeAuthentication();
 }
开发者ID:inoplate,项目名称:account,代码行数:11,代码来源:LoginCest.php


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