Hi there,
I have created new Acceptance test ClientCrudCest same copy of SignupCest test, but when I run this test I got this error
Client controller needs first login, how I can loged in using command?
How I fix [Response] 302 ?
Also I double checked Add Client is there with <h3>.
$ codecept run -vv acceptance ClientCrudCest
Codeception PHP Testing Framework v2.1.8
Powered by PHPUnit 4.8.26 by Sebastian Bergmann and contributors.
Tests\codeception\frontend.acceptance Tests (1) --------------------------------------------------------------------------------------------
Modules: PhpBrowser, \tests\codeception\common\_support\FixtureHelper
--------------------------------------------------------------------------------------------------------------------------------------------
Ensure that clients create works (acceptance\ClientCrudCest::testClientCreate)
Scenario:
* yii\codeception\BasePage: open by
I am on page "/frontend/web/index-test.php/clients/create"
[Page] /frontend/web/index-test.php/clients/create
[Response] 302
[Request Cookies] []
[Response Headers] {"Host":["localhost:8080"],"Connection":["close"],"X-Powered-By":["PHP/5.5.12"],"Set-Cookie":["PHPSESSID=33qdpnpiarpdoj203aeg0l9ho6; path=/; HttpOnly","_csrf=8f965820fd9abe050fde6de0eccb1b885a04c33a1805bcd25542361b13a31468a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22INOS7SnLvNZNdKzDk_N3EID2hx2KjE_M%22%3B%7D; path=/; httponly"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Location":["http://localhost:8080/frontend/web/index-test.php/site/login"],"Content-Type":["text/html; charset=UTF-8"]}
[Redirecting to] http://localhost:8080/frontend/web/index-test.php/site/login
[Page] http://localhost:8080/frontend/web/index-test.php/site/login
[Response] 200
[Request Cookies] {"PHPSESSID":"33qdpnpiarpdoj203aeg0l9ho6","_csrf":"8f965820fd9abe050fde6de0eccb1b885a04c33a1805bcd25542361b13a31468a:2:{i:0;s:5:"_csrf";i:1;s:32:"INOS7SnLvNZNdKzDk_N3EID2hx2KjE_M";}"}
[Response Headers] {"Host":["localhost:8080"],"Connection":["close"],"X-Powered-By":["PHP/5.5.12"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Content-Type":["text/html; charset=UTF-8"]}
* I see "Add Client","h3"
FAIL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--------------------------------------------------------------------------------------------------------------------------------------------
Time: 3.02 seconds, Memory: 19.75MB
There was 1 failure:
---------
1) Failed to ensure that clients create works in tests\codeception\frontend\acceptance\ClientCrudCest::testClientCreate (.\acceptance\ClientCrudCest.php)
Step I see "Add Client","h3"
Fail Element located either by name, CSS or XPath element with 'h3' was not found.
Scenario Steps:
2. $I->see("Add Client","h3") at acceptance\ClientCrudCest.php:50
1. $I->amOnPage("/frontend/web/index-test.php/clients/create") at tion\BasePage.php:77
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.