From c6b16061bb6d8ca9e0da76eb790b601c2c342779 Mon Sep 17 00:00:00 2001 From: Michael Andrewartha Date: Thu, 21 Nov 2013 11:18:05 +1300 Subject: [PATCH] Adding behat test for changing theme of site using CMS dropdown --- tests/behat/features/settings-main.feature | 26 +++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tests/behat/features/settings-main.feature b/tests/behat/features/settings-main.feature index aaf68a94..0fc244b5 100644 --- a/tests/behat/features/settings-main.feature +++ b/tests/behat/features/settings-main.feature @@ -1,19 +1,18 @@ -Feature: Edit site wide title and tagline +Feature: Edit site wide settings As a site administrator - I want to configure the sites title and tagline + I want to configure the sites title, tagline and theme So that I dont have to change any templates Background: - Given a "page" "home" + Given I am logged in with "ADMIN" permissions + And a "page" "home" + And I go to "/admin/settings" @javascript Scenario: I can edit my Site title and Tagline - Given I am logged in with "ADMIN" permissions - And I go to "/admin/settings" - Then I should see an edit page form + Given I should see an edit page form And I should see "Site title" And I should see "Tagline" - And I should see "Theme" When I fill in "Site title" with "Test Site" And I fill in "Tagline" with "Site is under construction" @@ -23,4 +22,15 @@ Feature: Edit site wide title and tagline When I go to "/home" Then I should see "Test Site" - And I should see "Site is under construction" \ No newline at end of file + And I should see "Site is under construction" + + Scenario: I can change the theme of the website + Given I should see an edit page form + And I should see "Theme" + + When I select "tutorial" from "Theme" + And I press the "Save" button + And I reload the page + + When I go to "/home" + Then I should see "Visit www.silverstripe.com to download the CMS" \ No newline at end of file