Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 7: grails-functional-tests resolve new failing tests #240

Open
jamesfredley opened this issue Sep 28, 2024 · 2 comments
Open

Grails 7: grails-functional-tests resolve new failing tests #240

jamesfredley opened this issue Sep 28, 2024 · 2 comments

Comments

@jamesfredley
Copy link
Contributor

jamesfredley commented Sep 28, 2024

Currently annotated with @PendingFeature or @Ignore to skip

Commit: 330370a

4 are now passing: https://github.com/grails/grails-functional-tests/pull/245/files

3 more are now passing: #251

> Task :app1:test

BookHibernateSpec > Test that dynamic finders work FAILED
    java.lang.IllegalStateException: Either class [functionaltests.Book] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity.
        at org.grails.datastore.gorm.GormEnhancer.stateException(GormEnhancer.groovy:467)
        at org.grails.datastore.gorm.GormEnhancer.findInstanceApi(GormEnhancer.groovy:315)
        at org.grails.datastore.gorm.GormEnhancer.findInstanceApi(GormEnhancer.groovy:312)
        at org.grails.datastore.gorm.GormEntity$Trait$Helper.currentGormInstanceApi(GormEntity.groovy:1366)
        at org.grails.datastore.gorm.GormEntity$Trait$Helper.save(GormEntity.groovy:100)
        at functionaltests.BookHibernateSpec.setup(BookHibernateSpec.groovy:4)


> Task :app1:integrationTest


ErrorsFunctionalSpec > Test 500 mappings for custom exceptions FAILED
    Condition not satisfied:

    driver.pageSource.contains 'Message = Something bad'
    |      |          |
    |      |          false
    |      <html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1></body></html>
    FirefoxDriver: firefox on windows (123557e2-1b17-4da4-8352-7b6d3eb755f6)
        at app//functionaltests.ErrorsFunctionalSpec.$tt__$spock_feature_1_1(ErrorsFunctionalSpec.groovy:28)
        at functionaltests.ErrorsFunctionalSpec.Test 500 mappings for custom exceptions_closure2(ErrorsFunctionalSpec.groovy)
        at app//groovy.lang.Closure.call(Closure.java:433)
        at app//groovy.lang.Closure.call(Closure.java:422)
        at app//grails.gorm.transactions.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:68)
        at app//org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at app//grails.gorm.transactions.GrailsTransactionTemplate.executeAndRollback(GrailsTransactionTemplate.groovy:65)
        at functionaltests.ErrorsFunctionalSpec.Test 500 mappings for custom exceptions(ErrorsFunctionalSpec.groovy)


InterceptorFunctionalSpec > Test that an interceptor exception is handled correctly FAILED
    Condition not satisfied:

    $().text() == 'Message = Interceptor threw error'
    |   |      |
    |   |      false
    |   |      26 differences (33% similarity)
    |   |      (HTTP St)a(tus) (500) (– )Inter(nal---) (Se)r(v)e(r) (E)rror
    |   |      (Mess---)a(ge-) (=--) (--)Inter(ceptor) (th)r(-)e(w) (e)rror
    |   HTTP Status 500 – Internal Server Error
    [[[FirefoxDriver: firefox on windows (123557e2-1b17-4da4-8352-7b6d3eb755f6)] -> xpath: /*]]
        at functionaltests.InterceptorFunctionalSpec.Test that an interceptor exception is handled correctly(InterceptorFunctionalSpec.groovy:16)


InterceptorFunctionalSpec > Test that after interceptor can render text FAILED
    Condition not satisfied:

    $().text() == 'text rendered by interceptor'
    |   |      |
    |   |      false
    |   |      25 differences (10% similarity)
    |   |      (Page) (Not-----) (Fou-)n(d--------)
    |   |      (text) (rendered) (by i)n(terceptor)
    |   Page Not Found
    [[[FirefoxDriver: firefox on windows (123557e2-1b17-4da4-8352-7b6d3eb755f6)] -> xpath: /*]]
        at functionaltests.InterceptorFunctionalSpec.Test that after interceptor can render text(InterceptorFunctionalSpec.groovy:50)


UploadControllerSpec > Test file upload FAILED
    Condition not satisfied:

    $('p').text() == 'Test upload'
    |      |      |
    []     null   false
        at functionaltests.UploadControllerSpec.Test file upload(UploadControllerSpec.groovy:25)

UploadControllerSpec > Test file upload parameters FAILED
    Condition not satisfied:

    $('p').text() == 'ok'
    |      |      |
    []     null   false
        at functionaltests.UploadControllerSpec.Test file upload parameters(UploadControllerSpec.groovy:42)


SitemeshLayoutFunctionalSpec > test layout by convention FAILED
    Condition not satisfied:

    title == 'Convention Layout'
    |     |
    ""    false
          17 differences (0% similarity)
          (-----------------)
          (Convention Layout)
        at functionaltests.sitemesh.SitemeshLayoutFunctionalSpec.test layout by convention(SitemeshLayoutFunctionalSpec.groovy:17)

SitemeshLayoutFunctionalSpec > test layout specified in controller property FAILED
    Condition not satisfied:

    title == 'Foo Layout'
    |     |
    ""    false
          10 differences (0% similarity)
          (----------)
          (Foo Layout)
        at functionaltests.sitemesh.SitemeshLayoutFunctionalSpec.test layout specified in controller property(SitemeshLayoutFunctionalSpec.groovy:26)

SitemeshLayoutFunctionalSpec > test layout specified in controller property applied to a GSP that does not contain a root html tag FAILED
    Condition not satisfied:

    title  == 'Foo Layout'
    |      |
    ""     false
           10 differences (0% similarity)
           (----------)
           (Foo Layout)
        at functionaltests.sitemesh.SitemeshLayoutFunctionalSpec.test layout specified in controller property applied to a GSP that does not contain a root html tag(SitemeshLayoutFunctionalSpec.groovy:36)

> Task :app2:integrationTest

ErrorsControllerSpec > Test a global 500 mapping that maps to another controller FAILED
    Condition not satisfied:

    driver.pageSource.contains 'error occured'
    |      |          |
    |      |          false
    |      <html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1></body></html>
    FirefoxDriver: firefox on windows (f3621116-8b8c-4b68-b053-3c4a0dff0eb3)
        at app//app2.ErrorsControllerSpec.$tt__$spock_feature_1_0(ErrorsControllerSpec.groovy:20)
        at app2.ErrorsControllerSpec.Test a global 500 mapping that maps to another controller_closure1(ErrorsControllerSpec.groovy)
        at app//groovy.lang.Closure.call(Closure.java:433)
        at app//groovy.lang.Closure.call(Closure.java:422)
        at app//grails.gorm.transactions.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:68)
        at app//org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at app//grails.gorm.transactions.GrailsTransactionTemplate.executeAndRollback(GrailsTransactionTemplate.groovy:65)
        at app2.ErrorsControllerSpec.Test a global 500 mapping that maps to another controller(ErrorsControllerSpec.groovy)

FiltersFunctionalSpec > test before filter FAILED
    Condition not satisfied:

    driver.pageSource.contains 'Filter Ran: yes.'
    |      |          |
    |      |          false
    |      <html><head></head><body>Filter Ran: null.</body></html>
    FirefoxDriver: firefox on windows (f3621116-8b8c-4b68-b053-3c4a0dff0eb3)
        at app2.FiltersFunctionalSpec.test before filter(FiltersFunctionalSpec.groovy:15)

FiltersFunctionalSpec > test after filter FAILED
    Condition not satisfied:

    $('h2', 1).text() == 'Company City: St. Louis'
    |          |      |
    |          |      false
    |          |      10 differences (56% similarity)
    |          |      Company City:(----------)
    |          |      Company City:( St. Louis)
    |          Company City:
    [[[FirefoxDriver: firefox on windows (f3621116-8b8c-4b68-b053-3c4a0dff0eb3)] -> css selector: h2]]
        at app2.FiltersFunctionalSpec.test after filter(FiltersFunctionalSpec.groovy:27)



> Task :gorm:compileGroovy FAILED

grails-functional-tests\gorm\grails-app\domain\gorm\ChildA.groovy: 3: The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity<gorm.ChildA> and org.grails.datastore.gorm.GormEntity<gorm.AbstractParent>
. At [3:1]  @ line 3, column 1.
   class ChildA extends AbstractParent {
   ^

grails-functional-tests\gorm\grails-app\domain\gorm\ChildB.groovy: 4: The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity<gorm.ChildB> and org.grails.datastore.gorm.GormEntity<gorm.AbstractParent>
. At [4:1]  @ line 4, column 1.
   class ChildB extends AbstractParent {


> Task :gorm:integrationTest

AbstractParentSpec > Test that persisting a domain class with an abstract parent works FAILED
    Condition not satisfied:

    AbstractParent.count() == 2
    |              |       |
    |              0       false
    class gorm.AbstractParent
        at app//gorm.AbstractParentSpec.$tt__$spock_feature_0_0(AbstractParentSpec.groovy:17)
        at gorm.AbstractParentSpec.Test that persisting a domain class with an abstract parent works_closure1(AbstractParentSpec.groovy)
        at app//groovy.lang.Closure.call(Closure.java:433)
        at app//groovy.lang.Closure.call(Closure.java:422)
        at app//grails.gorm.transactions.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:68)
        at app//org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at app//grails.gorm.transactions.GrailsTransactionTemplate.executeAndRollback(GrailsTransactionTemplate.groovy:65)
        at gorm.AbstractParentSpec.Test that persisting a domain class with an abstract parent works(AbstractParentSpec.groovy)


> Task :namespaces:integrationTest

ContextPathSpec > test the context path defined in the environment overrides the standard one FAILED
    Condition not satisfied:

    title == "Welcome to Grails"
    |     |
    ""    false
          17 differences (0% similarity)
          (-----------------)
          (Welcome to Grails)
        at app//context.ContextPathSpec.$tt__$spock_feature_1_0(ContextPathSpec.groovy:17)
        at context.ContextPathSpec.test the context path defined in the environment overrides the standard one_closure1(ContextPathSpec.groovy)
        at app//groovy.lang.Closure.call(Closure.java:433)
        at app//groovy.lang.Closure.call(Closure.java:422)
        at app//grails.gorm.transactions.GrailsTransactionTemplate$1.doInTransaction(GrailsTransactionTemplate.groovy:68)
        at app//org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at app//grails.gorm.transactions.GrailsTransactionTemplate.executeAndRollback(GrailsTransactionTemplate.groovy:65)
        at context.ContextPathSpec.test the context path defined in the environment overrides the standard one(ContextPathSpec.groovy)


PageControllerSpec > test that the page renders correctly FAILED
    Condition not satisfied:

    title == 'Admin Page'
    |     |
    ""    false
          10 differences (0% similarity)
          (----------)
          (Admin Page)
        at namespaces.PageControllerSpec.test that the page renders correctly(PageControllerSpec.groovy:14)

ReportControllerSpec > test that admin report page renders correctly FAILED
    Condition not satisfied:

    title == 'Admin Report'
    |     |
    ""    false
          12 differences (0% similarity)
          (------------)
          (Admin Report)
        at namespaces.admin.ReportControllerSpec.test that admin report page renders correctly(ReportControllerSpec.groovy:14)
@jamesfredley jamesfredley changed the title Grails 7: grails-functional-tests new failing tests Grails 7: grails-functional-tests resolve new failing tests Sep 28, 2024
@jamesfredley
Copy link
Contributor Author

4 BookControllerSpec tests are passing after grails/grails-testing-support#435, 16 new failing tests remaining.

@jamesfredley
Copy link
Contributor Author

3 more are passing #251

13 left

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant