Compare commits

..

3 Commits

Author SHA1 Message Date
benjamin wil 101bcfb02f Remove dead link from Markdown help pane
In the editor, the help text for "Emoji" included a dead link. This
changes the link to a non-dead link.

After changing the JS, assets needed to be recompiled.

Resolves #1775.
2022-09-21 19:11:08 -07:00
benjamin wil 8e9ab89783 Test the help panel's "Emoji" section
This test is passing. I wrote it so I can safely change this panel in a
subsequent commit.
2022-09-21 19:09:39 -07:00
benjamin wil 902ada7a3e Make help button more accessible
Using an `aria-label` for buttons without text is a good practice.

This lets users who use screenreaders better understand what this button
is for.
2022-09-21 19:09:39 -07:00
7 changed files with 8 additions and 45 deletions
+2 -19
View File
@@ -34,22 +34,5 @@ jobs:
run: echo ${{ steps.docker_build.outputs.digest }}
- name: docker state
run: docker image ls
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
bundler-cache: true
- name: Install Chromedriver
uses: nanasess/setup-chromedriver@v1
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Run gollum from Docker
run: |
git clone test/examples/lotr.git /tmp/lotr.git
RUNNER_TRACKING_ID="" docker run --rm -p 4567:4567 -v /tmp/lotr.git:/wiki -e CI=true ${{ env.CI_IMAGE }} --mathjax --mermaid &
sleep 10
netstat -lt
- name: Run capybara tests against Dockerized instance
run: "GOLLUM_CAPYBARA_URL=http://127.0.0.1:4567 bundle exec rake test:capybara"
- name: Run gollum as test
run: docker run -e CI=true ${{ env.CI_IMAGE }} --irb
-7
View File
@@ -248,13 +248,6 @@ task :precompile do
"It's possible that you just need to install `yarn` on your system."
end
require 'uglifier'
module Precious
module Assets
JS_COMPRESSOR = ::Uglifier.new(harmony: true)
end
end
require './lib/gollum/app.rb'
# Next, configure the Sprockets asset pipeline and precompile production-
Executable → Regular
View File
+1 -1
View File
@@ -17,7 +17,7 @@ module Gollum
KEYBINDINGS = ['default', 'vim', 'emacs']
::I18n.available_locales = [:en]
::I18n.load_path = Dir[::File.expand_path("../gollum/locales", __FILE__) + "/*.yml"]
::I18n.load_path = Dir[::File.expand_path("lib/gollum/locales") + "/*.yml"]
def self.assets_path
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
+2 -2
View File
@@ -1,10 +1,10 @@
require 'octicons'
require 'uglifier'
module Precious
module Assets
MANIFEST = %w(app.js editor.js mermaid.js app.css criticmarkup.css fileview.css ie7.css print.css *.png *.jpg *.svg *.eot *.ttf)
ASSET_URL = 'gollum/assets'
JS_COMPRESSOR = :uglify unless defined?(JS_COMPRESSOR)
def self.sprockets(dir = File.dirname(File.expand_path(__FILE__)))
env = Sprockets::Environment.new
@@ -17,7 +17,7 @@ module Precious
env.append_path ::File.join(dir, 'public/gollum/images')
env.append_path ::File.join(dir, 'public/gollum/fonts')
env.js_compressor = Precious::Assets::JS_COMPRESSOR unless Precious::App.development?
env.js_compressor = ::Uglifier.new(harmony: true) unless Precious::App.development?
env.css_compressor = :scss
env.context_class.class_eval do
+1 -9
View File
@@ -14,15 +14,7 @@ CAPYBARA_DRIVER =
Capybara.default_driver = CAPYBARA_DRIVER
Capybara.enable_aria_label = true
if ENV['GOLLUM_CAPYBARA_URL']
Capybara.configure do |config|
config.run_server = false
config.app_host = ENV['GOLLUM_CAPYBARA_URL']
end
else
Capybara.server = :webrick
end
Capybara.server = :webrick
def console_log(page, level = :severe)
page.driver.browser.logs.get(:browser).select { |log| log.level == level.to_s.upcase }
+2 -7
View File
@@ -6,8 +6,7 @@ end
def expected_errors
Regexp.union([
%r{Refused to apply style from 'http:.*/gollum/create/custom.css'},
%r{.*/gollum/create/mathjax.config.js - Failed to load resource: the server responded with a status of 403}
%r{Refused to apply style from 'http:.*/gollum/create/custom.css'}
])
end
@@ -22,11 +21,7 @@ context 'Frontend with mathjax and mermaid' do
@path = cloned_testpath("examples/lotr.git")
@wiki = Gollum::Wiki.new(@path)
Precious::App.set(:gollum_path, @path)
Precious::App.set(:wiki_options, {
mathjax: true,
mermaid: true,
mathjax_config: 'mathjax.config.js'
})
Precious::App.set(:wiki_options, {mathjax: true, mermaid: true})
Capybara.app = Precious::App
end