Skip to content

Commit

Permalink
Fix tests that were validating incorrect behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 21, 2023
1 parent ef93b2b commit 53f4c07
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion container/doctabs_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestDocTabs_tabButtonRenderer_Remove(t *testing.T) {
{Text: "2", Content: widget.NewLabel("Content2")},
{Text: "3", Content: widget.NewLabel("Content3")}}
tabs := NewDocTabs(items...)
tabs.Resize(fyne.NewSize(100, 100))
tabs.Resize(fyne.NewSize(160, 160))
tabRenderer := cache.Renderer(tabs).(*docTabsRenderer)

tabs.SelectIndex(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<container size="500x36">
<widget size="460x36" type="*widget.Scroll">
<container size="460x36">
<widget size="83x36" type="*container.tabButton">
<text bold color="primary" pos="8,8" size="67x20">New longer text 1</text>
<widget size="164x36" type="*container.tabButton">
<text bold color="primary" pos="8,8" size="148x20">New longer text 1</text>
</widget>
<widget pos="87,0" size="83x36" type="*container.tabButton">
<widget pos="168,0" size="83x36" type="*container.tabButton">
<text bold pos="8,8" size="67x20">New 2</text>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/dynamic_appended.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<widget size="76x36" type="*container.tabButton">
<text bold color="primary" pos="8,8" size="60x20">Test1</text>
</widget>
<widget size="0x0" type="*container.tabButton">
<text bold size="0x0">Test2</text>
<widget pos="80,0" size="76x36" type="*container.tabButton">
<text bold pos="8,8" size="60x20">Test2</text>
</widget>
</container>
</widget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<container size="300x36">
<widget size="260x36" type="*widget.Scroll">
<container size="260x36">
<widget size="0x0" type="*container.tabButton">
<text bold color="primary" size="0x0">Test2</text>
<widget size="76x36" type="*container.tabButton">
<text bold color="primary" pos="8,8" size="60x20">Test2</text>
</widget>
</container>
</widget>
Expand Down
16 changes: 8 additions & 8 deletions container/testdata/doctabs/mobile/dynamic_appended.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<container size="300x36">
<widget size="260x36" type="*widget.Scroll">
<container size="260x36">
<widget size="260x36" type="*container.tabButton">
<text bold color="primary" pos="4,8" size="252x19">Test1</text>
<widget pos="236,8" size="20x20" type="*container.tabCloseButton">
<widget size="128x36" type="*container.tabButton">
<text bold color="primary" pos="4,8" size="120x19">Test1</text>
<widget pos="104,8" size="20x20" type="*container.tabCloseButton">
<image rsc="cancelIcon" size="iconInlineSize" themed="primary"/>
</widget>
</widget>
<widget size="0x0" type="*container.tabButton">
<text bold size="0x0">Test2</text>
<widget size="0x0" type="*container.tabCloseButton">
<image rsc="cancelIcon" size="0x0"/>
<widget pos="132,0" size="128x36" type="*container.tabButton">
<text bold pos="4,8" size="120x19">Test2</text>
<widget pos="104,8" size="20x20" type="*container.tabCloseButton">
<image rsc="cancelIcon" size="iconInlineSize"/>
</widget>
</widget>
</container>
Expand All @@ -27,7 +27,7 @@
</container>
</container>
<rectangle fillColor="shadow" pos="0,36" size="300x4"/>
<rectangle fillColor="primary" pos="0,36" size="260x4"/>
<rectangle fillColor="primary" pos="0,36" size="128x4"/>
<widget pos="0,40" size="300x110" type="*widget.Label">
<text pos="8,8" size="38x19">Text 1</text>
</widget>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<container size="300x36">
<widget size="260x36" type="*widget.Scroll">
<container size="260x36">
<widget size="0x0" type="*container.tabButton">
<text bold color="primary" size="0x0">Test2</text>
<widget size="0x0" type="*container.tabCloseButton">
<image rsc="cancelIcon" size="0x0" themed="primary"/>
<widget size="260x36" type="*container.tabButton">
<text bold color="primary" pos="4,8" size="252x19">Test2</text>
<widget pos="236,8" size="20x20" type="*container.tabCloseButton">
<image rsc="cancelIcon" size="iconInlineSize" themed="primary"/>
</widget>
</widget>
</container>
Expand All @@ -21,7 +21,7 @@
</container>
</container>
<rectangle fillColor="shadow" pos="0,36" size="300x4"/>
<rectangle fillColor="primary" pos="0,36" size="72x4"/>
<rectangle fillColor="primary" pos="0,36" size="260x4"/>
<widget pos="0,40" size="300x110" type="*widget.Label">
<text pos="8,8" size="38x19">Text 2</text>
</widget>
Expand Down

0 comments on commit 53f4c07

Please sign in to comment.