1
0
Fork 0
forked from gitea/nas

Merge commit '9c2d5b534f' into upstream-20250314

This commit is contained in:
KMY 2025-03-14 08:35:27 +09:00
commit 6548462ecb
84 changed files with 1719 additions and 418 deletions

View file

@ -5,8 +5,6 @@ require 'rails_helper'
RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do
include ProfileStories
subject { page }
let(:email) { 'test@example.com' }
let(:password) { 'password' }
let(:confirmed_at) { Time.zone.now }
@ -14,13 +12,11 @@ RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do
before do
as_a_logged_in_user
visit root_path
page.driver.browser.manage.window.resize_to(1600, 1050)
end
it 'can be posted' do
expect(subject).to have_css('div.app-holder')
visit_homepage
status_text = 'This is a new status!'
within('.compose-form') do
@ -28,12 +24,12 @@ RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do
click_on 'Post'
end
expect(subject).to have_css('.status__content__text', text: status_text)
expect(page)
.to have_css('.status__content__text', text: status_text)
end
it 'can be posted again' do
expect(subject).to have_css('div.app-holder')
visit_homepage
status_text = 'This is a second status!'
within('.compose-form') do
@ -41,6 +37,15 @@ RSpec.describe 'NewStatuses', :inline_jobs, :js, :streaming do
click_on 'Post'
end
expect(subject).to have_css('.status__content__text', text: status_text)
expect(page)
.to have_css('.status__content__text', text: status_text)
end
def visit_homepage
visit root_path
expect(page)
.to have_css('div.app-holder')
.and have_css('form.compose-form')
end
end