You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/02/19 01:46:25 UTC

[PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

jamesfredley opened a new pull request, #15410:
URL: https://github.com/apache/grails-core/pull/15410

   ## Summary
   
   Extends the Page Object pattern from #15394 to all remaining Geb functional tests across the repository, eliminating flaky bare `title == 'X'` assertions that fail intermittently due to race conditions between `driver.get()` and page title availability.
   
   ## Changes
   
   **28 new Page Object classes** created across 8 subprojects following the exact convention from #15394:
   - `static String pageTitle` - page title constant
   - `static url` - relative URL path
   - `static at = { title == pageTitle }` - at-check closure
   - `static content` - only when needed (e.g., form elements)
   
   **24 spec files refactored:**
   - `go('/url')` replaced with `to(PageObject)` for initial navigation
   - Bare `title == 'X'` in `then:` blocks replaced with `at(PageObject)`
   - `waitFor { title == PageObject.pageTitle }` used only for post-click async transitions
   - `go()` + `waitFor` retained for special cases (context paths, interceptor routing, parameterized URLs)
   
   **Subprojects affected:** app1, app2, app3, exploded, geb, hibernate5, mongodb (base + hibernate5), namespaces, scaffolding-fields, grails-geb (template)
   
   ## Special Cases
   
   - **app2/NotFoundHandlerSpec**: Same URL returns different pages based on interceptor - kept `go()` with `waitFor` and Page Object `pageTitle` references
   - **namespaces/ContextPathSpec**: Context path navigation doesn't map to Page Object URLs - kept `go()` with `waitFor`
   - **grails-geb template**: Code generation template can't reference project-specific Page Objects - uses `waitFor` directly
   - **geb subproject specs**: Already used `to(PageObject)` correctly - reverted unnecessary `waitFor` additions
   - **grails-data-neo4j**: Not in current build, uses old `GebSpec` - skipped
   
   ## Verification
   
   - `./gradlew codeStyle` passes (all CodeNarc checks clean)
   - All new Page Object files include Apache license headers
   - No wildcard imports added
   - Follows existing 4-space indentation and code conventions


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825308486


##########
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 {
+
+    static String pageTitle = 'Admin Page'
+
+    static url = 'myAppTest/admin/page/index'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BookShowPage.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 BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooLayoutPage.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 FooLayoutPage extends Page {
+
+    static String pageTitle = 'Foo Layout'
+
+    static url = 'layoutSpecifiedByProperty'

Review Comment:
   Fixed.



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/pages/FrontendPagePage.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 FrontendPagePage extends Page {
+
+    static String pageTitle = 'Frontend Page'
+
+    static url = 'myAppTest/page/index'

Review Comment:
   Fixed.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825275228


##########
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:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes (e.g., '/book/index' instead of 'book/index'). This pattern is consistently used in the geb subproject (HomePage, UploadPage) and scaffolding-fields subproject (EmployeeListPage, DepartmentListPage).
   ```suggestion
       static url = '/book/index'
   ```



##########
grails-test-examples/app3/src/integration-test/groovy/app3/pages/LoginAuthPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app3.pages
+
+import geb.Page
+
+class LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/login/auth'
   ```



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BarListPage.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 BarListPage extends Page {
+
+    static String pageTitle = 'Bar List'
+
+    static url = 'bar/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes (e.g., '/bar/index' instead of 'bar/index').
   ```suggestion
       static url = '/bar/index'
   ```



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BookShowPage.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 BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes (e.g., '/book/show' instead of 'book/show').
   ```suggestion
       static url = '/book/show'
   ```



##########
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:
   The class name "AdminPagePage" is redundant with "Page" appearing twice. Consider renaming to "AdminPage" for clarity and consistency with other Page Objects like "HomePage", "BookListPage", etc.



##########
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:
   Using `to(BookShowPage, 1)` will not work as expected because the BookShowPage URL doesn't define parameter placeholders. Geb's `to()` method with parameters expects the Page Object's URL to be defined as a closure or list that handles the parameters (e.g., `static url = { id -> "/book/show/$id" }`). The original `go('/book/show/1')` approach was more appropriate for this case, or the BookShowPage URL needs to be updated to accept parameters.
   ```suggestion
           go "/book/show/1"
   ```



##########
grails-test-examples/app2/src/integration-test/groovy/app2/pages/FooListPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app2.pages
+
+import geb.Page
+
+class FooListPage extends Page {
+
+    static String pageTitle = 'Foo List'
+
+    static url = 'foo/index?user=admin'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/foo/index?user=admin'
   ```



##########
grails-test-examples/hibernate5/grails-hibernate/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/AuthorShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class AuthorShowPage extends Page {
+
+    static String pageTitle = 'Show Author'
+
+    static url = 'author/show'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/ConventionLayoutPage.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 ConventionLayoutPage extends Page {
+
+    static String pageTitle = 'Convention Layout'
+
+    static url = 'layoutByConvention'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/layoutByConvention'
   ```



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/LoginAuthPage.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 LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/login/auth'
   ```



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooLayoutSnippetPage.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 FooLayoutSnippetPage extends Page {
+
+    static String pageTitle = 'Foo Layout'
+
+    static url = 'layoutSpecifiedByProperty/snippetView'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/layoutSpecifiedByProperty/snippetView'
   ```



##########
grails-test-examples/mongodb/base/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/ActionReturnsNullPage.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 ActionReturnsNullPage extends Page {
+
+    static String pageTitle = 'Action Which Returns Null GSP'
+
+    static url = 'misc/actionWhichReturnsNull'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/misc/actionWhichReturnsNull'
   ```



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/admin/pages/AdminReportPage.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.admin.pages
+
+import geb.Page
+
+class AdminReportPage extends Page {
+
+    static String pageTitle = 'Admin Report'
+
+    static url = 'myAppTest/admin/report/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/hibernate5/grails-hibernate/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/book/index'
   ```



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/PartialPage.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 PartialPage extends Page {
+
+    static String pageTitle = 'Welcome to My Partial'
+
+    static url = 'layoutTemplate/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/layoutTemplate/index'
   ```



##########
grails-test-examples/mongodb/base/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooListPage.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 FooListPage extends Page {
+
+    static String pageTitle = 'Foo List'
+
+    static url = 'foo/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes (e.g., '/foo/index' instead of 'foo/index').
   ```suggestion
       static url = '/foo/index'
   ```



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/admin/pages/ReportPage.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.admin.pages
+
+import geb.Page
+
+class ReportPage extends Page {
+
+    static String pageTitle = 'Admin Report'
+
+    static url = 'myAppTest/report/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/AuthorListPage.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 functional.tests.pages
+
+import geb.Page
+
+class AuthorListPage extends Page {
+
+    static String pageTitle = 'Author List'
+
+    static url = 'author/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app2/src/integration-test/groovy/app2/pages/PageNotFoundPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app2.pages
+
+import geb.Page
+
+class PageNotFoundPage extends Page {
+
+    static String pageTitle = 'Page Not Found'
+
+    static url = 'foo/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/foo/index'
   ```



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/pages/FrontendPagePage.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 FrontendPagePage extends Page {

Review Comment:
   The class name "FrontendPagePage" is redundant with "Page" appearing twice. Consider renaming to "FrontendPage" for clarity and consistency with other Page Objects like "HomePage", "BookListPage", etc.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BookCreatePage.groovy:
##########
@@ -0,0 +1,33 @@
+/*
+ *  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 BookCreatePage extends Page {
+
+    static String pageTitle = 'Create Book'
+
+    static url = 'book/create'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes (e.g., '/book/create' instead of 'book/create').
   ```suggestion
       static url = '/book/create'
   ```



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/exploded/src/integration-test/groovy/exploded/pages/LoginAuthPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 exploded.pages
+
+import geb.Page
+
+class LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/login/auth'
   ```



##########
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 {
+
+    static String pageTitle = 'Admin Page'
+
+    static url = 'myAppTest/admin/page/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/pages/FrontendPagePage.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 FrontendPagePage extends Page {
+
+    static String pageTitle = 'Frontend Page'
+
+    static url = 'myAppTest/page/index'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooLayoutPage.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 FooLayoutPage extends Page {
+
+    static String pageTitle = 'Foo Layout'
+
+    static url = 'layoutSpecifiedByProperty'

Review Comment:
   The static url property should have a leading slash to match the established codebase convention. All existing Page Objects in the repository use leading slashes.
   ```suggestion
       static url = '/layoutSpecifiedByProperty'
   ```



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825306883


##########
grails-test-examples/app3/src/integration-test/groovy/app3/pages/LoginAuthPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app3.pages
+
+import geb.Page
+
+class LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   Fixed.



##########
grails-test-examples/hibernate5/grails-hibernate/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/base/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/BookShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class BookShowPage extends Page {
+
+    static String pageTitle = 'Show Book'
+
+    static url = 'book/show'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/LoginAuthPage.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 LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooLayoutSnippetPage.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 FooLayoutSnippetPage extends Page {
+
+    static String pageTitle = 'Foo Layout'
+
+    static url = 'layoutSpecifiedByProperty/snippetView'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/ConventionLayoutPage.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 ConventionLayoutPage extends Page {
+
+    static String pageTitle = 'Convention Layout'
+
+    static url = 'layoutByConvention'

Review Comment:
   Fixed.



##########
grails-test-examples/hibernate5/grails-hibernate/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/AuthorShowPage.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 functional.tests.pages
+
+import geb.Page
+
+class AuthorShowPage extends Page {
+
+    static String pageTitle = 'Show Author'
+
+    static url = 'author/show'

Review Comment:
   Fixed.



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/admin/pages/AdminReportPage.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.admin.pages
+
+import geb.Page
+
+class AdminReportPage extends Page {
+
+    static String pageTitle = 'Admin Report'
+
+    static url = 'myAppTest/admin/report/index'

Review Comment:
   Fixed.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825307713


##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BarListPage.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 BarListPage extends Page {
+
+    static String pageTitle = 'Bar List'
+
+    static url = 'bar/index'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/ActionReturnsNullPage.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 ActionReturnsNullPage extends Page {
+
+    static String pageTitle = 'Action Which Returns Null GSP'
+
+    static url = 'misc/actionWhichReturnsNull'

Review Comment:
   Fixed.



##########
grails-test-examples/app2/src/integration-test/groovy/app2/pages/PageNotFoundPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app2.pages
+
+import geb.Page
+
+class PageNotFoundPage extends Page {
+
+    static String pageTitle = 'Page Not Found'
+
+    static url = 'foo/index'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/pages/AuthorListPage.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 functional.tests.pages
+
+import geb.Page
+
+class AuthorListPage extends Page {
+
+    static String pageTitle = 'Author List'
+
+    static url = 'author/index'

Review Comment:
   Fixed.



##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/admin/pages/ReportPage.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.admin.pages
+
+import geb.Page
+
+class ReportPage extends Page {
+
+    static String pageTitle = 'Admin Report'
+
+    static url = 'myAppTest/report/index'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/FooListPage.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 FooListPage extends Page {
+
+    static String pageTitle = 'Foo List'
+
+    static url = 'foo/index'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/PartialPage.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 PartialPage extends Page {
+
+    static String pageTitle = 'Welcome to My Partial'
+
+    static url = 'layoutTemplate/index'

Review Comment:
   Fixed.



##########
grails-test-examples/exploded/src/integration-test/groovy/exploded/pages/LoginAuthPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 exploded.pages
+
+import geb.Page
+
+class LoginAuthPage extends Page {
+
+    static String pageTitle = 'My Plugin Login Auth'
+
+    static url = 'login/auth'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/base/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   Fixed.



##########
grails-test-examples/app1/src/integration-test/groovy/functionaltests/pages/BookCreatePage.groovy:
##########
@@ -0,0 +1,33 @@
+/*
+ *  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 BookCreatePage extends Page {
+
+    static String pageTitle = 'Create Book'
+
+    static url = 'book/create'

Review Comment:
   Fixed.



##########
grails-test-examples/mongodb/hibernate5/src/integration-test/groovy/functional/tests/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 functional.tests.pages
+
+import geb.Page
+
+class BookListPage extends Page {
+
+    static String pageTitle = 'Book List'
+
+    static url = 'book/index'

Review Comment:
   Fixed.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on code in PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#discussion_r2825305999


##########
grails-test-examples/namespaces/src/integration-test/groovy/namespaces/pages/FrontendPagePage.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 FrontendPagePage extends Page {

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



##########
grails-test-examples/app2/src/integration-test/groovy/app2/pages/FooListPage.groovy:
##########
@@ -0,0 +1,30 @@
+/*
+ *  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 app2.pages
+
+import geb.Page
+
+class FooListPage extends Page {
+
+    static String pageTitle = 'Foo List'
+
+    static url = 'foo/index?user=admin'

Review Comment:
   Fixed.



-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #15410:
URL: https://github.com/apache/grails-core/pull/15410#issuecomment-3927552792

   Assuming @matrei is ok with these changes, I'm ok to merge.


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: use Page Object pattern for flaky Geb tests across all subprojects [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #15410:
URL: https://github.com/apache/grails-core/pull/15410


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org