Skip to content

Commit

Permalink
remove deskton_ab_bucket?; remove device does not support passkey t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
jmdembe committed Oct 16, 2024
1 parent 87ac4ff commit 8adbf86
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 35 deletions.
3 changes: 0 additions & 3 deletions app/components/webauthn_input_component.scss

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/users/webauthn_setup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ def confirm
)
result = form.submit(confirm_params)
@platform_authenticator = form.platform_authenticator?
@desktop_ab_test_bucket = form.desktop_ab_test_bucket?
@presenter = WebauthnSetupPresenter.new(
current_user: current_user,
user_fully_authenticated: user_fully_authenticated?,
user_opted_remember_device_cookie: user_opted_remember_device_cookie,
remember_device_default: remember_device_default,
platform_authenticator: @platform_authenticator,
desktop_ab_test_bucket: @desktop_ab_test_bucket,
url_options:,
)
properties = result.to_h.merge(analytics_properties)
Expand Down
29 changes: 0 additions & 29 deletions app/javascript/packages/webauthn/webauthn-input-element.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,6 @@ describe('WebauthnInputElement', () => {
quibble.reset();
});

// context('device does not support passkey', () => {
// context('unsupported passkey not shown', () => {
// beforeEach(() => {
// isWebauthnPlatformAvailable.resolves(false);
// document.body.innerHTML = `<lg-webauthn-input hidden></lg-webauthn-input>`;
// });

// it('stays hidden', () => {
// const element = document.querySelector('lg-webauthn-input')!;

// expect(element.hidden).to.be.true();
// });
// });

// context('unsupported passkey shown', () => {
// beforeEach(() => {
// isWebauthnPlatformAvailable.resolves(false);
// document.body.innerHTML = `<lg-webauthn-input show-unsupported-passkey hidden></lg-webauthn-input>`;
// });

// it('becomes visible, with modifier class', () => {
// const element = document.querySelector('lg-webauthn-input')!;

// expect(element.hidden).to.be.false();
// expect(element.classList.contains('webauthn-input--unsupported-passkey')).to.be.true();
// });
// });
// });

context('device supports passkey', () => {
context('unsupported publickeycredential not shown', () => {
beforeEach(() => {
Expand Down
1 change: 0 additions & 1 deletion app/javascript/packages/webauthn/webauthn-input-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export class WebauthnInputElement extends HTMLElement {
this.hidden = false;
} else {
this.hidden = false;
this.classList.add('webauthn-input--unsupported-passkey');
}
}
}
Expand Down

0 comments on commit 8adbf86

Please sign in to comment.