-
Notifications
You must be signed in to change notification settings - Fork 268
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
Fix system tests #569
base: main
Are you sure you want to change the base?
Fix system tests #569
Conversation
@@ -103,15 +103,14 @@ class ConversationMessagesImagesTest < ApplicationSystemTestCase | |||
refute img.visible? | |||
|
|||
image_btn.click | |||
|
|||
2.times do | |||
sleep 0.1 | |||
sleep 0.5 if !modal_loader.visible? | |||
sleep 0.1 | |||
image_btn.click if !modal_loader.visible? | |||
end # TODO: sometimes modal has not popped up after clicking, why?? Try 2x times before failing the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlvallelonga I think we had 3 distinct test failures. You fixed one of them with the update to simulate_image_variant_processing
. I tried to fix a sporadic Net::ReadTimeout
with a timeout. However, there remains one more test failure on this line. I think it might be a legitimate bug.
When I turn off headless chrome and run just this specific test, I do not see the spinners in place of the images. I spent a little while investigating it and couldn't figure out why not. The thing I did not try was checking out an old commit right before the refactor to image attachments, and that would confirm for sure that we broke it recently.
Could you do a little more investigating of this one? What you should see when running bin/rails test test/system/conversations/messages/images_test.rb:88
in normal chrome mode is the spinners appearing for 8 seconds both inline in the conversation messages and also when you click on a spinner you see a spinner within the modal that opens. Then after 8 seconds (of faked delay) then the spinners are swapped out for the images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok nice! yeah I'll dig into this last failure tomorrow
@jlvallelonga Let me know if you any time to look into this failure. Or if things are busy on the home front, let me know and I can try to dig into this. |
Yeah busy week at home. I'll take a look at this now |
@krschacht I'm seeing errors like this when running system tests locally and on the github runners:
Are you doing something to get around that? |
Dang, I didn’t notice those. I get in this habit of once the system tests are broken I stop looking at them closely so I didn’t notice we had made them worse. I think it’s this change: Webmock was added along with some config for it. I don’t think we need webmock. I was able to mock up HTTP requests previously without using webmock so we should probably unwind that addition. |
fixes mocks so that selenium can run
fixes images_test system test