Add working tests, fix bugs, rework popups and automate releases #36

Merged
Sansan merged 34 commits from feature/adding_tests into develop 2026-10-06 22:14:44 +02:00
2 changed files with 26 additions and 1 deletions
Showing only changes of commit 5519afb5f6 - Show all commits

No files matched your search

+13
View File
@@ -4,6 +4,19 @@ extends BasePopup
## What is new in each version, newest first. ## What is new in each version, newest first.
const WHATS_NEW: Dictionary = { const WHATS_NEW: Dictionary = {
"2.0.0": "Reworked all popups, they dim the background and close when clicking outside
Fixed blurry text and the layout of the player list
Moved Sync to the top row and Settings next to the reset buttons
The inspiration and sync lists now show where each item starts
The sync result now looks right with any number of columns
Failed song downloads are now retried instead of getting stuck
The game no longer waits forever when the server does not answer
The song cache now fills up to the cache size in the settings
Statistics are turned back on when a new game starts
Fixed bugs with low winning scores and Show answer before a song is playing
The log now shows the time on every row
New app icon and a menu entry on Linux
Reorganized the code and added automated tests",
"1.9.0": "Made improvements to the Search window "1.9.0": "Made improvements to the Search window
Made small changes to the inspiration list scrolling Made small changes to the inspiration list scrolling
Made small changes to the player list Made small changes to the player list
+13 -1
View File
@@ -68,6 +68,12 @@ const RENAMED_PATHS: Dictionary = {
SYNC_COLUMNS + "/CaughtErrorsVBox/CaughtErrorsLabel", SYNC_COLUMNS + "/CaughtErrorsVBox/CaughtErrorsLabel",
} }
## Nodes whose height follows text that changes between versions, such as the changelog.
## Their position and width are still checked.
const HEIGHT_FOLLOWS_TEXT: Array[String] = [
"AboutPopup/AboutPanel/ScrollContainer/ContentVBox",
]
## How far a node may be from its old place, in pixels. ## How far a node may be from its old place, in pixels.
const TOLERANCE: float = 0.5 const TOLERANCE: float = 0.5
@@ -134,7 +140,8 @@ func test_every_node_is_where_it_was() -> void:
problems.append("%s: %s is missing (was %s)" % [state, path, old_path]) problems.append("%s: %s is missing (was %s)" % [state, path, old_path])
continue continue
var rect: Array = actual[path].rect var rect: Array = actual[path].rect
for i: int in 4: var sides: int = 3 if _height_follows_text(path) else 4
for i: int in sides:
if absf(rect[i] - expected.rect[i]) > TOLERANCE: if absf(rect[i] - expected.rect[i]) > TOLERANCE:
problems.append("%s: %s is at %s, was %s" problems.append("%s: %s is at %s, was %s"
% [state, path, rect, expected.rect]) % [state, path, rect, expected.rect])
@@ -145,3 +152,8 @@ func test_every_node_is_where_it_was() -> void:
assert_array(problems).override_failure_message( assert_array(problems).override_failure_message(
"%d nodes moved:\n%s" % [problems.size(), "\n".join(problems.slice(0, 30))]) \ "%d nodes moved:\n%s" % [problems.size(), "\n".join(problems.slice(0, 30))]) \
.is_empty() .is_empty()
static func _height_follows_text(path: String) -> bool:
return HEIGHT_FOLLOWS_TEXT.any(func(node_path: String) -> bool:
return path == node_path || path.begins_with(node_path + "/"))