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

Fix the NoMethodError from #trace_discarded #261

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

yuki24
Copy link
Contributor

@yuki24 yuki24 commented Aug 16, 2023

There seems to be two places where the trace_discarded method is called:

if @stacks_id
@connection.local_utils.trace_discarded(@stacks_id)
end

if @stacks_id
@connection.local_utils.trace_discarded(@stacks_id)
end

However, the actual LocalUtils class only implements tracing_discarded (tracing as opposed to trace). Not sure how I could this test this, so just opening up a draft PR and letting you know about this. Feel free to close this once this is fixed.

resolves #262

@vercel
Copy link

vercel bot commented Aug 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
playwright-ruby-client ⬜️ Ignored (Inspect) Visit Preview Aug 16, 2023 6:58am

@YusukeIwaki
Copy link
Owner

Thank you for your contribution.

trace_discarded is right as playwright-python does.
https://github.com/search?q=repo%3Amicrosoft%2Fplaywright-python+trace_discarded&type=code

@YusukeIwaki
Copy link
Owner

https://github.com/microsoft/playwright/blob/d2165f3e2deb3dae0a79a23311248f41f93de64f/tests/library/tracing.spec.ts#L483C1-L485C69

diff --git a/spec/integration/tracing_spec.rb b/spec/integration/tracing_spec.rb
index 3045a24..f30a4ae 100644
--- a/spec/integration/tracing_spec.rb
+++ b/spec/integration/tracing_spec.rb
@@ -185,6 +185,10 @@ RSpec.describe 'tracing' do
         trace = File.join(dir, 'trace2.zip')
         context.tracing.stop_chunk(path: trace)
       end
+
+      context.tracing.start_chunk
+      page.click('"Click"')
+      context.tracing.stop_chunk # Should stop without a path.
     end
   end
 end

The code above would reproduce this issue.

@YusukeIwaki YusukeIwaki marked this pull request as ready for review August 16, 2023 15:10
@YusukeIwaki YusukeIwaki merged commit 161bbc0 into YusukeIwaki:main Aug 16, 2023
15 of 16 checks passed
@YusukeIwaki
Copy link
Owner

@yuki24 Thank you for your kind reporting and contribution.
playwright-ruby-client 1.37.1 and 1.36.1 would fix this issue. Please try it. Thank you :)

@yuki24 yuki24 deleted the bugfix-no-method-error branch August 17, 2023 01:37
@yuki24
Copy link
Contributor Author

yuki24 commented Aug 17, 2023

@YusukeIwaki Thank you!

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

Successfully merging this pull request may close these issues.

NoMethodError from #trace_discarded
2 participants