summaryrefslogtreecommitdiff
path: root/spec/features/projects/blobs/edit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/blobs/edit_spec.rb')
-rw-r--r--spec/features/projects/blobs/edit_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb
index f198a1f42e2..077e63b028d 100644
--- a/spec/features/projects/blobs/edit_spec.rb
+++ b/spec/features/projects/blobs/edit_spec.rb
@@ -82,6 +82,34 @@ RSpec.describe 'Editing file blob', :js do
end
end
+ context 'blob edit toolbar' do
+ toolbar_buttons = [
+ "Add bold text",
+ "Add italic text",
+ "Add strikethrough text",
+ "Insert a quote",
+ "Insert code",
+ "Add a link",
+ "Add a bullet list",
+ "Add a numbered list",
+ "Add a checklist",
+ "Add a collapsible section",
+ "Add a table"
+ ]
+
+ before do
+ visit project_edit_blob_path(project, tree_join(branch, readme_file_path))
+ end
+
+ it "has defined set of toolbar buttons" do
+ buttons = page.all('.file-buttons .md-header-toolbar button[type="button"]')
+ expect(buttons.length).to eq(toolbar_buttons.length)
+ toolbar_buttons.each_with_index do |button_title, i|
+ expect(buttons[i]['title']).to include(button_title)
+ end
+ end
+ end
+
context 'from blob file path' do
before do
visit project_blob_path(project, tree_join(branch, file_path))