Indent every script with tabs, like the Godot editor does
This commit is contained in:
1 parent
8c1987807c
commit
bad4b3ad8b
35 files changed
+1653
-1653
No files matched your search
@@ -5,61 +5,61 @@ var _crono: PlayerObject
|
||||
|
||||
|
||||
func before_test() -> void:
|
||||
super()
|
||||
_crono = _add_player("Crono")
|
||||
await _play_first_song()
|
||||
Settings.winning_score = 1
|
||||
super()
|
||||
_crono = _add_player("Crono")
|
||||
await _play_first_song()
|
||||
Settings.winning_score = 1
|
||||
|
||||
|
||||
func _stats_checkbox() -> CheckButton:
|
||||
return _quiz.get_node("SettingsWindow").get_node("%AddToDatabaseCheckButton")
|
||||
return _quiz.get_node("SettingsWindow").get_node("%AddToDatabaseCheckButton")
|
||||
|
||||
|
||||
func test_winning_turns_statistics_off() -> void:
|
||||
await _give_point_with_keybind(1)
|
||||
await _give_point_with_keybind(1)
|
||||
|
||||
assert_bool(Settings.add_to_stats).is_false()
|
||||
assert_bool(Settings.add_to_stats).is_false()
|
||||
|
||||
|
||||
func test_resetting_points_turns_statistics_back_on() -> void:
|
||||
await _give_point_with_keybind(1)
|
||||
await _give_point_with_keybind(1)
|
||||
|
||||
_press("ResetPointsButton")
|
||||
_press("ResetPointsButton")
|
||||
|
||||
assert_bool(Settings.add_to_stats).is_true()
|
||||
assert_bool(Settings.add_to_stats).is_true()
|
||||
|
||||
|
||||
func test_statistics_turned_off_by_hand_stay_off_after_reset() -> void:
|
||||
Settings.add_to_stats = false
|
||||
await _give_point_with_keybind(1)
|
||||
Settings.add_to_stats = false
|
||||
await _give_point_with_keybind(1)
|
||||
|
||||
_press("ResetPointsButton")
|
||||
_press("ResetPointsButton")
|
||||
|
||||
assert_bool(Settings.add_to_stats).is_false()
|
||||
assert_bool(Settings.add_to_stats).is_false()
|
||||
|
||||
|
||||
func test_settings_checkbox_shows_statistics_off_after_win() -> void:
|
||||
await _give_point_with_keybind(1)
|
||||
await _give_point_with_keybind(1)
|
||||
|
||||
_press("SettingsButton")
|
||||
_press("SettingsButton")
|
||||
|
||||
assert_bool(_stats_checkbox().button_pressed).is_false()
|
||||
assert_bool(_stats_checkbox().button_pressed).is_false()
|
||||
|
||||
|
||||
func test_songs_after_a_win_are_not_counted() -> void:
|
||||
await _give_point_with_keybind(1)
|
||||
var played_before: int = _server.count("/music/played?song=0")
|
||||
await _give_point_with_keybind(1)
|
||||
var played_before: int = _server.count("/music/played?song=0")
|
||||
|
||||
_press("ShowAnswerButton")
|
||||
_press("ShowAnswerButton")
|
||||
|
||||
assert_int(_server.count("/music/played?song=0")).is_equal(played_before)
|
||||
assert_int(_server.count("/music/played?song=0")).is_equal(played_before)
|
||||
|
||||
|
||||
func test_winning_score_cannot_go_below_one() -> void:
|
||||
_press("SettingsButton")
|
||||
var lower_button: Button = _quiz.get_node("SettingsWindow").get_node("%LowerButton")
|
||||
_press("SettingsButton")
|
||||
var lower_button: Button = _quiz.get_node("SettingsWindow").get_node("%LowerButton")
|
||||
|
||||
for i: int in 3:
|
||||
lower_button.pressed.emit()
|
||||
for i: int in 3:
|
||||
lower_button.pressed.emit()
|
||||
|
||||
assert_int(Settings.winning_score).is_equal(1)
|
||||
assert_int(Settings.winning_score).is_equal(1)
|
||||
Reference in new issue
Block a user