Skip to content

Commit

Permalink
Added basic 403, 404 and 200 codes behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Sep 27, 2024
1 parent 58a890f commit 7fd4da0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions aljibe-kickstart/tests/behat/local/features/200.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature:
As a Maintainer
I want to check that main pages are accesible

@behat
Scenario: Homepage is working
Given I go to "/"
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
18 changes: 18 additions & 0 deletions aljibe-kickstart/tests/behat/local/features/403.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature:
As a Maintainer
I want to check that blocked pages are not accesible

@behat
Scenario: Admin area is not accesible
Given I go to "/admin"
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
8 changes: 8 additions & 0 deletions aljibe-kickstart/tests/behat/local/features/404.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Feature:
As a Maintainer
I want to check that some urls return not found code

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

0 comments on commit 7fd4da0

Please sign in to comment.