mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 05:01:05 +08:00
DEV: Add system spec for categories page (#29621)
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Some checks are pending
Licenses / run (push) Waiting to run
Linting / run (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Waiting to run
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Waiting to run
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Waiting to run
Follow up to commit 948e283e0f
.
This commit is contained in:
parent
da43deb9ea
commit
635faaaf59
32
spec/system/discovery_category_spec.rb
Normal file
32
spec/system/discovery_category_spec.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
describe "Discovery Category Routes", type: :system do
|
||||
fab!(:category) do
|
||||
Fabricate(:category, show_subcategory_list: true, subcategory_list_style: "boxes")
|
||||
end
|
||||
|
||||
fab!(:subcategory1) { Fabricate(:category, parent_category: category) }
|
||||
fab!(:subcategory2) { Fabricate(:category, parent_category: category) }
|
||||
fab!(:subcategory3) { Fabricate(:category, parent_category: category) }
|
||||
|
||||
let(:discovery) { PageObjects::Pages::Discovery.new }
|
||||
|
||||
it "uses desktop_category_page style on categories and subcategories page" do
|
||||
visit "/categories"
|
||||
expect(page).to have_css(".category-list")
|
||||
|
||||
visit "/c/#{category.slug}/subcategories"
|
||||
expect(page).to have_css(".category-list")
|
||||
end
|
||||
|
||||
it "uses subcategory_list_style on category page" do
|
||||
visit "/c/#{category.slug}"
|
||||
expect(page).to have_css(".category-boxes")
|
||||
|
||||
visit "/c/#{category.slug}/all"
|
||||
expect(page).to have_css(".category-boxes")
|
||||
|
||||
visit "/c/#{category.slug}/none"
|
||||
expect(page).to have_css(".category-boxes")
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user