Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,19 @@ because it turns other people's test suites red.
from the size" when leaving it empty means going without - the password
of an archive, the author of a PDF. What that means for the file is in the
sentence beside the box.
- **The Tools tab names each tool and says more after a run.** The menu
starts every line with the tool's name on the command line, such as
`checksum-write`. A result that matches is green. Copy all puts the whole
result on the clipboard, every file of a long list included, and Open
folder shows the folder the tool worked in.

### Fixed

- **Choosing another tool on the Tools tab left the boxes in the wrong
place.** The section kept the height of the tool chosen before, so a
setting could stand under it with its list hidden, or an empty band was
left. The screen is now laid out again each time.

- **The FAQ on the website said a deliberately broken file was not possible
yet.** `tfg damage` has been in the tool since 0.3.0, and the answer still
called it a planned feature. It now says how to make one, in every language.
Expand Down
2 changes: 1 addition & 1 deletion internal/guard/boxwidth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func TestALongValueTakesTheRowAndOnTheToolsTabNothingElseButAPathDoes(t *testing
half := float32(parts.ColumnWidth) / 2
long, short := 0, 0
for _, d := range tool.All() {
menu.SetSelected(text.ToolQuestion(d.ID, d.Question))
menu.SetSelected(text.ToolChoice(d.ID, d.Question))
layOut()
mayTakeTheRow := map[fyne.CanvasObject]bool{}
allowed := func(label string) {
Expand Down
6 changes: 3 additions & 3 deletions internal/guard/checksumfolder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func TestTheToolsTabWritesAndChecksAFolder(t *testing.T) {
menu := chooserUnder(t, screen, text.FieldTool())

write, _ := tool.Get(checksum.WriteID)
menu.SetSelected(text.ToolQuestion(write.ID, write.Question))
menu.SetSelected(text.ToolChoice(write.ID, write.Question))
pressNamed(t, screen, text.ButtonChoose())
if host.asked == 0 {
t.Fatal("the browse button of checksum-write asked nobody for a folder")
Expand All @@ -468,7 +468,7 @@ func TestTheToolsTabWritesAndChecksAFolder(t *testing.T) {
}

check, _ := tool.Get(checksum.CheckID)
menu.SetSelected(text.ToolQuestion(check.ID, check.Question))
menu.SetSelected(text.ToolChoice(check.ID, check.Question))
host.pickedFile = sums
pressNamed(t, screen, text.ButtonChoose())
pressNamed(t, screen, text.ButtonRunTool())
Expand Down Expand Up @@ -507,7 +507,7 @@ func TestTheToolsTabCutsALongListShort(t *testing.T) {
window.Open(host)
screen := selectTab(t, host.content, text.TabTools())
check, _ := tool.Get(checksum.CheckID)
chooserUnder(t, screen, text.FieldTool()).SetSelected(text.ToolQuestion(check.ID, check.Question))
chooserUnder(t, screen, text.FieldTool()).SetSelected(text.ToolChoice(check.ID, check.Question))
pressNamed(t, screen, text.ButtonChoose())
pressNamed(t, screen, text.ButtonRunTool())
host.waitForWork()
Expand Down
12 changes: 12 additions & 0 deletions internal/guard/screenpixels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/donislawdev/TestingFilesGenerator/internal/gui/parts"
"github.com/donislawdev/TestingFilesGenerator/internal/gui/text"
"github.com/donislawdev/TestingFilesGenerator/internal/gui/window"
"github.com/donislawdev/TestingFilesGenerator/internal/tool/checksum"
)

// What this defends. A screen keeps looking the way somebody last looked at it.
Expand Down Expand Up @@ -335,6 +336,17 @@ func screenScenes() []screenScene {
fillField(t, s.tab, text.SettingLabel("expected"), "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad")
pressNamed(t, s.tab, text.ButtonRunTool())
}},
// The two folder tools, since 2026-10-05: checksum-write chosen once
// the screen was laid out with checksum, which is how the owner found
// its section keeping the height of the tool before - so the picture
// is of the change, not of a screen that opened with it. And a check
// that matches, its verdict in the colour of a match.
{name: "tools-write", tab: text.TabTools(), after: chooseToolIn(checksum.WriteID)},
{name: "tools-check-result", tab: text.TabTools(), set: func(t *testing.T, s scene) {
chooseToolIn(checksum.CheckID)(t, s)
fillField(t, s.tab, text.SettingLabel(checksum.InputChecksumFile), "testdata/checksum-sample.SHA256SUMS")
pressNamed(t, s.tab, text.ButtonRunTool())
}},
{name: "generate", tab: text.TabOneTarget()},
{name: "generate-empty", tab: text.TabOneTarget(), set: func(t *testing.T, s scene) {
fillField(t, s.tab, text.FieldCount(), "0")
Expand Down
1 change: 1 addition & 0 deletions internal/guard/testdata/checksum-sample.SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad checksum-sample.txt
Binary file modified internal/guard/testdata/screens/catalogue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 72 additions & 12 deletions internal/guard/testdata/screens/catalogue.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<canvas padded size="1100x16450">
<canvas padded size="1100x16715">
<content>
<container pos="4,4" size="1092x16442">
<container pos="136,0" size="820x16442">
<container pos="4,4" size="1092x16707">
<container pos="136,0" size="820x16707">
<container size="820x49">
<container pos="16,0" size="788x49">
<container size="788x24">
Expand Down Expand Up @@ -2944,7 +2944,67 @@
</container>
</container>
</container>
<container pos="0,8503" size="820x180">
<container pos="0,8503" size="820x240">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x240" strokeColor="button" strokeWidth="1"/>
<container size="820x240">
<container pos="16,16" size="788x208">
<text bold size="788x20" textSize="17">Verdict</text>
<container pos="0,36" size="788x172">
<container size="788x35">
<widget size="788x14" type="*parts.QuietText">
<container size="788x14">
<widget pos="-6,-6" size="800x26" type="*widget.RichText">
<text color="placeholder" pos="6,6" size="45x14" textSize="12">a match</text>
</widget>
</container>
</widget>
<container pos="0,18" size="788x16">
<widget pos="-6,-6" size="800x28" type="*widget.Label">
<widget size="800x28" type="*widget.RichText">
<text color="success" pos="6,6" size="357x16">Matches: every file SHA256SUMS lists is what it says.</text>
</widget>
</widget>
</container>
</container>
<container pos="0,51" size="788x35">
<widget size="788x14" type="*parts.QuietText">
<container size="788x14">
<widget pos="-6,-6" size="800x26" type="*widget.RichText">
<text color="placeholder" pos="6,6" size="66x14" textSize="12">not a match</text>
</widget>
</container>
</widget>
<container pos="0,18" size="788x16">
<widget pos="-6,-6" size="800x28" type="*widget.Label">
<widget size="800x28" type="*widget.RichText">
<text color="error" pos="6,6" size="435x16">Does not match: SHA256SUMS lists files that are not what it says.</text>
</widget>
</widget>
</container>
</container>
<container pos="0,102" size="788x69">
<widget size="788x14" type="*parts.QuietText">
<container size="788x14">
<widget pos="-6,-6" size="800x26" type="*widget.RichText">
<text color="placeholder" pos="6,6" size="73x14" textSize="12">a long match</text>
</widget>
</container>
</widget>
<container pos="0,18" size="788x50">
<widget pos="-6,-6" size="800x62" type="*widget.Label">
<widget size="800x62" type="*widget.RichText">
<text color="success" pos="6,6" size="150x16">Matches: the sha512 is</text>
<text color="success" pos="6,22" size="787x16">ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd45</text>
<text color="success" pos="6,39" size="341x16">4d4423643ce80e2a9ac94fa54ca49f, as expected.</text>
</widget>
</widget>
</container>
</container>
</container>
</container>
</container>
</container>
<container pos="0,8768" size="820x180">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x180" strokeColor="button" strokeWidth="1"/>
<container size="820x180">
<container pos="16,16" size="788x148">
Expand Down Expand Up @@ -2993,7 +3053,7 @@
</container>
</container>
</container>
<container pos="0,8707" size="820x1119">
<container pos="0,8972" size="820x1119">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x1119" strokeColor="button" strokeWidth="1"/>
<container size="820x1119">
<container pos="16,16" size="788x1087">
Expand Down Expand Up @@ -3414,7 +3474,7 @@
</container>
</container>
</container>
<container pos="0,9851" size="820x1038">
<container pos="0,10116" size="820x1038">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x1038" strokeColor="button" strokeWidth="1"/>
<container size="820x1038">
<container pos="16,16" size="788x1006">
Expand Down Expand Up @@ -3754,7 +3814,7 @@
</container>
</container>
</container>
<container pos="0,10913" size="820x1078">
<container pos="0,11178" size="820x1078">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x1078" strokeColor="button" strokeWidth="1"/>
<container size="820x1078">
<container pos="16,16" size="788x1046">
Expand Down Expand Up @@ -4265,7 +4325,7 @@
</container>
</container>
</container>
<container pos="0,12016" size="820x385">
<container pos="0,12281" size="820x385">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x385" strokeColor="button" strokeWidth="1"/>
<container size="820x385">
<container pos="16,16" size="788x353">
Expand Down Expand Up @@ -4335,7 +4395,7 @@
</container>
</container>
</container>
<container pos="0,12425" size="820x1620">
<container pos="0,12690" size="820x1620">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x1620" strokeColor="button" strokeWidth="1"/>
<container size="820x1620">
<container pos="16,16" size="788x1588">
Expand Down Expand Up @@ -4919,7 +4979,7 @@
</container>
</container>
</container>
<container pos="0,14070" size="820x1620">
<container pos="0,14335" size="820x1620">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x1620" strokeColor="button" strokeWidth="1"/>
<container size="820x1620">
<container pos="16,16" size="788x1588">
Expand Down Expand Up @@ -5503,7 +5563,7 @@
</container>
</container>
</container>
<container pos="0,15715" size="820x290">
<container pos="0,15980" size="820x290">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x290" strokeColor="button" strokeWidth="1"/>
<container size="820x290">
<container pos="16,16" size="788x258">
Expand Down Expand Up @@ -5616,7 +5676,7 @@
</container>
</container>
</container>
<container pos="0,16030" size="820x420">
<container pos="0,16294" size="820x420">
<rectangle fillColor="rgba(43,43,47,255)" radius="8" size="820x420" strokeColor="button" strokeWidth="1"/>
<container size="820x420">
<container pos="16,16" size="788x388">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading