Added a failing feature for #336.
This commit is contained in:
parent
ea62835b2e
commit
22f34a5a60
13
features/backoffice/mounting.feature
Normal file
13
features/backoffice/mounting.feature
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Feature: Mounting Locomotive CMS
|
||||||
|
As an administrator
|
||||||
|
In order to gain some flexibility when mounting locomotive CMS
|
||||||
|
I want to be able to mount locomotove on any given path
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given I have a site set up
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: Accessing the backend when mounted on a custom path
|
||||||
|
Given the engine is mounted on a non standard path
|
||||||
|
And I am an authenticated "admin"
|
||||||
|
Then I should be able to access the backend
|
16
features/step_definitions/backoffice/mounting_steps.rb
Normal file
16
features/step_definitions/backoffice/mounting_steps.rb
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Given /^the engine is mounted on a non standard path$/ do
|
||||||
|
Rails.application.routes.draw do
|
||||||
|
mount Locomotive::Engine => '/my-custom-path', :as => 'locomotive'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should be able to access the backend$/ do
|
||||||
|
# Ensure we can access the backend
|
||||||
|
visit '/my-custom-path'
|
||||||
|
page.should have_content 'LocomotiveCMS'
|
||||||
|
|
||||||
|
# Ensure we can update the homepage content
|
||||||
|
click_link 'Home page'
|
||||||
|
click_button 'Save'
|
||||||
|
page.should have_content 'Page was successfully updated'
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user