File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 context "with authenticated user" do
4545 current_user { create ( :user ) }
4646
47+ let ( :api_docs_text ) { "OpenProject API V3 (Stable)" }
48+ let ( :root_text ) { "OpenProject community" }
49+
4750 it "displays the docs rendered by openapi-explorer" do
4851 visit_docs_page
4952
5053 # web component are harder to test with capybara
51- expect ( find ( "openapi-explorer" ) . shadow_root ) . to have_css ( "#api-title" , text : "OpenProject API V3 (Stable)" )
54+ expect ( find ( "openapi-explorer" ) . shadow_root ) . to have_css ( "#api-title" , text : api_docs_text )
5255 end
5356
5457 it "doesn't change the path to base url" do
5558 visit_docs_page
56- expect ( page ) . to have_text "OpenProject API V3 (Stable)"
59+ expect ( page ) . to have_text api_docs_text
5760
5861 expect ( page ) . to have_current_path ( "#{ api_docs_url } #?route=overview" ) # fragment is added
5962 end
6063
6164 it "allows navigating back to docs" do
6265 visit_docs_page
63- expect ( page ) . to have_text "OpenProject API V3 (Stable)"
66+ expect ( page ) . to have_text api_docs_text
6467
6568 click_link "Home"
66- expect ( page ) . to have_no_text "OpenProject API V3 (Stable)"
69+ expect ( page ) . to have_no_text api_docs_text
6770
6871 page . go_back
69- expect ( page ) . to have_text "OpenProject API V3 (Stable)"
72+ expect ( page ) . to have_text api_docs_text
7073 end
7174
7275 context "when APIv3 documentation is disabled (from Administration > API > Enable docs page)" ,
You can’t perform that action at this time.
0 commit comments