Skip to content

Commit

Permalink
Updated response code behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Sep 27, 2024
1 parent 7fd4da0 commit aa6ee75
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 37 deletions.
23 changes: 8 additions & 15 deletions aljibe-kickstart/tests/behat/local/features/200.feature
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
Feature:
As a Maintainer
I want to check that main pages are accesible
Feature: As a user
I want to visit the following pages
So that I can browse the site!

@behat
Scenario: Homepage is working
Given I go to "/"
Scenario Outline: 200 response
When I go to "<url>"
Then the response status code should be 200

@behat
Scenario: Robots.txt is working
Given I go to "/robots.txt"
Then the response status code should be 200

# @behat
# Scenario: Sitemap is working
# Given I go to "/sitemap.xml"
# Then the response status code should be 200
Examples:
| url |
| / |
25 changes: 10 additions & 15 deletions aljibe-kickstart/tests/behat/local/features/403.feature
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
Feature:
As a Maintainer
I want to check that blocked pages are not accesible
Feature: As a system
I want to block the following pages
So user cannot access where they should not!

@behat
Scenario: Admin area is not accesible
Given I go to "/admin"
Scenario Outline: 403 response
When I go to "<url>"
Then the response status code should be 403

@behat
Scenario: User root profile page is not acccesible
Given I go to "/user/1"
Then the response status code should be 403

@behat
Scenario: User register page is not acccesible
Given I go to "/user/register"
Then the response status code should be 403
Examples:
| url |
| /admin |
| /user/1 |
| /user/register |
17 changes: 10 additions & 7 deletions aljibe-kickstart/tests/behat/local/features/404.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Feature:
As a Maintainer
I want to check that some urls return not found code
Feature: As a system
I want to make not-found the following pages
So user cannot access where they should not!

@behat
Scenario: Homepage works
Given I go to "/url-not-working"
Then the response status code should be 404
Scenario Outline: 404 response
When I go to "<url>"
Then the response status code should be 404

Examples:
| url |
| /url-not-found |

0 comments on commit aa6ee75

Please sign in to comment.