I hereby claim:
- I am mathewtrivett on github.
- I am mathewtrivett (https://keybase.io/mathewtrivett) on keybase.
- I have a public key ASBy2H23Lv_wrYLSBN_h_Q7KcKgnFFfzVG51uK0YIx170Ao
To claim this, I am signing this object:
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
/* Learn more about media queries | |
* https://developer.mozilla.org/en-US/docs/Web/CSS/@media | |
*/ | |
@media all { | |
/* | |
* Styling rules for all media | |
*/ | |
} |
RSpec.configure do |config| | |
.... # The rest of your Rspec configuration | |
# Here we are going to precompile our assets any time | |
# we encounter a feature spec group | |
config.before(:all) do |_config| | |
case self.class.metadata[:type] | |
when :feature |
# Note: You must restart bin/webpack-dev-server for changes to take effect | |
default: &default | |
# .... | |
# The rest of your webpacker.yml config | |
test: | |
<<: *default | |
# The rest of your test config |
# Capybara is designed to test visible HTML elements, i.e. your user interface. | |
# The link tags used for stylesheets are not visible to Capybara by default. | |
# We need to pass visible: false to `have_selector` to tell Capybara the link element is not visible. | |
RSpec.describe 'Print CSS', type: :feature do | |
context 'with params[:medium] == "print"' do | |
it 'loads the print stylesheet with the media=screen' do | |
is_expected.to have_selector( | |
'link[id="print_styles"][media="screen"]', | |
visible: false |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing Print CSS</title> | |
<%= csrf_meta_tags %> | |
<%= csp_meta_tag %> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<% if params[:medium] == 'print' %> | |
<!-- Load your print.css file with media attribute equal to screen --> | |
<%= stylesheet_packs_with_chunks_tag 'print', media: 'screen', 'data-turbolinks-track': 'reload', id: 'print_styles' %> |
I hereby claim:
To claim this, I am signing this object: