本文整理汇总了PHP中FunctionalTester::dontSee方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::dontSee方法的具体用法?PHP FunctionalTester::dontSee怎么用?PHP FunctionalTester::dontSee使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::dontSee方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: submitFormWithIncorrectEmail
public function submitFormWithIncorrectEmail(FunctionalTester $I)
{
$I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester.email', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
$I->expectTo('see that email address is wrong');
$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');
}
示例2: checkUserRedirectedToLoginWhenNotAuthd
public function checkUserRedirectedToLoginWhenNotAuthd(FunctionalTester $I)
{
$I->dontSeeAuthentication();
$I->amOnPage('/dashboard');
$I->dontSee('You are now logged in');
$I->seeCurrentUrlEquals('/auth/login');
}
示例3: 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);
}
示例4: updateIssue
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function updateIssue(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('edit an existing project issue details');
$admin = $I->createUser(1, 4);
$developer1 = $I->createUser(2, 2);
// developer
$I->amLoggedAs($admin);
$project = $I->createProject(1, [$developer1]);
$I->amOnAction('Project\\IssueController@getNew', ['project' => $project]);
$issue = $I->createIssue(1, $admin, $developer1, $project);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->seeLink('Issue 1');
$I->dontSee(\Html::duration($issue->time_quote), '.issue-quote');
$I->click('Issue 1', '.edit-issue');
$I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
$newTitle = 'Issue 1 update';
$newTime = 3700;
$I->fillField('title', $newTitle);
$I->fillField('time_quote[h]', 1);
$I->fillField('time_quote[s]', 100);
$I->fillField('tag', 'type:tag1');
$I->click(trans('tinyissue.update_issue'));
$I->seeResponseCodeIs(200);
$I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->seeLink($newTitle);
$I->see(\Html::duration($newTime), '.issue-quote');
$I->see('type', '.issue-tag');
$I->see('tag1', '.issue-tag');
}
示例5: it_validates_required_fields
public function it_validates_required_fields(FunctionalTester $I)
{
//For coverage
$I->amOnRoute(RegisterPage::$ROUTE);
$I->submitForm(RegisterPage::$formId, [], 'Register');
$I->see('The username field is required.');
$I->see('The email field is required.');
$I->see('The password field is required.');
$I->dontSee('The name field is required.');
}
示例6: deleteUser
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function deleteUser(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('delete an existing user details');
$admin = $I->createUser(1, 4);
$user = $I->createUser(2, 1);
$user1 = $I->createUser(3, 2);
$I->amLoggedAs($admin);
$I->amOnAction('Administration\\UsersController@getDelete', ['user' => $user]);
$I->seeCurrentActionIs('Administration\\UsersController@getIndex');
$I->dontSee($user->fullname);
$I->see($user1->fullname);
}
示例7: getNoErrorIfAssetsAreDumped
public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
{
$I->bootKernelWith('customized');
$I->runCommand('maba_webpack.command.setup');
$I->seeFileFound(__DIR__ . '/Fixtures/package.json');
$I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
$I->runCommand('maba_webpack.command.compile');
$I->seeCommandStatusCode(0);
$I->seeInCommandDisplay('webpack');
$I->dontSeeInCommandDisplay('error');
$I->amOnPage('/customized');
$I->canSeeResponseCodeIs(200);
$I->dontSee('Manifest file not found');
$I->seeInSource('<link rel="stylesheet" id="css1" href="/assets/');
$href = $I->grabAttributeFrom('link#css1', 'href');
preg_match('#/assets/(.*)#', $href, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->canSeeInThisFile('.green');
$I->canSeeInThisFile('.red');
$I->canSeeInThisFile('-ms-fullscreen a.css');
$I->amGoingTo('Check if less file was compiled');
$I->canSeeInThisFile('color: #123456');
$I->canSeeInThisFile('-ms-fullscreen a.less');
$I->amGoingTo('Check if sass file was compiled');
$I->canSeeInThisFile('color: #654321');
$I->canSeeInThisFile('-ms-fullscreen a.scss');
$I->amGoingTo('Check if cat.png was included');
$I->canSeeInThisFile('background: url(/assets/');
$I->seeInSource('<link rel="stylesheet" id="css2" href="/assets/');
$href = $I->grabAttributeFrom('link#css2', 'href');
preg_match('#/assets/(.*)#', $href, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->canSeeInThisFile('color: #123456');
$I->seeInSource('<script src="/assets/');
$src = $I->grabAttributeFrom('script', 'src');
preg_match('#/assets/(.*)#', $src, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->canSeeInThisFile('additional-asset-content');
$I->canSeeInThisFile('additional asset B');
$I->canSeeInThisFile('app-asset-content');
$I->dontSeeInThisFile('featureA-content');
$I->dontSeeInThisFile('featureB-content');
$I->seeInSource('<img src="/assets/');
$src = $I->grabAttributeFrom('img', 'src');
preg_match('#/assets/(.*)#', $src, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
$I->seeFileIsSmallerThan(__DIR__ . '/Fixtures/web/assets/' . $matches[1], __DIR__ . '/Fixtures/src/Resources/assets/cat.png');
}
示例8: updateTag
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function updateTag(FunctionalTester $I)
{
$I->am('Admin User');
$I->wantTo('edit an existing tag');
$tag = (new Tag())->where('group', '=', false)->get()->random(1);
$data = ['name' => 'tag updated'];
$tagName = $tag->name;
$I->amLoggedAs($I->createUser(1, 4));
$I->amOnAction('Administration\\TagsController@getIndex');
$I->click($this->_editTagSelector($tagName));
$I->seeCurrentActionIs('Administration\\TagsController@getEdit', ['tag' => $tag]);
$I->submitForm('form', $data);
$I->amOnAction('Administration\\TagsController@getIndex');
$I->see($data['name'], $this->_editTagSelector($data['name']));
$I->dontSee($data['name'], $this->_editTagSelector($tagName));
}
示例9: deleteComment
/**
* @param FunctionalTester $I
*
* @actor FunctionalTester
*
* @return void
*/
public function deleteComment(FunctionalTester $I)
{
$I->am('Developer User');
$I->wantTo('delete a comment from an issue');
$admin = $I->createUser(2, 4);
$I->amLoggedAs($admin);
$project = $I->createProject(1, [$admin]);
$issue = $I->createIssue(1, $admin, $admin, $project);
$comment1 = $I->createComment(1, $admin, $issue);
$comment2 = $I->createComment(2, $admin, $issue);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->see($comment1->comment, '#comment' . $comment1->id . ' .content');
$I->see($comment2->comment, '#comment' . $comment2->id . ' .content');
$uri = $I->getApplication()->url->action('Project\\IssueController@getDeleteComment', ['comment' => $comment1]);
$I->sendAjaxGetRequest($uri);
$I->seeResponseCodeIs(200);
$I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
$I->dontSee($comment1->comment);
$I->see($comment2->comment);
}
示例10: getNoErrorIfAssetsAreDumped
public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
{
$I->bootKernelWith();
$I->runCommand('maba_webpack.command.setup');
$I->seeFileFound(__DIR__ . '/Fixtures/package.json');
$I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
$I->runCommand('maba_webpack.command.compile');
$I->seeCommandStatusCode(0);
$I->seeInCommandDisplay('webpack');
$I->dontSeeInCommandDisplay('error');
$I->amOnPage('/');
$I->canSeeResponseCodeIs(200);
$I->dontSee('Manifest file not found');
$I->dontSeeInSource('<link rel="stylesheet"');
$I->seeInSource('<script src="http://localhost:8080/compiled/');
$src = $I->grabAttributeFrom('script', 'src');
preg_match('#http://localhost:8080/compiled/(.*)#', $src, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->canSeeInThisFile('.green');
$I->canSeeInThisFile('.red');
}
示例11: 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);
}
示例12: getNoErrorIfAssetsAreDumped
public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
{
$I->bootKernelWith('tags');
$I->runCommand('maba_webpack.command.setup');
$I->seeFileFound(__DIR__ . '/Fixtures/package.json');
$I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
$I->runCommand('maba_webpack.command.compile');
$I->seeCommandStatusCode(0);
$I->seeInCommandDisplay('webpack');
$I->dontSeeInCommandDisplay('error');
$I->amOnPage('/tags');
$I->canSeeResponseCodeIs(200);
$I->dontSee('Manifest file not found');
$I->canSeeNumberOfElements('link[rel=stylesheet]', 3);
$urlList = $I->grabMultiple('link', 'href');
foreach ($urlList as $i => $url) {
preg_match('#/compiled/(.*)#', $url, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->canSeeInThisFile('.class' . $i . ' {');
}
$I->canSeeNumberOfElements('script', 2);
$urlList = $I->grabMultiple('script', 'src');
foreach ($urlList as $i => $url) {
preg_match('#/compiled/(.*)#', $url, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
$I->canSeeInThisFile('function f' . $i . '() {');
}
$I->canSeeNumberOfElements('img', 2);
$urlList = $I->grabMultiple('img', 'src');
foreach ($urlList as $i => $url) {
preg_match('#/compiled/(.*)#', $url, $matches);
$I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
}
}
示例13:
$I->see('Opportunity');
# module name
$I->see('Relation');
# badge for relation
$I->see('show/hide', 'table#message-steps a[data-target=".step-2-errors"]');
$I->dontSeeElement('table#message-steps table.collapsed');
$I->click('Set status New');
$I->seeResponseCodeIs(200);
$I->see('Message');
$I->seeLink('Back to the list');
$I->seeLink('Run message');
$I->dontSeeLink('Set status New');
$I->seeLink('Halt message');
$I->seeLink('Cancel message');
// steps with status "Error" are changed to status "Rerun":
$I->dontSee('Error', 'table#message-steps td.error-status');
$I->dontSee('Completed', 'table#message-steps td.error-status');
$I->dontSee('In progress', 'table#message-steps td.error-status');
$I->see('New', 'table#message-steps td.error-status');
$I->click('Halt message');
$I->seeResponseCodeIs(200);
$I->see('Message');
$I->seeLink('Back to the list');
$I->seeLink('Run message');
$I->seeLink('Set status New');
$I->dontSeeLink('Halt message');
$I->seeLink('Cancel message');
$I->click('Cancel message');
$I->seeResponseCodeIs(200);
$I->see('Message');
$I->seeLink('Back to the list');
示例14:
$I->see('Halt message', 'div#batch-all');
$I->see('Cancel message', 'div#batch-all');
$I->see('Reset GUIDs', 'div#batch-all');
# sending batch form with no action selected
$I->submitForm('form[name="batch"]', []);
$I->see('Please select batch action.', '.alert-danger');
# sending batch form with no action type selected
$I->submitForm('form[name="batch"]', ['action' => 'new']);
$I->see('Please select batch action type.', '.alert-danger');
# sending batch form with no Messages selected
//$I->submitForm('form[name="batch"]', ['action' => 'ready', 'action_type' => 'selected']);
//$I->see('Please select at least one Message.', '.alert-danger');
$I->see('New', 'table tr[class="status-new"] td');
$I->see('Cancelled', 'table tr[class="status-cancelled"] td');
$I->see('Halted', 'table tr[class="status-halted"] td');
$I->dontSee('Finished', 'table tr[class="status-halted"] td');
$I->dontSee('Error', 'table tr[class="status-halted"] td');
# sending batch form with action for all items
$I->submitForm('form[name="batch"]', ['action' => 'new', 'action_type' => 'all']);
$I->see('New', 'table tr[class="status-new"] td');
$I->see('Batch action executed on 1502 items.', '.alert-success');
$I->dontSee('Cancelled', 'table tr[class="status-cancelled"] td');
$I->dontSee('Halted', 'table tr[class="status-halted"] td');
$I->dontSee('Finished', 'table tr[class="status-halted"] td');
$I->dontSee('Error', 'table tr[class="status-halted"] td');
$I->see('New', 'div#status-overview td');
$I->dontSee('Halted', 'div#status-overview td');
$I->dontSee('Cancelled', 'div#status-overview td');
# sending batch form with Messages IDs and action for selected items
$ids = $I->getMessageIds(5);
$I->submitForm('form[name="batch"]', ['action' => 'halt', 'action_type' => 'selected', 'batch_ids' => $ids]);
示例15: FunctionalTester
<?php
/* @var $scenario Codeception\Scenario */
$I = new FunctionalTester($scenario);
$I->assertTrue(Yii::$app->user->isGuest);
$I->wantTo('ensure that home page works');
$I->amOnPage('/');
$I->dontSee('Logout');
$I->see('Main');
$I->see('Login');
$I->click('Main');
$I->dontSee('Logout');
$I->see('Main');
$I->see('Login');
$user = \app\models\User::findByUsername('admin');
Yii::$app->user->login($user);
$I->assertFalse(Yii::$app->user->isGuest);
$I->amOnPage('/');
$I->see('I`m index');
$I->see('About');
$I->see('Logout');
$I->click('About');
$I->see('Information');