1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-23 19:19:12 +09:00
YuruToot/spec/system/new_statuses_spec.rb

46 lines
1.0 KiB
Ruby
Raw Normal View History

2023-07-29 06:09:49 +09:00
# frozen_string_literal: true
require 'rails_helper'
describe 'NewStatuses', :inline_jobs, :js, :streaming do
2023-07-29 06:09:49 +09:00
include ProfileStories
subject { page }
let(:email) { 'test@example.com' }
let(:password) { 'password' }
let(:confirmed_at) { Time.zone.now }
let(:finished_onboarding) { true }
before do
as_a_logged_in_user
visit root_path
end
it 'can be posted' do
expect(subject).to have_css('div.app-holder')
status_text = 'This is a new status!'
within('.compose-form') do
fill_in "What's on your mind?", with: status_text
click_on 'Post'
2023-07-29 06:09:49 +09:00
end
expect(subject).to have_css('.status__content__text', text: status_text)
2023-07-29 06:09:49 +09:00
end
it 'can be posted again' do
expect(subject).to have_css('div.app-holder')
status_text = 'This is a second status!'
within('.compose-form') do
fill_in "What's on your mind?", with: status_text
click_on 'Post'
2023-07-29 06:09:49 +09:00
end
expect(subject).to have_css('.status__content__text', text: status_text)
2023-07-29 06:09:49 +09:00
end
end