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 cdba74a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 35 deletions.
3 changes: 0 additions & 3 deletions app/components/webauthn_input_component.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/controllers/users/webauthn_setup_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ 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?,
Expand Down
31 changes: 1 addition & 30 deletions app/javascript/packages/webauthn/webauthn-input-element.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,7 @@ describe('WebauthnInputElement', () => {
after(() => {
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 cdba74a

Please sign in to comment.