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

Add support for FedCM commands #12096

Merged
merged 5 commits into from
Jul 27, 2023
Merged

Add support for FedCM commands #12096

merged 5 commits into from
Jul 27, 2023

Conversation

cbiesinger
Copy link
Contributor

@cbiesinger cbiesinger commented May 25, 2023

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

This adds the FedCM webdriver commands that are specified in:
https://fedidcg.github.io/FedCM/#automation

Currently implemented in Chromium, but Firefox is interested as well:
w3c-fedid/FedCM#395 (comment)
w3c-fedid/FedCM#465 (comment)

Bug #12088

Motivation and Context

This lets identity providers and relying parties use Selenium's Java API to control
the FedCM browser dialog to test that their website works correctly when
using the FedCM API.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • [ x My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented May 25, 2023

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (7c54398) 57.40% compared to head (0424e2c) 57.40%.
Report is 2 commits behind head on trunk.

❗ Current head 0424e2c differs from pull request most recent head 66eaf46. Consider uploading reports for the commit 66eaf46 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #12096   +/-   ##
=======================================
  Coverage   57.40%   57.40%           
=======================================
  Files          86       86           
  Lines        5369     5369           
  Branches      206      206           
=======================================
  Hits         3082     3082           
  Misses       2081     2081           
  Partials      206      206           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cbiesinger cbiesinger force-pushed the fedcm branch 2 times, most recently from a320aa5 to c9fd32a Compare June 13, 2023 21:19
As specified in:
https://fedidcg.github.io/FedCM/#automation

Currently implemented in Chromium.
@cbiesinger cbiesinger marked this pull request as ready for review June 13, 2023 21:25
@cbiesinger
Copy link
Contributor Author

I believe this is ready for review now!

However, the test I've written requires Chrome 115, and I don't know how to handle that?

@diemol
Copy link
Member

diemol commented Jun 19, 2023

We would need to make some changes in the test setup to allow beta Chrome to be used for testing. Not sure if we will have time to do that before the actual Chrome 115 is released. Would you be OK if we review this PR when that happens?

@cbiesinger
Copy link
Contributor Author

Hm, what kind of support would you need? I could perhaps look into doing that work if you outline what is needed.

I could also change this CL so that the test is skipped if the command throws a NotImplemented error?

Either way -- it seems like the review doesn't have to wait until then, only the merging? I would certainly appreciate getting comments earlier :)

@diemol
Copy link
Member

diemol commented Jun 21, 2023

You are right, I will find time in the next couple of days to review this.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code looks good, so there is no action needed for now. I will see if I can find time to enable testing with Chrome beta in our CI in the meantime. Thank you.

@cbiesinger
Copy link
Contributor Author

@diemol -- fyi, Chrome 115 has now been released (https://chromereleases.googleblog.com/2023/07/stable-channel-update-for-desktop.html), so just updating to the latest stable should allow this PR to be merged

@cbiesinger
Copy link
Contributor Author

ping?

@diemol diemol added this to the 4.11 milestone Jul 25, 2023
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @cbiesinger!

@diemol diemol merged commit a9ef96e into SeleniumHQ:trunk Jul 27, 2023
50 of 51 checks passed
@diemol
Copy link
Member

diemol commented Mar 25, 2024

@cbiesinger do you know why we are getting the following error in these tests now?

unknown command: fedcm/setdelayenabled

CI Link: https://github.com/SeleniumHQ/selenium/actions/runs/8418971824/job/23050594831#step:16:503

@cbiesinger cbiesinger deleted the fedcm branch June 3, 2024 18:59
@cbiesinger
Copy link
Contributor Author

@diemol it looks like that was broken by 7ad44ee which removed the session ID prefix

@cbiesinger
Copy link
Contributor Author

@titusfortner FYI, see last comment

cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 3, 2024
This lets us re-enable the FedCM tests, which this change does we
well.

In addition, newer versions of Chrome look for a "login_url" field instead
of "signin_url", so this updates the fedcm.json file accordingly.

This test failure was pointed out here:
SeleniumHQ#12096 (comment)
@cbiesinger cbiesinger mentioned this pull request Jun 3, 2024
8 tasks
@cbiesinger
Copy link
Contributor Author

cbiesinger commented Jun 3, 2024

I have created PR #14070 to fix that issue.

cbiesinger added a commit to cbiesinger/selenium that referenced this pull request Jun 3, 2024
This lets us re-enable the FedCM tests, which this change does we
well.

In addition, newer versions of Chrome look for a "login_url" field instead
of "signin_url", so this updates the fedcm.json file accordingly.

This test failure was pointed out here:
SeleniumHQ#12096 (comment)
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.

4 participants