share_entrypoint_spec.rb 787 B

123456789101112131415161718192021222324252627282930313233
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe 'ShareEntrypoint' do
  4. include ProfileStories
  5. subject { page }
  6. let(:email) { 'test@example.com' }
  7. let(:password) { 'password' }
  8. let(:confirmed_at) { Time.zone.now }
  9. let(:finished_onboarding) { true }
  10. before do
  11. as_a_logged_in_user
  12. visit share_path
  13. end
  14. it 'can be used to post a new status' do
  15. expect(subject).to have_css('div#mastodon-compose')
  16. expect(subject).to have_css('.compose-form__submit')
  17. status_text = 'This is a new status!'
  18. within('.compose-form') do
  19. fill_in "What's on your mind?", with: status_text
  20. click_on 'Post'
  21. end
  22. expect(subject).to have_css('.notification-bar-message', text: 'Post published.')
  23. end
  24. end