Compare commits

..

No commits in common. "e50667b3924f6ecab58a13ec15b7a41891a15e95" and "cc1fe1c3b772a5e0717a0eb77fc0d0ec93e373f1" have entirely different histories.

3 changed files with 27 additions and 42 deletions

18
Jenkinsfile vendored
View File

@ -25,7 +25,7 @@ pipeline {
}
stage('Run tests') {
steps {
sh 'cucumber features --format html --out coverage/cucumber.html'
sh 'cucumber features --format json --out cucumber.json'
}
}
stage('Report results') {
@ -36,21 +36,11 @@ pipeline {
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'coverage',
reportFiles: 'cucumber.html, index.html',
reportFiles: 'index.html',
reportName: 'Test Results',
reportTitles: 'Cucumber Results, Test Coverage'])
reportTitles: 'Test Coverage'])
cucumber buildStatus: 'UNCHANGED', customCssFiles: '', customJsFiles: '', failedFeaturesNumber: -1, failedScenariosNumber: -1, failedStepsNumber: -1, fileIncludePattern: '**/cucumber.json', pendingStepsNumber: -1, skippedStepsNumber: -1, sortingMethod: 'ALPHABETICAL', undefinedStepsNumber: -1
}
}
}
post {
success {
mattermostSend channel: 'git-messages', color: 'good', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: 'Build Finished Successfully'
}
unstable {
mattermostSend channel: 'git-messages', color: 'warning', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: "Build Unstable"
}
failure {
mattermostSend channel: 'git-messages', color: 'danger', message: "[${JOB_NAME}](${JOB_URL}) [#${BUILD_NUMBER}](${BUILD_URL}) ([Gitea](${GIT_URL}))", text: "Build Failed"
}
}
}

View File

@ -10,3 +10,26 @@ Feature: Homepage
And I should see the message "Enter a URL"
And I should see a form field "url"
And I should see a "Submit" button
Scenario: Submitting the form without entering a URL
Given I visit the "/" page
When I click the "Submit" button
Then I should be on "/" page
And I should see the message "Please enter a valid URL"
@db-test
Scenario: Submitting the form with a correct URL
Given I visit the "/" page
When I type "http://google.com" in the "url" field
And I click the "Submit" button
Then I should be on "/create" page
And I should see the message "Link created"
@db-test
Scenario: Submitting the form with an existing URL
Given I visit the "/" page
And A link already exists with the url "http://google.com"
When I type "http://google.com" in the "url" field
And I click the "Submit" button
Then I should be on "/create" page
And I should see the message "Link exists"

View File

@ -1,28 +0,0 @@
# features/submit.feature
Feature: Submit
Submitting URL's on the homepage
Scenario: Submitting the form without entering a URL
Given I visit the "/" page
When I click the "Submit" button
Then I should be on "/" page
And I should see the message "Please enter a valid URL"
@db-test
Scenario: Submitting the form with a correct URL
Given I visit the "/" page
When I type "http://google.com" in the "url" field
And I click the "Submit" button
Then I should be on "/create" page
And I should see the message "Link created"
@db-test
Scenario: Submitting the form with an existing URL
Given I visit the "/" page
And A link already exists with the url "http://google.com"
When I type "http://google.com" in the "url" field
And I click the "Submit" button
Then I should be on "/create" page
And I should see the message "Link exists"