fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// This test ensures that the color of the items in the type decl are working as expected. 2 3// We need to disable this check because `implementors/test_docs/trait.TraitWithoutGenerics.js` 4// doesn't exist. 5fail-on-request-error: false 6 7define-function: ( 8 "check-colors", 9 ( 10 theme, 11 attr_color, 12 trait_color, 13 struct_color, 14 enum_color, 15 primitive_color, 16 constant_color, 17 fn_color, 18 assoc_type_color, 19 ), 20 block { 21 go-to: "file://" + |DOC_PATH| + "/test_docs/struct.WithGenerics.html" 22 show-text: true 23 24 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 25 reload: 26 assert-css: (".item-decl .code-attribute", {"color": |attr_color|}, ALL) 27 assert-css: (".item-decl .trait", {"color": |trait_color|}, ALL) 28 // We need to add `code` here because otherwise it would select the parent too. 29 assert-css: (".item-decl code .struct", {"color": |struct_color|}, ALL) 30 assert-css: (".item-decl .enum", {"color": |enum_color|}, ALL) 31 assert-css: (".item-decl .primitive", {"color": |primitive_color|}, ALL) 32 33 go-to: "file://" + |DOC_PATH| + "/test_docs/trait.TraitWithoutGenerics.html" 34 assert-css: (".item-decl .constant", {"color": |constant_color|}, ALL) 35 assert-css: (".item-decl .fn", {"color": |fn_color|}, ALL) 36 assert-css: (".item-decl .associatedtype", {"color": |assoc_type_color|}, ALL) 37 }, 38) 39 40call-function: ( 41 "check-colors", 42 { 43 "theme": "ayu", 44 "attr_color": "#999", 45 "trait_color": "#39afd7", 46 "struct_color": "#ffa0a5", 47 "enum_color": "#ffa0a5", 48 "primitive_color": "#ffa0a5", 49 "constant_color": "#39afd7", 50 "fn_color": "#fdd687", 51 "assoc_type_color": "#39afd7", 52 }, 53) 54call-function: ( 55 "check-colors", 56 { 57 "theme": "dark", 58 "attr_color": "#999", 59 "trait_color": "#b78cf2", 60 "struct_color": "#2dbfb8", 61 "enum_color": "#2dbfb8", 62 "primitive_color": "#2dbfb8", 63 "constant_color": "#d2991d", 64 "fn_color": "#2bab63", 65 "assoc_type_color": "#d2991d", 66 }, 67) 68call-function: ( 69 "check-colors", 70 { 71 "theme": "light", 72 "attr_color": "#999", 73 "trait_color": "#6e4fc9", 74 "struct_color": "#ad378a", 75 "enum_color": "#ad378a", 76 "primitive_color": "#ad378a", 77 "constant_color": "#3873ad", 78 "fn_color": "#ad7c37", 79 "assoc_type_color": "#3873ad", 80 }, 81)