Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
typo3.org
typo3.org
Commits
9e8a9236
Commit
9e8a9236
authored
Jul 15, 2020
by
Thomas Löffler
Browse files
Finish codeception tests and add one example test
parent
4e8400c5
Pipeline
#9214
passed with stages
in 5 minutes and 20 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
9e8a9236
...
...
@@ -23,7 +23,7 @@ We are running chromedriver within ddev, so if you use ddev everything just work
#### Run the tests
```
ddev
run --service web
vendor/bin/codecept --steps run acceptance
ddev
exec
vendor/bin/codecept --steps run acceptance
```
With
`--steps`
, all run steps are outputted to the command line. All errors are reported even if you don't use the
...
...
@@ -37,13 +37,13 @@ a screenshot and the html output of the page the moment a test failed.
To run a single feature just add the path to the feature file to your command, e.g.
```
ddev
run --service web
vendor/bin/codecept --steps run acceptance Tests/acceptance/Features/Login.feature
ddev
exec
vendor/bin/codecept --steps run acceptance Tests/acceptance/Features/Login.feature
```
You can also run single scenarios by providing scenario names, e.g.
```
ddev
run --service web
vendor/bin/codecept --steps run acceptance Tests/acceptance/Features/Login.feature:Login\ and\ Logout
ddev
exec
vendor/bin/codecept --steps run acceptance Tests/acceptance/Features/Login.feature:Login\ and\ Logout
```
### Writing tests
...
...
@@ -53,7 +53,7 @@ group your tests.
To get all the available step definitions just run the command
```
ddev
run --service web
vendor/bin/codecept gherkin:steps acceptance
ddev
exec
vendor/bin/codecept gherkin:steps acceptance
```
which outputs the steps added to the project.
...
...
@@ -61,7 +61,7 @@ which outputs the steps added to the project.
To add new steps, just write the new step in your
`.feature`
file and run
```
ddev
run --service web
vendor/bin/codecept gherkin:snippets acceptance
ddev
exec
vendor/bin/codecept gherkin:snippets acceptance
```
This will output a function stub with the proper step definition phpdoc. Put this in a appropriate
`ActorTrait`
...
...
Tests/_data/Dumps/Fixture.sql
View file @
9e8a9236
...
...
@@ -191,6 +191,57 @@ INSERT INTO `fe_groups` VALUES (1,178,1320577261,0,0,'User group (activated)',0,
/*!40000 ALTER TABLE `fe_groups` ENABLE KEYS */;
UNLOCK TABLES;
CREATE TABLE `fe_users` (
`uid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tx_extbase_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`felogin_redirectPid` tinytext COLLATE utf8_unicode_ci DEFAULT NULL,
`felogin_forgotHash` varchar(80) COLLATE utf8_unicode_ci DEFAULT '',
`pid` int(10) unsigned NOT NULL DEFAULT 0,
`tstamp` int(10) unsigned NOT NULL DEFAULT 0,
`username` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`password` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`usergroup` tinytext COLLATE utf8_unicode_ci DEFAULT NULL,
`disable` smallint(5) unsigned NOT NULL DEFAULT 0,
`starttime` int(10) unsigned NOT NULL DEFAULT 0,
`endtime` int(10) unsigned NOT NULL DEFAULT 0,
`name` varchar(160) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`first_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`middle_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`last_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`address` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`telephone` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`fax` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`crdate` int(10) unsigned NOT NULL DEFAULT 0,
`cruser_id` int(10) unsigned NOT NULL DEFAULT 0,
`lockToDomain` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`deleted` smallint(5) unsigned NOT NULL DEFAULT 0,
`uc` blob DEFAULT NULL,
`title` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`zip` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`city` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`country` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`www` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`company` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`image` tinytext COLLATE utf8_unicode_ci DEFAULT NULL,
`TSconfig` text COLLATE utf8_unicode_ci DEFAULT NULL,
`lastlogin` int(10) unsigned NOT NULL DEFAULT 0,
`is_online` int(10) unsigned NOT NULL DEFAULT 0,
`description` text COLLATE utf8_unicode_ci DEFAULT NULL,
`tx_igldapssoauth_dn` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`tx_igldapssoauth_id` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`uid`),
KEY `is_online` (`is_online`),
KEY `parent` (`pid`,`username`(100)),
KEY `username` (`username`(100)),
KEY `tx_igldapssoauth_dn` (`tx_igldapssoauth_dn`(64))
) ENGINE=InnoDB AUTO_INCREMENT=3137 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `fe_users` (`uid`, `pid`, `tstamp`, `crdate`, `cruser_id`, `deleted`, `disable`, `starttime`, `endtime`, `description`, `tx_extbase_type`, `username`, `password`, `usergroup`, `name`, `first_name`, `middle_name`, `last_name`, `address`, `telephone`, `fax`, `email`, `lockToDomain`, `uc`, `title`, `zip`, `city`, `country`, `www`, `company`, `image`, `TSconfig`, `lastlogin`, `is_online`, `felogin_redirectPid`, `felogin_forgotHash`, `tx_igldapssoauth_dn`, `tx_igldapssoauth_id`)
VALUES
(1, 178, 0, 0, 0, 0, 0, 0, 0, NULL, '0', 't3o_monitoring', 't3o_monitoring_password', NULL, 'Monitoring user', 'Monitoring', '', 'user', '', '', '', '', '', NULL, '', '', '', '', '', '', NULL, NULL, 0, 0, NULL, '', '', 0);
--
-- Table structure for table `pages`
--
Tests/acceptance.suite.yml
View file @
9e8a9236
...
...
@@ -29,9 +29,9 @@ modules:
user
:
'
db'
password
:
'
db'
host
:
'
db'
dump
:
'
T
ests/_data/Dumps/Fixture.sql'
dump
:
'
t
ests/_data/Dumps/Fixture.sql'
populate
:
true
cleanup
:
true
populator
:
'
mysql
--host=$host
--user=$user
--password=$password
$dbName
<
$dump'
populator
:
'
mysql
--host=$host
--user=$user
--password=$password
$dbName
<
$dump
&&
vendor/bin/typo3cms
database:updateschema
'
-
T3o\TestHelpers\Modules\Login
step_decorators
:
~
Tests/acceptance/Features/BaseTest.feature
deleted
100644 → 0
View file @
4e8400c5
Background
:
I
test the tests
Scenario
:
Typo3.org is callable
Given
I am on
"/"
Then
I should see
"No physical TYPO3 association meetings"
Tests/acceptance/Features/HomepageTest.feature
0 → 100644
View file @
9e8a9236
Feature
:
Homepage is callable
Scenario
:
Typo3.org homepage is callable
Given
I am on
"/"
Then
I should see
"TYPO3 — the Professional, Flexible Content Management System"
codeception.yml
View file @
9e8a9236
paths
:
tests
:
T
ests
output
:
T
ests/_output
data
:
T
ests/_data
support
:
T
ests/_support
envs
:
T
ests/_envs
tests
:
t
ests
output
:
t
ests/_output
data
:
t
ests/_data
support
:
t
ests/_support
envs
:
t
ests/_envs
actor_suffix
:
Tester
extensions
:
enabled
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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