Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
ae2f4cfe
Commit
ae2f4cfe
authored
Dec 26, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #6624: Added delays to acceptance tests in order to make Selenium run more reliable
parent
7aae667e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-0
LoginCept.php
...vanced/tests/codeception/backend/acceptance/LoginCept.php
+9
-0
ContactCept.php
...ced/tests/codeception/frontend/acceptance/ContactCept.php
+9
-0
ContactCept.php
apps/basic/tests/codeception/acceptance/ContactCept.php
+6
-0
LoginCept.php
apps/basic/tests/codeception/acceptance/LoginCept.php
+3
-0
No files found.
apps/advanced/tests/codeception/backend/acceptance/LoginCept.php
View file @
ae2f4cfe
...
...
@@ -10,6 +10,9 @@ $loginPage = LoginPage::openBy($I);
$I
->
amGoingTo
(
'submit login form with no data'
);
$loginPage
->
login
(
''
,
''
);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see validations errors'
);
$I
->
see
(
'Username cannot be blank.'
,
'.help-block'
);
$I
->
see
(
'Password cannot be blank.'
,
'.help-block'
);
...
...
@@ -17,11 +20,17 @@ $I->see('Password cannot be blank.', '.help-block');
$I
->
amGoingTo
(
'try to login with wrong credentials'
);
$I
->
expectTo
(
'see validations errors'
);
$loginPage
->
login
(
'admin'
,
'wrong'
);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see validations errors'
);
$I
->
see
(
'Incorrect username or password.'
,
'.help-block'
);
$I
->
amGoingTo
(
'try to login with correct credentials'
);
$loginPage
->
login
(
'erau'
,
'password_0'
);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see that user is logged'
);
$I
->
seeLink
(
'Logout (erau)'
);
$I
->
dontSeeLink
(
'Login'
);
...
...
apps/advanced/tests/codeception/frontend/acceptance/ContactCept.php
View file @
ae2f4cfe
...
...
@@ -11,6 +11,9 @@ $I->see('Contact', 'h1');
$I
->
amGoingTo
(
'submit contact form with no data'
);
$contactPage
->
submit
([]);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see validations errors'
);
$I
->
see
(
'Contact'
,
'h1'
);
$I
->
see
(
'Name cannot be blank'
,
'.help-block'
);
...
...
@@ -27,6 +30,9 @@ $contactPage->submit([
'body'
=>
'test content'
,
'verifyCode'
=>
'testme'
,
]);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see that email adress is wrong'
);
$I
->
dontSee
(
'Name cannot be blank'
,
'.help-block'
);
$I
->
see
(
'Email is not a valid email address.'
,
'.help-block'
);
...
...
@@ -42,4 +48,7 @@ $contactPage->submit([
'body'
=>
'test content'
,
'verifyCode'
=>
'testme'
,
]);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
see
(
'Thank you for contacting us. We will respond to you as soon as possible.'
);
apps/basic/tests/codeception/acceptance/ContactCept.php
View file @
ae2f4cfe
...
...
@@ -11,6 +11,9 @@ $I->see('Contact', 'h1');
$I
->
amGoingTo
(
'submit contact form with no data'
);
$contactPage
->
submit
([]);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see validations errors'
);
$I
->
see
(
'Contact'
,
'h1'
);
$I
->
see
(
'Name cannot be blank'
);
...
...
@@ -27,6 +30,9 @@ $contactPage->submit([
'body'
=>
'test content'
,
'verifyCode'
=>
'testme'
,
]);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see that email adress is wrong'
);
$I
->
dontSee
(
'Name cannot be blank'
,
'.help-inline'
);
$I
->
see
(
'Email is not a valid email address.'
);
...
...
apps/basic/tests/codeception/acceptance/LoginCept.php
View file @
ae2f4cfe
...
...
@@ -11,6 +11,9 @@ $I->see('Login', 'h1');
$I
->
amGoingTo
(
'try to login with empty credentials'
);
$loginPage
->
login
(
''
,
''
);
if
(
method_exists
(
$I
,
'wait'
))
{
$I
->
wait
(
3
);
// only for selenium
}
$I
->
expectTo
(
'see validations errors'
);
$I
->
see
(
'Username cannot be blank.'
);
$I
->
see
(
'Password cannot be blank.'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment