Skip to content

Commit ac1d3ef

Browse files
authored
Merge pull request #6022 from TomJGooding/test-footer-add-pauses-for-flaky-test
test(footer): add pauses for flaky test in CI
2 parents a38ad12 + 0a5795d commit ac1d3ef

File tree

3 files changed

+29
-35
lines changed

3 files changed

+29
-35
lines changed

src/textual/widgets/_input.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ class Input(ScrollView):
192192
}
193193
194194
&:focus {
195-
border: tall $border;
195+
border: tall $border;
196196
background-tint: $foreground 5%;
197-
198197
}
199198
&>.input--cursor {
200199
background: $input-cursor-background;
@@ -212,12 +211,12 @@ class Input(ScrollView):
212211
}
213212
&.-invalid:focus {
214213
border: tall $error;
215-
}
214+
}
216215
217216
&:ansi {
218217
background: ansi_default;
219218
color: ansi_default;
220-
&>.input--cursor {
219+
&>.input--cursor {
221220
text-style: reverse;
222221
}
223222
&>.input--placeholder, &>.input--suggestion {
@@ -229,8 +228,7 @@ class Input(ScrollView):
229228
}
230229
&.-invalid:focus {
231230
border: tall ansi_red;
232-
}
233-
231+
}
234232
}
235233
}
236234

src/textual/widgets/_markdown.py

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ class MarkdownOrderedList(MarkdownList):
565565
566566
MarkdownOrderedList Vertical {
567567
height: auto;
568-
width: 1fr;
568+
width: 1fr;
569569
}
570570
"""
571571

@@ -607,29 +607,28 @@ class MarkdownTableContent(Widget):
607607

608608
DEFAULT_CSS = """
609609
MarkdownTableContent {
610-
width: 1fr;
610+
width: 1fr;
611611
height: auto;
612-
layout: grid;
613-
grid-columns: auto;
614-
grid-rows: auto;
615-
grid-gutter: 1 1;
616-
612+
layout: grid;
613+
grid-columns: auto;
614+
grid-rows: auto;
615+
grid-gutter: 1 1;
616+
617617
& > .cell {
618618
margin: 0 0;
619619
height: auto;
620620
padding: 0 1;
621621
text-overflow: ellipsis;
622-
623622
}
624623
& > .header {
625624
height: auto;
626625
margin: 0 0;
627626
padding: 0 1;
628627
color: $primary;
629-
text-overflow: ellipsis;
630-
content-align: left bottom;
628+
text-overflow: ellipsis;
629+
content-align: left bottom;
631630
}
632-
keyline: thin $foreground 20%;
631+
keyline: thin $foreground 20%;
633632
}
634633
MarkdownTableContent > .markdown-table--header {
635634
text-style: bold;
@@ -703,11 +702,11 @@ class MarkdownTable(MarkdownBlock):
703702

704703
DEFAULT_CSS = """
705704
MarkdownTable {
706-
width: 1fr;
707-
margin-bottom: 1;
705+
width: 1fr;
706+
margin-bottom: 1;
708707
&:light {
709708
background: white 30%;
710-
}
709+
}
711710
}
712711
"""
713712

@@ -796,7 +795,7 @@ class MarkdownBullet(Widget):
796795
DEFAULT_CSS = """
797796
MarkdownBullet {
798797
width: auto;
799-
color: $text-primary;
798+
color: $text-primary;
800799
&:light {
801800
color: $text-secondary;
802801
}
@@ -853,15 +852,15 @@ class MarkdownFence(MarkdownBlock):
853852
scrollbar-size-horizontal: 0;
854853
scrollbar-size-vertical: 0;
855854
width: 1fr;
856-
height: auto;
855+
height: auto;
857856
color: rgb(210,210,210);
858857
background: black 10%;
859858
&:light {
860859
background: white 30%;
861-
}
860+
}
862861
& > Label {
863862
padding: 1 2;
864-
}
863+
}
865864
}
866865
"""
867866

@@ -904,15 +903,15 @@ def compose(self) -> ComposeResult:
904903

905904
class Markdown(Widget):
906905
DEFAULT_CSS = """
907-
Markdown {
908-
height: auto;
906+
Markdown {
907+
height: auto;
909908
padding: 0 2 0 2;
910909
layout: vertical;
911-
color: $foreground;
910+
color: $foreground;
912911
overflow-y: hidden;
913-
912+
914913
MarkdownBlock {
915-
&:dark > .code_inline {
914+
&:dark > .code_inline {
916915
background: $warning 10%;
917916
color: $text-warning 95%;
918917
}
@@ -921,7 +920,7 @@ class Markdown(Widget):
921920
color: $text-error 95%;
922921
}
923922
& > .em {
924-
text-style: italic;
923+
text-style: italic;
925924
}
926925
& > .strong {
927926
text-style: bold;
@@ -930,10 +929,7 @@ class Markdown(Widget):
930929
text-style: strike;
931930
}
932931
}
933-
934932
}
935-
936-
937933
"""
938934

939935
BULLETS = ["• ", "▪ ", "‣ ", "⭑ ", "◦ "]

tests/footer/test_footer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def action_app_binding(self) -> None:
5454
assert app_binding_count == 0
5555
await app.wait_for_refresh()
5656
await pilot.click("Footer", offset=(1, 0))
57-
await app.wait_for_refresh()
57+
await pilot.pause()
5858
assert app_binding_count == 1
5959
await pilot.click("Footer")
60-
await app.wait_for_refresh()
60+
await pilot.pause()
6161
assert app_binding_count == 2

0 commit comments

Comments
 (0)