Sha256: 73d14120ec5adebe8cddc951a6fae1bd549d8c463730623ac59226d1e4a8e537

Contents?: true

Size: 1.57 KB

Versions: 13

Compression:

Stored size: 1.57 KB

Contents

require "spec_helper"

describe "text-inputs" do
  before(:all) do
    ParserSupport.parse_file("addons/text-inputs")

    @inputs_list = %w(
      input[type="color"]
      input[type="date"]
      input[type="datetime"]
      input[type="datetime-local"]
      input[type="email"]
      input[type="month"]
      input[type="number"]
      input[type="password"]
      input[type="search"]
      input[type="tel"]
      input[type="text"]
      input[type="time"]
      input[type="url"]
      input[type="week"]
      input:not([type])
      textarea
    )
  end

  context "expands plain text inputs" do
    it "finds selectors" do
      list = @inputs_list.join(", ")
      ruleset = "content: #{list};"

      expect(".all-text-inputs").to have_ruleset(ruleset)
    end
  end

  context "expands active text inputs" do
    it "finds selectors" do
      list = @inputs_list.map { |input| "#{input}:active" }
      list = list.join(", ")
      ruleset = "content: #{list};"

      expect(".all-text-inputs-active").to have_ruleset(ruleset)
    end
  end

  context "expands focus text inputs" do
    it "finds selectors" do
      list = @inputs_list.map { |input| "#{input}:focus" }
      list = list.join(", ")
      ruleset = "content: #{list};"

      expect(".all-text-inputs-focus").to have_ruleset(ruleset)
    end
  end

  context "expands hover text inputs" do
    it "finds selectors" do
      list = @inputs_list.map { |input| "#{input}:hover" }
      list = list.join(", ")
      ruleset = "content: #{list};"

      expect(".all-text-inputs-hover").to have_ruleset(ruleset)
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
bourbon-4.3.4 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.3.3 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.3.2 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.3.1 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.3.0 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.2.7 spec/bourbon/addons/text_inputs_spec.rb
styler-sass-0.1.8.alpha spec/bourbon/addons/text_inputs_spec.rb
styler-sass-0.1.7 spec/bourbon/addons/text_inputs_spec.rb
styler-sass-0.1.7.alpha spec/bourbon/addons/text_inputs_spec.rb
styler-sass-0.1.5.alpha spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.2.6 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.2.5 spec/bourbon/addons/text_inputs_spec.rb
bourbon-4.2.4 spec/bourbon/addons/text_inputs_spec.rb