Merge commit '2e9b2df570af19b67a5ccc754c7b581034ca79c6' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/styles/mastodon/components.scss`: Upstream removed some code that somehow had been modified in glitch-soc. Removed it as upstream did.
This commit is contained in:
commit
e7498887a7
30 files changed
+808
-815
No files matched your search
@@ -0,0 +1,51 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Account notes', :inline_jobs, :js, :streaming do
|
||||
include ProfileStories
|
||||
|
||||
let(:email) { 'test@example.com' }
|
||||
let(:password) { 'password' }
|
||||
let(:confirmed_at) { Time.zone.now }
|
||||
let(:finished_onboarding) { true }
|
||||
|
||||
let!(:other_account) { Fabricate(:account) }
|
||||
|
||||
before { as_a_logged_in_user }
|
||||
|
||||
it 'can be written and viewed' do
|
||||
visit_profile(other_account)
|
||||
|
||||
note_text = 'This is a personal note'
|
||||
fill_in 'Click to add note', with: note_text
|
||||
|
||||
# This is a bit awkward since there is no button to save the change
|
||||
# The easiest way is to send ctrl+enter ourselves
|
||||
find_field(class: 'account__header__account-note__content').send_keys [:control, :enter]
|
||||
|
||||
expect(page)
|
||||
.to have_css('.account__header__account-note .inline-alert', text: 'SAVED')
|
||||
|
||||
expect(page)
|
||||
.to have_css('.account__header__account-note__content', text: note_text)
|
||||
|
||||
# Navigate back and forth and ensure the comment is still here
|
||||
visit root_url
|
||||
visit_profile(other_account)
|
||||
|
||||
expect(AccountNote.find_by(account: bob.account, target_account: other_account).comment)
|
||||
.to eq note_text
|
||||
|
||||
expect(page)
|
||||
.to have_css('.account__header__account-note__content', text: note_text)
|
||||
end
|
||||
|
||||
def visit_profile(account)
|
||||
visit short_account_path(account)
|
||||
|
||||
expect(page)
|
||||
.to have_css('div.app-holder')
|
||||
.and have_css('form.compose-form')
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,21 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Filters Statuses' do
|
||||
describe 'Viewing statuses under a filter' do
|
||||
let(:filter) { Fabricate(:custom_filter, title: 'good filter') }
|
||||
|
||||
context 'with the filter user signed in' do
|
||||
before { sign_in(filter.account.user) }
|
||||
|
||||
it 'returns a page with the status filters' do
|
||||
visit filter_statuses_path(filter)
|
||||
|
||||
expect(page)
|
||||
.to have_private_cache_control
|
||||
.and have_title(/good filter/)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user