1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00
Commit Graph

10052 Commits

Author SHA1 Message Date
Bartłomiej Dach
f51b8a6a05
Fix code quality inspection 2023-06-06 21:11:24 +02:00
Bartłomiej Dach
7694aa7219
Add test coverage 2023-06-06 20:36:44 +02:00
Bartłomiej Dach
5c1abdc704
Fix screen navigation test hijacking dummy request handler
In an upcoming change, I stumbled upon a test failure mode wherein tests
in `TestSceneScreenNavigation` would die on the following exception:

	2023-05-07 17:58:42 [error]: System.ObjectDisposedException: Cannot access a closed Realm.
	2023-05-07 17:58:42 [error]: Object name: 'Realms.Realm'.
	2023-05-07 17:58:42 [error]: at Realms.Realm.ThrowIfDisposed()
	2023-05-07 17:58:42 [error]: at Realms.Realm.All[T]()
	2023-05-07 17:58:42 [error]: at osu.Game.Beatmaps.BeatmapManager.<>c__DisplayClass25_0.<QueryBeatmap>b__0(Realm r) in D:\a\osu\osu\osu.Game\Beatmaps\BeatmapManager.cs:line 282
	2023-05-07 17:58:42 [error]: at osu.Game.Database.RealmAccess.Run[T](Func`2 action) in D:\a\osu\osu\osu.Game\Database\RealmAccess.cs:line 387
	2023-05-07 17:58:42 [error]: at osu.Game.Beatmaps.BeatmapManager.QueryBeatmap(Expression`1 query) in D:\a\osu\osu\osu.Game\Beatmaps\BeatmapManager.cs:line 282
	2023-05-07 17:58:42 [error]: at osu.Game.Tests.Visual.OnlinePlay.TestRoomRequestsHandler.<HandleRequest>g__createResponseBeatmaps|6_0(Int32[] beatmapIds, <>c__DisplayClass6_0& ) in D:\a\osu\osu\osu.Game\Tests\Visual\OnlinePlay\TestRoomRequestsHandler.cs:line 174
	2023-05-07 17:58:42 [error]: at osu.Game.Tests.Visual.OnlinePlay.TestRoomRequestsHandler.HandleRequest(APIRequest request, APIUser localUser, BeatmapManager beatmapManager) in D:\a\osu\osu\osu.Game\Tests\Visual\OnlinePlay\TestRoomRequestsHandler.cs:line 140
	2023-05-07 17:58:42 [error]: at osu.Game.Tests.Visual.TestMultiplayerComponents.<>c__DisplayClass18_0.<load>b__0(APIRequest request) in D:\a\osu\osu\osu.Game.Tests\Visual\TestMultiplayerComponents.cs:line 80
	2023-05-07 17:58:42 [error]: at osu.Game.Online.API.DummyAPIAccess.<>c__DisplayClass32_0.<Queue>b__0() in D:\a\osu\osu\osu.Game\Online\API\DummyAPIAccess.cs:line 74

Upon closer inspection, one of the tests in the scene instantiates a
`TestMultiplayerComponents` instance. `TestMultiplayerComponents`
registers a custom request handler onto `DummyAPIAccess`. Normally, this
is not an issue; however, because `TestSceneScreenNavigation` is an
`OsuGameTestScene`, and therefore has its storage recycled after every
test, this leads to the error above in the following scenario:

1. `TestPushMatchSubScreenAndPressBackButtonImmediately()` passes.
2. The test is cleaned up, and the test case's storage is recycled,
   including the test case's realm database.
3. In a subsequent test, a web request handled by the dummy API request
   handler is fired. The dummy API request handler subsequently attempts
   to access a realm that does not exist anymore.

As the usage of `TestMultiplayerComponents` is highly unorthodox in this
particular case, I'm opting for a localised fix which ensures that the
request handler is cleaned up appropriately.
2023-06-05 23:15:16 +02:00
Bartłomiej Dach
25d0f0f3da
Merge pull request #23741 from peppy/fix-manage-collection-commit-on-focus-loss
Fix collection name changes not being reflected if enter is not pressed
2023-06-04 17:19:13 +02:00
Dean Herbert
3e308e4c27 Add test coverage showing commit failure in manage collections dialog 2023-06-04 12:50:30 +09:00
Bartłomiej Dach
331e90f720
Merge branch 'master' into tidy-results-grid-usage 2023-06-03 19:45:23 +02:00
Bartłomiej Dach
a9d4556647
Merge branch 'master' into update-multiplayer-room-diff-range 2023-06-03 16:50:09 +02:00
Dean Herbert
985604fab5 Return StatisticItems rather than StatisticRows from ruleset
There were no usages of more than one column being provided per row, so
it seemed like unnecessarily complexity. I'm currently trying to reduce
complexity so we can improve the layout of the results screen, which
currently has up to three levels of nested `GridContainer`s.

Of note, I can't add backwards compatibility because the method
signature has not changed in `Ruleset` (only the return type). If we do
want to keep compatibility with other rulesets, we could designate a new
name for the updated method.
2023-06-01 14:35:15 +09:00
Dean Herbert
14a376c041 Merge branch 'master' into scorev2 2023-05-30 14:34:43 +09:00
Bartłomiej Dach
5604dfb758
Merge branch 'master' into acc-challenge 2023-05-29 22:33:57 +02:00
Bartłomiej Dach
1b57b0d31c
Add testing 2023-05-29 22:33:46 +02:00
Dean Herbert
1558723420 Merge branch 'master' into scorev2 2023-05-29 20:06:32 +09:00
Dean Herbert
a789d1e49c Add xmldoc and change naming around ScoreProcessorStatistics a bit 2023-05-29 18:38:16 +09:00
Bartłomiej Dach
53c91349fe
Merge branch 'master' into slider-control-point-no-distance-snap 2023-05-26 19:52:54 +02:00
Bartłomiej Dach
96fe7cbe54
Merge branch 'master' into sample-set-controls 2023-05-25 21:58:16 +02:00
Dean Herbert
804671ca74 Split out grid snapping modes into "relative" and "global" types 2023-05-25 21:41:19 +09:00
Dean Herbert
7a5349d747 Remove constructor from MultiplayerPlaylistItem which is only used in tests 2023-05-25 20:09:40 +09:00
Dean Herbert
058edb5d5f Centralise beatmap playable duration and bounds lookups 2023-05-25 17:32:48 +09:00
Dan Balasescu
6d9ba9248d Massage tests a bit more 2023-05-25 16:38:22 +09:00
Bartłomiej Dach
578a0e7494
Merge branch 'master' into beat-divisor-visual-improvements 2023-05-24 22:28:26 +02:00
Bartłomiej Dach
07b5874eee
Fix test step name 2023-05-24 20:18:36 +02:00
Dean Herbert
6044327181 Add test coverage for escape deselecting any active selection 2023-05-24 23:59:22 +09:00
Dean Herbert
663cec1ff6 Combine editor navigation test scenes 2023-05-24 23:51:28 +09:00
Dean Herbert
8e5ba2208d Add test coverage of new hotkeys 2023-05-24 17:33:48 +09:00
Dean Herbert
e68ba6366c Update new usages of "soft" to use the new constant 2023-05-24 14:04:10 +09:00
Dean Herbert
298989ffd2 Merge branch 'master' into sample-set-controls 2023-05-24 14:03:04 +09:00
Gyoshi
b5f8093941 Use RangePadding to align mouse with slider 2023-05-23 18:16:14 +02:00
Gyoshi
fa00f8b92a replace manual code with existing method 2023-05-23 18:16:12 +02:00
Gyoshi
921d7e4d89 More fitting tests for new layout 2023-05-23 18:16:10 +02:00
Dan Balasescu
7658536b5a Fix CI issues 2023-05-23 19:32:19 +09:00
Dan Balasescu
fee3d43596 Merge branch 'master' into scorev2 2023-05-23 19:07:54 +09:00
Dan Balasescu
844c023fb7 Fix tests 2023-05-23 18:18:27 +09:00
Dean Herbert
ff5dde0ebe
Merge pull request #23575 from Joehuu/fix-inverted-video-only-check
Fix old widescreen videos with black bars not correctly filling screen (again)
2023-05-23 16:47:52 +09:00
Bartłomiej Dach
2ce150ba2b
Add failing test case for sample undo 2023-05-22 22:23:05 +02:00
Bartłomiej Dach
843d2903d2
Add failing test case for slider velocity undo 2023-05-22 22:18:15 +02:00
Dan Balasescu
7cbf48ffcf Fix TestSceneScoring and incorrect combo calculations 2023-05-19 14:09:19 +09:00
Dan Balasescu
73544231de Fix TestSceneTopLocalRank 2023-05-19 14:06:56 +09:00
Joseph Madamba
caa79704ac
Add test coverage for failing case 2023-05-17 20:23:37 -07:00
Dean Herbert
ec2b9165d5 Adjust BeatDivisorControl test to show control mmuch larger 2023-05-17 16:33:58 +09:00
Dean Herbert
ebce39cd1c Add test coverage of failing sample bank transfer 2023-05-16 18:52:52 +09:00
Dean Herbert
8528fcaedc Rename editor sample adjustment test scene to increase scope of tests 2023-05-16 18:52:52 +09:00
Dean Herbert
83dcd78826 Make HitSampleInfo.Bank non-nullable 2023-05-16 18:12:56 +09:00
Bartłomiej Dach
a99bf0fc5a
Add test coverage 2023-05-14 12:29:24 +02:00
Bartłomiej Dach
9a327d95b8
Add test coverage 2023-05-14 11:24:24 +02:00
Dean Herbert
9160711470 Change "Show main page" test steps to actually load the main page 2023-05-08 15:32:00 +09:00
Dean Herbert
f002038137 Add test coverage of failing wiki return to page scenario 2023-05-08 15:29:05 +09:00
Bartłomiej Dach
8514b2758a
Fix rapid back button test failure 2023-05-07 21:07:38 +02:00
Bartłomiej Dach
65b4b198a4
Merge branch 'master' into export 2023-05-06 20:12:53 +02:00
Bartłomiej Dach
80ac8abaa6
Merge branch 'master' into chat-report 2023-05-06 15:30:44 +02:00
Bartłomiej Dach
fba3c587cf
Add test coverage for info message failing to display 2023-05-06 15:26:29 +02:00