File: label-next-to-symbol.goml

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (80 lines) | stat: -rw-r--r-- 2,517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// These tests verify that labels like "UNIX" and "Deprecated" stay on the same line as their symbol.
// It also verifies the staggered layout on mobile.
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"

call-function: ("switch-theme", {"theme": "light"})

// Desktop view
set-window-size: (1080, 600)
assert: (".stab.deprecated")
assert: (".stab.portability")

// make sure that deprecated and portability have the right colors
assert-css: (
    ".item-table .item-name .stab.deprecated",
    { "background-color": "#fff5d6" },
)
assert-css: (
    ".item-table .item-name .stab.portability",
    { "background-color": "#fff5d6" },
)

// table like view
assert-css: (".desc.docblock-short", { "padding-left": "0px" })
compare-elements-position-near: (
    "//*[@class='item-name']//a[normalize-space()='replaced_function']",
    ".item-name .stab.deprecated",
    {"y": 2},
)
// "Unix" part is on second line
compare-elements-position-false: (
    ".item-name .stab.deprecated",
    ".item-name .stab.portability",
    ["y"],
)

// Ensure no wrap
compare-elements-position: (
    "//*[@class='item-name']//a[normalize-space()='replaced_function']/..",
    "//*[@class='desc docblock-short'][normalize-space()='a thing with a label']",
    ["y"],
)

// Mobile view
set-window-size: (600, 600)
// staggered layout with 2em spacing
assert-css: (".desc.docblock-short", { "padding-left": "32px" })
compare-elements-position-near: (
    "//*[@class='item-name']//a[normalize-space()='replaced_function']",
    ".item-name .stab.deprecated",
    {"y": 2},
)
compare-elements-position: (
    ".item-name .stab.deprecated",
    ".item-name .stab.portability",
    ["y"],
)

// Ensure wrap
compare-elements-position-false: (
    "//*[@class='item-name']//a[normalize-space()='replaced_function']/..",
    "//*[@class='desc docblock-short'][normalize-space()='a thing with a label']",
    ["y"],
)
compare-elements-position-false: (
    ".item-name .stab.deprecated",
    "//*[@class='desc docblock-short'][normalize-space()='a thing with a label']",
    ["y"],
)

// Ensure it doesn't expand.
set-window-size: (800, 800)
go-to: "file://" + |DOC_PATH| + "/test_docs/cfgs/index.html"
// This part of the tags should not be on the same line as the beginning since the width
// is too small for that.
compare-elements-position-false: (
    "//*[@class='stab portability']/code[normalize-space()='appservice-api-c']",
    "//*[@class='stab portability']/code[normalize-space()='server']",
    ["y"],
)