<commit_before>module Selectors exposing (all)

import Test exposing (..)
import Expect
import TestUtil exposing (prettyPrint)
import Css exposing (..)
import Css.Elements exposing (..)
import Css.Namespace exposing (namespace)


all : Test
all =
    describe "selectors"
        [ nonElements, elements ]


nonElements : Test
nonElements =
    describe "non-elements"
        [ testSelector ".foo" ((.) "foo")
        , testSelector "#foo" ((#) "foo")
        , testSelector "div:hover" (\children -> div [ hover children ])
        , testSelector "div::before" (\children -> div [ before children ])
        ]


elements : Test
elements =
    describe "selectors"
        [ testSelector "ol" ol
        , testSelector "ul" ul
        ]


testSelector : String -> (List Mixin -> Snippet) -> Test
testSelector expectedOutput applySelector =
    (test (expectedOutput ++ " selector")) <|
        \() ->
            prettyPrint (stylesheet [ applySelector [ display none ] ])<commit_msg>Add a bunch of element tests.<commit_after>module Selectors exposing (all)

import Test exposing (..)
import Expect
import TestUtil exposing (prettyPrint)
import Css exposing (..)
import Css.Elements exposing (..)
import Css.Namespace exposing (namespace)


all : Test
all =
    describe "selectors"
        [ nonElements, elements ]


nonElements : Test
nonElements =
    describe "non-elements"
        [ testSelector ".foo" ((.) "foo")
        , testSelector "#foo" ((#) "foo")
        , testSelector "div:hover" (\children -> div [ hover children ])
        , testSelector "div::before" (\children -> div [ before children ])
        ]


elements : Test
elements =
    describe "selectors"
        [ testSelector "ol" ol
        , testSelector "ul" ul
        , testSelector "html" html
        , testSelector "body" body
        , testSelector "article" article
        , testSelector "header" header
        , testSelector "footer" footer
        , testSelector "h1" h1
        , testSelector "h2" h2
        , testSelector "h3" h3
        , testSelector "h4" h4
        , testSelector "h5" h5
        , testSelector "h6" h6
        , testSelector "nav" nav
        , testSelector "section" section
        , testSelector "div" div
        , testSelector "hr" hr
        , testSelector "li" li
        , testSelector "main" main'
        , testSelector "ol" ol
        , testSelector "p" p
        , testSelector "ul" ul
        , testSelector "pre" pre
        , testSelector "a" a
        , testSelector "code" code
        , testSelector "small" Css.Elements.small
        , testSelector "span" span
        , testSelector "strong" strong
        , testSelector "img" img
        , testSelector "audio" audio
        , testSelector "video" video
        , testSelector "canvas" canvas
        , testSelector "caption" caption
        , testSelector "col" col
        , testSelector "colgroup" colgroup
        , testSelector "table" table
        , testSelector "tbody" tbody
        , testSelector "td" td
        , testSelector "tfoot" tfoot
        , testSelector "th" th
        , testSelector "thead" thead
        , testSelector "tr" tr
        , testSelector "button" button
        , testSelector "fieldset" fieldset
        , testSelector "form" form
        , testSelector "input" input
        , testSelector "label" label
        , testSelector "legend" legend
        , testSelector "optgroup" optgroup
        , testSelector "option" option
        , testSelector "progress" progress
        , testSelector "select" select
        ]


testSelector : String -> (List Mixin -> Snippet) -> Test
testSelector expectedOutput applySelector =
    (test (expectedOutput ++ " selector")) <|
        \() ->
            prettyPrint (stylesheet [ applySelector [ display none ] ])
{'fraction_non_alphanumeric': 0.1059322033898305, 'fraction_numerical': 0.0031779661016949155, 'mean_word_length': 2.3573333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7106135', 'n_tokens_mistral': 1042, 'n_tokens_neox': 1015, 'n_words': 317}