本文整理汇总了PHP中FunctionalTester::seeLink方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::seeLink方法的具体用法?PHP FunctionalTester::seeLink怎么用?PHP FunctionalTester::seeLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::seeLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addIssueComment
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function addIssueComment(FunctionalTester $I)
{
$comment = 'Comment 1';
$fileName1 = 'upload1.txt';
$fileName2 = 'upload2.txt';
$I->am('Manager User');
$I->wantTo('add new comment to a project issue with attachments');
$manager = $I->createUser(1, 3);
$I->amLoggedAs($manager);
$issue = $I->createIssue(1, $manager);
$project = $issue->project;
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->seeResponseCodeIs(200);
$uri = $I->getApplication()->url->action('Project\\IssueController@postUploadAttachment', ['project' => $project]);
$I->submitFormWithFileToUri('.new-comment form', $uri, ['upload' => [$fileName1, $fileName2]], ['comment' => $comment]);
$I->seeResponseCodeIs(200);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->see($comment, '.comment .content');
$I->seeLink($fileName1);
$I->seeLink($fileName2);
$I->see($fileName1, '.attachments');
$I->see($fileName2, '.attachments');
$attachments = $issue->comments->first()->attachments;
foreach ($attachments as $attachment) {
$I->amOnAction('Project\\IssueController@getDisplayAttachment', ['project' => $project, 'issue' => $issue, 'attachment' => $attachment]);
$I->seeResponseCodeIs(200);
}
}
示例2: checkAdminPanel
public function checkAdminPanel(FunctionalTester $I)
{
$I->submitForm($this->formId, $this->formParams('admin@example.org', '123123'));
$I->see('Logout (admin)', 'form button[type=submit]');
$I->seeLink('Administration');
$I->click('Administration');
$I->see('Users');
$I->seeLink('CMS');
$I->seeLink('RBAC');
$I->seeLink('Settings Storage');
$I->seeLink('Cron Schedule Log');
}
示例3: viewAssignedTo
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function viewAssignedTo(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('view issues assigned to logged user');
$admin = $I->createUser(1, 4);
$developer1 = $I->createUser(2, 2);
$I->amLoggedAs($developer1);
$project1 = $I->createProject(1);
$issue1 = $I->createIssue(1, $admin, $developer1, $project1);
$issue2 = $I->createIssue(2, $admin, $developer1, $project1);
$issue3 = $I->createIssue(3, $admin, null, $project1);
$I->amOnAction('ProjectController@getAssigned', ['project' => $project1]);
$I->seeLink($issue1->title);
$I->seeLink($issue2->title);
$I->dontSeeLink($issue3->title);
}
示例4: 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);
}
示例5: updateProject
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function updateProject(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('edit an existing project details');
$project = $I->createProject(1);
$admin = $I->createUser(1, 4);
$I->amLoggedAs($admin);
$I->amOnAction('ProjectController@getEdit', ['project' => $project]);
$I->selectOption('status', Project::STATUS_ARCHIVED);
$I->click(trans('tinyissue.update'));
$I->seeCurrentActionIs('ProjectsController@getIndex');
$I->dontSeeLink('Project 1');
$I->amOnAction('ProjectsController@getIndex', ['status' => Project::STATUS_ARCHIVED]);
$I->seeLink('Project 1');
}
示例6: cantEditClosedIssue
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function cantEditClosedIssue(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('not be able to edit closed issue');
$admin = $I->createUser(1, 4);
$developer1 = $I->createUser(2, 2);
// developer
$I->amLoggedAs($admin);
$project = $I->createProject(1, [$developer1]);
$issue = $I->createIssue(1, $admin, $developer1, $project);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->click('Issue 1', '.edit-issue');
$I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->click(trans('tinyissue.close_issue'), '.close-issue');
$I->seeLink(trans('tinyissue.reopen_issue'));
$I->click('Issue 1', '.edit-issue');
$I->seeResponseCodeIs(200);
$I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->see(trans('tinyissue.cant_edit_closed_issue'));
}
示例7: issueFilterUrl
public function issueFilterUrl(FunctionalTester $I)
{
$I->am('Normal User');
$I->wantTo('view an issue with a content containing another issue number.');
$I->expectTo('see link in the issue number.');
$I->lookForwardTo('be redirected to the another issue.');
$developer1 = $I->createUser(1, 2);
// developer
$user1 = $I->createUser(2, 1);
// user
$project = $I->createProject(1, [$developer1, $user1]);
$issue1 = $I->createIssue(1, $developer1, null, $project);
$issue2 = $I->createIssue(2, $developer1, null, $project);
$issue1->body = 'See issue #' . $issue2->id;
$issue1->save();
$I->amLoggedAs($user1);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue1]);
$I->seeLink('issue #' . $issue2->id);
$I->click('issue #' . $issue2->id);
$I->seeResponseCodeIs(200);
$I->see($issue2->title);
$I->dontSee($issue1->title);
}
示例8: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('look at activity on the activity page');
$I->loginNormalMember();
$I->amOnPage('activity');
$I->see('Activity Log');
$I->seeLink('Previous');
示例9: FunctionalTester
<?php
/* @var $scenario Codeception\Scenario */
$I = new FunctionalTester($scenario);
$I->wantTo('ensure that home page works');
$I->amOnPage(Yii::$app->homeUrl);
$I->see('My Company');
$I->seeLink('Grid');
$I->click('Grid');
$I->see('Reservations');
示例10: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('login as regular user');
$I->amOnPage('/');
$I->click('Log In/Sign Up');
$I->seeInCurrentUrl('/session/index');
$I->see('Log In', "//*[@id='login-header']");
$I->see("Don't have an account yet?", "//*[@id='signup-header']");
$I->fillField('email', 'demo@phalconphp.com');
$I->fillField('password', 'phalcon');
$I->click('Login');
$I->seeInCurrentUrl('/session/start');
$I->see('Welcome Phalcon Demo');
$I->seeLink('Log Out');
示例11: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->reloadFixtures();
/* MESSAGES LIST */
$I->wantTo('see messages list');
$I->amOnPage('/message');
$I->seeResponseCodeIs(200);
$I->see('Messages');
$I->see('Search', 'div.panel form button.btn-info');
$I->see('Status overview');
$I->seeLink('ID');
$I->seeLink('Created');
$I->seeLink('Type');
$I->seeLink('Status');
$I->see('Action');
$I->seeLink('Details');
$I->see('1.502', 'table tfoot');
# buttons
$I->seeLink('', '/message/set-status');
// for status buttons
# buttons: item with "Ready" status
$I->dontSeeElement('table#results tr.status-new a.btn-success span.glyphicon-check');
$I->seeElement('table#results tr.status-new a.btn-primary span.glyphicon-play');
$I->seeElement('table#results tr.status-new a.btn-warning span.glyphicon-pause');
$I->seeElement('table#results tr.status-new a.btn-danger span.glyphicon-remove');
$I->seeElement('table#results tr.status-new div.icon-button-placeholder-xs');
# buttons: item with "Halted" status
$I->seeElement('table#results tr.status-halted a.btn-primary span.glyphicon-play');
$I->seeElement('table#results tr.status-halted a.btn-success span.glyphicon-check');
$I->dontSeeElement('table#results tr.status-halted a.btn-warning span.glyphicon-pause');
示例12: 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'));
}
示例13: FunctionalTester
<?php
/* @var $scenario Codeception\Scenario */
$I = new FunctionalTester($scenario);
$I->wantTo('ensure that home page works');
$I->amOnPage(Yii::$app->homeUrl);
$I->see('Start page');
$I->seeLink('Statistics');
$I->click('Statistics');
$I->see('Statistics');
$I->amOnPage(Yii::$app->homeUrl);
$I->see('Test block');
/*$I->amOnPage(['block/edit-user-block','id'=>'2']);
$I->see('Test block');
*/
示例14: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->reloadFixtures();
$I->wantTo('see the scheduled processes list');
$I->amOnPage('/schedules');
$I->seeResponseCodeIs(200);
$I->see('Schedules', 'h1');
$I->seeLink('Create new');
$I->see('Cron time definition consists of five values', '.well');
$I->see('ID', 'th');
$I->see('Cron', 'th');
$I->see('Type', 'th');
$I->see('Description', 'th');
$I->see('Last run at', 'th');
$I->seeLink('Edit');
$I->seeLink('Delete');
示例15: FunctionalTester
<?php
/*
* This file is part of the Terabyte yii2-extension.
*
* (c) Terabyte yii2-extension <http://github.com/tecnologiaterabyte>
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*
* @link http://www.tecnologiaterabyte.com
* @author Wilmer Arámbula <tecnologiaterabyte@gmail.com>
* @copyright (c) 2014 Asoc. Coop. Tecnologia Terabyte 124, RL.
* @Extension: [yii2-adminlte].
* @Tests App Functional [HomeCept].
* @since 1.0
*/
/* @var $scenario Codeception\Scenario */
$I = new FunctionalTester($scenario);
$I->wantTo('ensure that home page works');
$I->amOnPage(Yii::$app->homeUrl);
$I->see(yii::$app->params['WebName']);
$I->seeLink(yii::t('adminlte', 'About Us'));
$I->click(yii::t('adminlte', 'About Us'));
$I->see(yii::t('adminlte', 'This is the About page. You may modify the following file to customize its content:'), 'div');