Skip to content

Commit d49753c

Browse files
committed
changed specs in order to match new page root element class name
1 parent 6aef3b5 commit d49753c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

spec/test/base/core/app/layout_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def page2
6161
visit "app_layout_spec/layout_page1"
6262

6363
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/h1[contains(.,"My Example App Layout")]')
64-
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/main/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[@id="my-div-on-page-1"]/h2[contains(.,"This is Page 1")]')
64+
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/main/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[@id="my-div-on-page-1"]/h2[contains(.,"This is Page 1")]')
6565

6666
visit "app_layout_spec/layout_page2"
6767
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/h1[contains(.,"My Example App Layout")]')
68-
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/main/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[@id="my-div-on-page-2"]/h2[contains(.,"This is Page 2")]')
68+
expect(page).to have_xpath('//div[@class="matestack-app-wrapper"]/main/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[@id="my-div-on-page-2"]/h2[contains(.,"This is Page 2")]')
6969
end
7070

7171
end

spec/test/base/core/render/app_resolving_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def example
3939
visit "render_app_resolving_spec/example"
4040

4141
# dom structure implies correct rendering with wrapping minimal app
42-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
42+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
4343
expect(text).to eq("hello from page")
4444
end
4545

@@ -86,11 +86,11 @@ def second_example
8686

8787
visit "render_app_resolving_spec/example"
8888
# dom structure implies correct rendering with wrapping specified app
89-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
89+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
9090

9191
visit "render_app_resolving_spec/second_example"
9292
# dom structure implies correct rendering with wrapping specified app
93-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
93+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
9494
expect(text).to eq("hello from page")
9595
end
9696

@@ -138,12 +138,12 @@ def second_example
138138

139139
visit "render_app_resolving_spec/example"
140140
# dom structure implies correct rendering with wrapping specified app
141-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
141+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
142142
expect(text).to eq("hello from page")
143143

144144
visit "render_app_resolving_spec/second_example"
145145
# dom structure implies correct rendering with wrapping specified app
146-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
146+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
147147
expect(text).to eq("hello from page")
148148
end
149149

@@ -174,12 +174,12 @@ def second_example
174174

175175
visit "render_app_resolving_spec/example"
176176
# dom structure implies correct rendering with wrapping specified app
177-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
177+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
178178
expect(text).to eq("hello from page")
179179

180180
visit "render_app_resolving_spec/second_example"
181181
# dom structure implies correct rendering without app
182-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-page"]/div').text
182+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-page-root"]/div').text
183183
expect(text).to eq("hello from page")
184184
end
185185

@@ -240,12 +240,12 @@ def second_example
240240

241241
visit "render_app_resolving_spec/example"
242242
# dom structure implies correct rendering with wrapping specified app
243-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
243+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
244244
expect(text).to eq("hello from example page")
245245

246246
visit "render_app_resolving_spec/second_example"
247247
# dom structure implies correct rendering with wrapping specified app
248-
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page"]/div[1]').text
248+
text = find(:xpath, 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]').text
249249
expect(text).to eq("hello from some other example page")
250250
end
251251

0 commit comments

Comments
 (0)