initial behat test suite (failing on javascript)

This commit is contained in:
Ivo Valchev
2019-10-16 12:19:50 +02:00
parent 4e437f32c0
commit 21100bb69f
6 changed files with 31 additions and 3 deletions

View File

@@ -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"]

View File

@@ -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",

View File

@@ -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);
}
}

View 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"

View File

@@ -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

View File

@@ -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",