Exemplo n.º 1
0
<?php

/**
 * @var \Codeception\Scenario $scenario
 */
$I = new Step\Functional\UserSteps($scenario);
$I->wantTo('Verify that the home page welcome me');
$I->amOnPage('/');
$I->see('Log In with Github');
$I->amRegularUser();
$I->amOnPage('/');
$I->see('Profile');
Exemplo n.º 2
0
<?php

/**
 * @var Codeception\Scenario $scenario
 */
$I = new Step\Functional\UserSteps($scenario);
$I->wantTo('go to the not found page and see flash banner');
$I->amOnPage('/abcdef-jaja');
$I->see('Page not found: /abcdef-jaja', '//body/div[1]/div/div/div');
Exemplo n.º 3
0
<?php

/**
 * @var \Codeception\Scenario $scenario
 */
$I = new Step\Functional\UserSteps($scenario);
$I->wantTo('reply in a discussion');
$userId = $I->amRegularUser();
$catId = $I->haveCategory(['name' => 'Testing', 'slug' => 'test', 'description' => 'codeception functional test']);
$postId = $I->havePost(['title' => 'Please help with testing', 'content' => 'How can I install Codeception', 'users_id' => $userId, 'slug' => 'please-help-with-testing', 'categories_id' => $catId]);
$I->amOnPage("/discussions");
$I->seeLink('Please help with testing');
$I->click('Please help with testing');
$I->see('Please help with testing', 'h1');
$I->fillField('#content', 'I can do that!');
$I->click('Add Comment');
$I->see('I can do that!', '.post-content');
Exemplo n.º 4
0
<?php

/**
 * Test for https://github.com/phalcon/forum/issues/85 issue
 *
 * @var \Codeception\Scenario $scenario
 */
$I = new Step\Functional\UserSteps($scenario);
$I->wantTo('use underscored character in content and see correct url');
$userId = $I->amRegularUser();
$catId = $I->haveCategory(['name' => 'Installation', 'slug' => 'installation', 'description' => 'Installation related posts']);
$postId = $I->havePost(['title' => 'Is there a precompiled binary for 64 bit Centos out there', 'content' => '[this reddit topic](http://www.reddit.com/r/PHP/comments/2s7bbr/phalconphp_vs_php_disappointing_results/)', 'users_id' => $userId, 'slug' => 'is-there-a-precompiled-binary-for-64-bit-centos-out-there', 'categories_id' => $catId]);
$I->amOnPage('/discussions');
$I->seeInTitle('Discussions - Phalcon Framework');
$I->seeLink('Is there a precompiled binary for 64 bit Centos out there');
$I->click('Is there a precompiled binary for 64 bit Centos out there');
$I->seeInCurrentUrl(sprintf('/discussion/%s/is-there-a-precompiled-binary-for-64-bit-centos-out-there', $postId));
$I->seeLink('this reddit topic', 'http://www.reddit.com/r/PHP/comments/2s7bbr/phalconphp%5vs%5php%5disappointing%5results/');