mirror of
https://github.com/jbcr/core.git
synced 2026-03-30 12:52:16 +02:00
initial behat test suite (failing on javascript)
This commit is contained in:
@@ -24,11 +24,13 @@ default:
|
||||
screenshot: false
|
||||
|
||||
Behat\MinkExtension:
|
||||
browser_name: chrome
|
||||
base_url: 'http://127.0.0.1:8088/'
|
||||
goutte: ~
|
||||
selenium2: ~
|
||||
sessions:
|
||||
default:
|
||||
goutte: ~
|
||||
selenium2: ~
|
||||
|
||||
Behatch\Extension: ~
|
||||
|
||||
@@ -39,4 +41,4 @@ default:
|
||||
contexts:
|
||||
- Behatch\Context\JsonContext
|
||||
- Context\FeatureContext
|
||||
paths: [ "%paths.base%/tests/api" ]
|
||||
paths: [ "%paths.base%/tests/api"]
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
"ext-pdo": "*",
|
||||
"antishov/doctrine-extensions-bundle": "^1.4",
|
||||
"api-platform/core": "^2.4",
|
||||
"behat/mink-selenium2-driver": "^1.3",
|
||||
"bolt/common": "^2.1.0",
|
||||
"cocur/slugify": "^3.2",
|
||||
"composer/composer": "^1.9",
|
||||
"dmore/chrome-mink-driver": "^2.7",
|
||||
"doctrine/annotations": "^1.7",
|
||||
"doctrine/doctrine-bundle": "^1.11",
|
||||
"doctrine/doctrine-cache-bundle": "^1.3.1",
|
||||
@@ -71,8 +73,10 @@
|
||||
"acmecorp/reference-extension": "^1.0",
|
||||
"behat/behat": "^3.5",
|
||||
"behat/mink": "dev-master@dev",
|
||||
"behat/mink-browserkit-driver": "^1.3",
|
||||
"behat/mink-extension": "^2.3",
|
||||
"behat/mink-goutte-driver": "^1.2",
|
||||
"behat/symfony2-extension": "^2.1",
|
||||
"behatch/contexts": "^3.2",
|
||||
"bobdenotter/weatherwidget": "^1.0",
|
||||
"bolt/newswidget": "^1.0",
|
||||
|
||||
@@ -226,4 +226,12 @@ class FeatureContext extends MinkContext implements Context
|
||||
|
||||
return $client;
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^wait (\d+) seconds?$/
|
||||
*/
|
||||
public function waitSeconds($seconds)
|
||||
{
|
||||
$this->getSession()->wait(1000*$seconds);
|
||||
}
|
||||
}
|
||||
|
||||
7
tests/api/content/homepage.feature
Normal file
7
tests/api/content/homepage.feature
Normal file
@@ -0,0 +1,7 @@
|
||||
Feature: Homepage
|
||||
@javascript
|
||||
Scenario: I want to display Homepage
|
||||
When I am on "/"
|
||||
And wait 5 seconds
|
||||
Then I should see "Bolt Core Git Clone"
|
||||
And I should see "Recent Pages"
|
||||
@@ -15,5 +15,12 @@ Feature: Filemanager
|
||||
Then there is element "header" with text "Content files"
|
||||
And there is element "path" with text "Path: files/"
|
||||
|
||||
Scenario: As an Admin I want to upload files in the "Files" section
|
||||
Given I am logged in as "admin"
|
||||
|
||||
When I visit the "filemanager" page with parameters:
|
||||
| area | files |
|
||||
And I fill the form
|
||||
Then there is element "svg" with height "55px"
|
||||
# @todo Add tests for uploading files, and verifying that they're there
|
||||
|
||||
@@ -50,7 +50,7 @@ module.exports = {
|
||||
"clearCookiesAfterScenario": true,
|
||||
"clearLocalStorageAfterScenario": true,
|
||||
"email": null,
|
||||
"headless": true,
|
||||
"headless": false,
|
||||
"noGpu": false,
|
||||
"type": "otherWeb",
|
||||
"baseUrl": "http://127.0.0.1:8088",
|
||||
|
||||
Reference in New Issue
Block a user