jamesfredley commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825305221


##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/BookFunctionalSpec.groovy:
##########
@@ -28,24 +31,23 @@ class BookFunctionalSpec extends ContainerGebSpec {
 
     void "Test that when the /viewBooks URL is hit it redirects to the book 
list"() {
         when: "We go to the book URI"
-        go "/book/index"
+        to(BookListPage)
 
         then: "Then thew show book view is rendered"
-        title == "Book List"
+        at(BookListPage)
     }
 
     void "Test that a book was created in the Bootstrap class"() {
         when: "We go to the book URI"
-        go('/book/show/1')
+        to(BookShowPage, 1)

Review Comment:
   This is actually correct as-is. Geb appends extra args as path segments, so 
to(BookShowPage, 1) navigates to /book/show/1. No URL closures or parameter 
placeholders needed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BookListPage.groovy:
##########
@@ -0,0 +1,29 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package functionaltests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   Fixed - added leading slashes to all 28 Page Object URLs for consistency 
with the geb and scaffolding-fields conventions.



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/pages/AdminPagePage.groovy:
##########
@@ -0,0 +1,29 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package namespaces.pages
+
+import geb.Page
+
+class AdminPagePage extends Page {

Review Comment:
   Fixed - renamed to AdminPage and updated PageControllerSpec references.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to