Settings page for adding verified nostr pubkeys

This commit is contained in:
Râu Cao
2023-03-08 13:44:18 +07:00
parent bc4d9ff528
commit 49de4007ab
21 changed files with 621 additions and 233 deletions

View File

@@ -0,0 +1,22 @@
require 'rails_helper'
RSpec.describe 'Experimental Settings', type: :feature do
let(:user) { create :user, cn: 'jimmy', ou: 'kosmos.org' }
before do
login_as user, scope: :user
end
describe 'Adding a nostr pubkey' do
scenario 'Without nostr browser extension available' do
visit setting_path(:experiments)
expect(page).to have_content("No browser extension found")
expect(page).to have_css('button[data-settings--nostr-pubkey-target=setPubkey]:disabled')
end
# scenario 'Successfully saving a key' do
# Note: Needs a more complex JS testing setup (maybe poltergeist), not
# worth it for now
# end
end
end