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


PHP FunctionalTester::seeOptionIsSelected方法代码示例

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


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

示例1: access_to_my_profile

 public function access_to_my_profile(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('access to my profile page');
     $I->expectTo('see my profile page');
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->seeCurrentRouteIs('home');
     $I->click(trans('template.front.header.my_account'));
     $I->seeCurrentRouteIs('dashboard.index');
     $I->click(trans('template.back.header.my_profile'));
     $I->seeCurrentRouteIs('users.profile');
     $I->see(trans('breadcrumbs.admin'), '.breadcrumb');
     $I->seeLink(trans('breadcrumbs.admin'), route('dashboard.index'));
     $I->see(strip_tags(trans('breadcrumbs.users.profile')), '.breadcrumb');
     $I->assertFileNotExists('photo');
     $I->seeOptionIsSelected('gender', config('user.gender_key.male'));
     $I->seeInField('last_name', $this->_user->last_name);
     $I->seeInField('first_name', $this->_user->first_name);
     $I->seeInField('birth_date', Carbon::createFromFormat('Y-m-d', $this->_user->birth_date)->format('d/m/Y'));
     $I->seeInField('phone_number', $this->_user->phone_number);
     $I->seeInField('email', $this->_user->email);
     $I->seeInField('address', $this->_user->address);
     $I->seeInField('zip_code', $this->_user->zip_code);
     $I->seeInField('city', $this->_user->city);
     $I->seeInField('country', $this->_user->country);
     $I->seeInField('password', '');
     $I->seeInField('password_confirmation', '');
     $I->dontSee(trans('users.page.label.status_id'));
     $I->dontSee(trans('users.page.label.board_id'));
     $I->dontSee(trans('users.page.label.role'));
     $I->dontSee(trans('users.page.label.activation'));
 }
开发者ID:Okipa,项目名称:una.app,代码行数:35,代码来源:UserCest.php

示例2:

//
//
//
//
//-------------------------------seminar index page-------------------------------
//
//
//
//
//url
$I->seeCurrentUrlEquals('/catalog/owner/input');
//title page
//$I->seeInTitle('');
//old value
$I->see('積水');
$I->see('太郎');
$I->see('セキスイ');
$I->see('タロウ');
$I->see('男');
$I->see('01-1234-5678');
$I->see('060-0000');
$I->seeOptionIsSelected('area', '青森県');
$I->see('東京都港区虎ノ門');
$I->see('2-3-17虎ノ門2丁目タワー');
$I->see('email1@gmail.com');
$I->seeOptionIsSelected('age', '21~25歳');
$I->seeOptionIsSelected('ext13', '公務員');
//-------------------------check access when access to complete page----------------
$I->wantTo('Check Access Complete page');
$I->amOnPage('/catalog/owner/complete');
$I->seeCurrentUrlEquals('/catalog/owner/complete');
开发者ID:vodanh624321,项目名称:laravel5,代码行数:31,代码来源:ApplyCatalogR5Cept.php

示例3: update_slide_with_data_changed

 public function update_slide_with_data_changed(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('update slide data');
     $I->expectTo('see a success confirmation message and see that the user data has changed');
     /***************************************************************************************************************
      * settings
      **************************************************************************************************************/
     // we create the admin role
     $admin_role = $this->_createAdminRole();
     // we attach it to the logged user
     $admin_role->users()->attach($this->_user);
     // we create a slide
     $this->_createSlide();
     // we create another slide
     $slide = $this->_slide_repo->create(['title' => 'Aviron universitaire', 'quote' => 'Other quote', 'picto' => 'picto_2.png', 'background_image' => 'bg_img_2.jpg', 'position' => 2, 'active' => true]);
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->amOnRoute('slides.edit', ['id' => $this->_slide->id]);
     $I->fillField('title', 'Test');
     $I->fillField('quote', 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !');
     $I->selectOption('#input_previous_slide_id', $slide->position . ' - ' . $slide->title);
     $I->checkOption('#input_active');
     $I->click(trans('home.page.action.slide.update'));
     $I->seeCurrentRouteIs('slides.edit', ['id' => $this->_slide->id]);
     $I->see(trans('global.modal.alert.title.success'), 'h3');
     $I->see(strip_tags(trans('home.message.slide.update.success', ['slide' => 'Test'])));
     $I->seeInField('title', 'Test');
     $I->seeInField('quote', 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !');
     $I->seeOptionIsSelected('#input_previous_slide_id', '1 - ' . $slide->title);
     $I->seeCheckboxIsChecked('#input_active');
     $I->seeRecord('slides', ['title' => 'Test', 'quote' => 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !', 'position' => 2, 'active' => true]);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:35,代码来源:HomeCest.php

示例4:

$I->wantTo('update a section');
// When
$id = $I->haveSection();
// And
$I->amOnPage('admin/sections/' . $id);
// Then
$I->see('Edit section', '.btn-edit');
// When
$I->click('Edit section');
// Then
$I->seeCurrentUrlEquals('/admin/sections/' . $id . '/edit');
$I->see('Edit section "Our company"', 'h1');
$I->seeInField('name', 'Our company');
$I->seeInField('slug_url', 'our-company');
$I->seeInField('menu_order', 2);
$I->seeOptionIsSelected('published', 0);
$I->seeOptionIsSelected('menu', 1);
$I->seeOptionIsSelected('type', 'Page');
$I->amGoingTo('Submit an invalid form');
// When
$I->fillField('name', '');
// And
$I->click('Update section');
// Then
$I->expectTo('see the form back with data and errors');
$I->seeCurrentUrlEquals('/admin/sections/' . $id . '/edit');
$I->seeInField('name', '');
$I->seeInField('slug_url', 'our-company');
$I->see('The name field is required', '.error');
$I->amGoingTo('Submit a valid form');
// When
开发者ID:mathiasd88,项目名称:cms,代码行数:31,代码来源:UpdateSectionCept.php

示例5: update_role_with_data_changes

 public function update_role_with_data_changes(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('update a role with no data');
     $I->expectTo('see an error message explaining that the fields are required');
     /***************************************************************************************************************
      * settings
      **************************************************************************************************************/
     // we create the admin role
     $admin = $this->_createAdminRole();
     // we attach it to the logged user
     $admin->users()->attach($this->_user);
     // we create another role
     $operator = $this->_createUserRole();
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->amOnRoute('permissions.edit', ['id' => $operator->id]);
     $I->fillField('name_fr', 'Test FR');
     $I->fillField('slug', 'new_slug');
     $I->selectOption('parent_role_id', $admin->id);
     $I->checkOption('#settings' . config('permissions.separator') . 'view');
     $I->checkOption('#permissions');
     $I->checkOption('#permissions' . config('permissions.separator') . 'list');
     $I->checkOption('#permissions' . config('permissions.separator') . 'create');
     $I->checkOption('#permissions' . config('permissions.separator') . 'view');
     $I->checkOption('#permissions' . config('permissions.separator') . 'update');
     $I->checkOption('#permissions' . config('permissions.separator') . 'delete');
     $I->checkOption('#users');
     $I->checkOption('#users' . config('permissions.separator') . 'list');
     $I->checkOption('#users' . config('permissions.separator') . 'create');
     $I->checkOption('#users' . config('permissions.separator') . 'view');
     $I->checkOption('#users' . config('permissions.separator') . 'update');
     $I->checkOption('#users' . config('permissions.separator') . 'delete');
     $I->click(trans('permissions.page.action.edit'));
     $I->seeCurrentRouteIs('permissions.edit', ['id' => $operator->id]);
     $I->see(trans('global.modal.alert.title.success'), 'h3');
     $I->see(strip_tags(trans('permissions.message.update.success', ['name' => 'Test FR'])));
     $I->seeInField('name_fr', 'Test FR');
     $I->seeInField('slug', 'new-slug');
     $I->seeInField('position', 2);
     $I->seeOptionIsSelected('#input_parent_role', '1 - ' . $admin->name);
     $I->seeCheckboxIsChecked('#settings' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#permissions');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'list');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'create');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'update');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'delete');
     $I->seeCheckboxIsChecked('#users');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'list');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'create');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'update');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'delete');
     $I->seeRecord('roles', ['id' => $operator->id, 'slug' => 'new-slug', 'position' => 2, 'permissions' => '{"permissions":true,"users":true,"settings.view":true,"permissions.list":true,"permissions.create":true,"permissions.view":true,"permissions.update":true,"permissions.delete":true,"users.list":true,"users.create":true,"users.view":true,"users.update":true,"users.delete":true}']);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:58,代码来源:PermissionCest.php


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