File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -94,5 +94,51 @@ def response
9494 end
9595 end
9696
97+ describe "implicit rendering for custom actions" , type : :feature , js : true do
98+ before do
99+ module Clients
100+ end
101+
102+ class Clients ::BookingsController < ApplicationController
103+ include Matestack ::Ui ::Core ::ApplicationHelper
104+
105+ def step1
106+ end
107+ end
108+
109+ Rails . application . routes . draw do
110+ namespace :clients do
111+ get 'bookings/step1' , to : 'bookings#step1'
112+ end
113+ end
114+
115+ class Apps ::Clients < Matestack ::Ui ::App
116+ def response
117+ components {
118+ page_content
119+ }
120+ end
121+ end
122+
123+ module Pages ::Clients
124+ end
125+
126+ class Pages ::Clients ::Bookings ::Step1 < Matestack ::Ui ::Page
127+ def response
128+ components {
129+ plain "Hello from the Pages::Clients::Bookings::Step1 page."
130+ }
131+ end
132+ end
133+ end
134+ after do
135+ Rails . application . reload_routes!
136+ end
137+ specify do
138+ visit "/clients/bookings/step1"
139+ expect ( page ) . to have_text "Hello from the Pages::Clients::Bookings::Step1 page."
140+ end
141+ end
142+
97143 end
98144end
You can’t perform that action at this time.
0 commit comments