From e33bfb2755b5a8284f195d23246dc28ee07d07c5 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 4 Oct 2010 06:11:04 +0000 Subject: [PATCH] ENHANCEMENT: Updated automatic regression tests (Salad) (from r101871) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111649 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/cuke/login.feature | 5 ++++- tests/cuke/logout.feature | 12 ++++++------ tests/cuke/step_definitions/content.rb | 2 +- tests/cuke/step_definitions/log-in.rb | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/cuke/login.feature b/tests/cuke/login.feature index 81a2101a..3c7707da 100644 --- a/tests/cuke/login.feature +++ b/tests/cuke/login.feature @@ -11,7 +11,7 @@ Feature: Log in Then I am sent to Security/login Scenario: valid login - When I fill out the log in form with user "admin" and password "password" + When I fill out the login form with user "admin" and password "password" Then I see "You're logged in as" Scenario: no password login @@ -34,3 +34,6 @@ Feature: Log in And I click the "Log in" button Then I am sent to admin + Scenario: Re-login + Given I visit Security/logout + Then I log into the CMS as admin diff --git a/tests/cuke/logout.feature b/tests/cuke/logout.feature index 97761fef..04ab5c6f 100644 --- a/tests/cuke/logout.feature +++ b/tests/cuke/logout.feature @@ -7,14 +7,14 @@ Feature: Log out Given I log into the CMS as admin And I click the "Log out" link When I visit admin/ - Then I see "Enter your username and password to access the CMS." + Then I see "Please choose an authentication method and enter your credentials to access the CMS." When I visit admin/assets/ - Then I see "Enter your username and password to access the CMS." + Then I see "Please choose an authentication method and enter your credentials to access the CMS." When I visit admin/comments/ - Then I see "Enter your username and password to access the CMS." + Then I see "Please choose an authentication method and enter your credentials to access the CMS." When I visit admin/reports/ - Then I see "Enter your username and password to access the CMS." + Then I see "Please choose an authentication method and enter your credentials to access the CMS." When I visit admin/security/ - Then I see "Enter your username and password to access the CMS." + Then I see "Please choose an authentication method and enter your credentials to access the CMS." When I visit admin/subsites/ - Then I see "Enter your username and password to access the CMS." \ No newline at end of file + Then I see "Please choose an authentication method and enter your credentials to access the CMS." \ No newline at end of file diff --git a/tests/cuke/step_definitions/content.rb b/tests/cuke/step_definitions/content.rb index 379671dd..157bfa63 100644 --- a/tests/cuke/step_definitions/content.rb +++ b/tests/cuke/step_definitions/content.rb @@ -36,7 +36,7 @@ Given /I load the "(.*)" root-level page/ do |nav| end Given /I load the root node/ do - Given 'I click the "admin/0" link' + Given 'I click the "admin/show/root" link' end Given /create a new page$/i do diff --git a/tests/cuke/step_definitions/log-in.rb b/tests/cuke/step_definitions/log-in.rb index 7aadcab6..04fc610e 100644 --- a/tests/cuke/step_definitions/log-in.rb +++ b/tests/cuke/step_definitions/log-in.rb @@ -2,7 +2,7 @@ # Log in Given /log in as (.*)$/ do |user| Given "I fill out the log in form with user \"#{user}\" and password \"password\"" - And 'I see "Your are logged in as"' + And 'I see "You\'re logged in as"' end Given /log into the CMS as (.*)/ do |user|