diff --git a/spec/system/core_feature_spec.rb b/spec/system/core_feature_spec.rb index 627a225..f3e079f 100644 --- a/spec/system/core_feature_spec.rb +++ b/spec/system/core_feature_spec.rb @@ -1,6 +1,22 @@ # frozen_string_literal: true RSpec.describe "Core features", type: :system do + fab!(:current_user) { Fabricate(:user, refresh_auto_groups: true) } + let(:composer) { PageObjects::Components::Composer.new } + before { upload_theme } - it_behaves_like "having working core features", skip_examples: %i[topics search] + + it_behaves_like "having working core features", + skip_examples: %i[topics:create search:quick_search] + + it "creates a new topic" do + sign_in(current_user) + visit("/new-topic") + composer.fill_title("This is a new topic") + composer.fill_content("This is a long enough sentence.") + expect(page).to have_css(".d-editor-preview p", visible: true) + within(".save-or-cancel") { click_button("Create Topic") } + expect(page).to have_content("This is a new topic") + expect(page).to have_content("This is a long enough sentence.") + end end