bullet_train icon indicating copy to clipboard operation
bullet_train copied to clipboard

Tests failing with Cuprite.

Open andrewculver opened this issue 2 years ago • 5 comments

andrewculver avatar Dec 03 '22 21:12 andrewculver

F

Failure:
AccountTest#test_simulate_restoring_behavior_of_form_fields_on_page_restore_on_macbook_pro_15_inch [/Users/jgreen/projects/seshy-rails/test/system/fields_test.rb:32]:
Expected no js errors, but these errors where found: %s

%o

%o, Error invoking action "$select2:open->fields--super-select#focusOnTextField", , , %s

%o

%o, Error invoking action "$select2:open->fields--super-select#focusOnTextField", 

jagthedrummer avatar Jul 26 '23 18:07 jagthedrummer

F

Failure:
AccountTest#test_simulate_restoring_behavior_of_form_fields_on_page_restore_on_macbook_pro_15_inch [/Users/jgreen/projects/seshy-rails/test/system/fields_test.rb:32]:
Expected no js errors, but these errors where found: %s

%o

%o, Error invoking action "$select2:open->fields--super-select#focusOnTextField", , , %s

%o

%o, Error invoking action "$select2:open->fields--super-select#focusOnTextField", 

I'm curious if this is related to https://github.com/bullet-train-co/bullet_train-core/issues/290, will have to run Cuprite tests locally though.

gazayas avatar Jul 27 '23 10:07 gazayas

I just tried this again, and the errors I mentioned above are now gone.

I'll try enabling the CircleCI cuprite system tests in a branch/PR to see what happens.

jagthedrummer avatar Aug 25 '23 19:08 jagthedrummer

I got the cuprite tests running in CircleCI, but now there's one failure:

SuperScaffoldingSystemTest#test_OpenAPI_V3_document_is_still_valid = 6.58 s = E


Error:
SuperScaffoldingSystemTest#test_OpenAPI_V3_document_is_still_valid:
Ferrum::PendingConnectionsError: Request to http://localhost:3001/api/v1/openapi.yaml reached server, but there are still pending connections: http://localhost:3001/api/v1/openapi.yaml
    test/system/super_scaffolding_test.rb:287:in `block in <class:SuperScaffoldingSystemTest>'

I think that has to do with use trying to hit https://localhost:3001 directly, instead of letting capybara figure out where to go (https://github.com/bullet-train-co/bullet_train/blob/main/test/system/super_scaffolding_test.rb#L287C3-L287C3).

I also think that test is redundant and the thing it's testing is better covered by: https://github.com/bullet-train-co/bullet_train/blob/main/test/controllers/api/open_api_controller_test.rb#L4-L19

I opened an issue asking about getting rid of the duplicate test: https://github.com/bullet-train-co/bullet_train/issues/922

jagthedrummer avatar Aug 25 '23 19:08 jagthedrummer

I got the standard tests running with Cuprite in https://github.com/bullet-train-co/bullet_train/pull/921, but the tests for Super Scaffolding don't seem to like cuprite. At least not with the default settings. I'm getting Ferrum::TimeoutError at seemingly random places. https://app.circleci.com/pipelines/github/bullet-train-co/bullet_train/2262/workflows/ddd26ef8-0bd1-402c-ad42-8d47fdf6a586/jobs/10922

jagthedrummer avatar Aug 25 '23 21:08 jagthedrummer