1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 14:07:24 +08:00
Commit Graph

5090 Commits

Author SHA1 Message Date
Dean Herbert
b4c75ba3c6 Fix TestQuickDeleteRemovesObject failing on second run 2021-04-12 19:19:25 +09:00
ekrctb
359fae895f Rename property 2021-04-12 18:50:25 +09:00
ekrctb
3c28c09ab5 Add more FramedReplayInputHandler tests 2021-04-12 16:18:35 +09:00
ekrctb
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
Dean Herbert
9be3163592 Merge branch 'master' into multiplayer-spectator-player-grid 2021-04-12 14:14:13 +09:00
smoogipoo
4fcddfb44b Fix multiplayer test failure 2021-04-12 13:42:14 +09:00
ekrctb
d6d8ea5b6b Throw when getting a frame of an empty replay 2021-04-12 11:17:56 +09:00
Salman Ahmed
cb947a3b27 Add expected output in test case rather than determining internally 2021-04-11 13:18:25 -04:00
Salman Ahmed
1fd4cb8963
Merge branch 'master' into master 2021-04-11 10:19:16 +03:00
Christine Chen
08311abc5e Remove setters, cache CreatePowerStatus() and use a dummy LocalPowerStatus class in test scene 2021-04-10 00:00:21 -04:00
Dan Balasescu
9aa30fb323
Merge pull request #11688 from Syriiin/diffcalc/dynamic-history
Implement dynamic previous hitobject retention for Skill class
2021-04-10 01:25:07 +09:00
smoogipoo
e73f3f52d7 Add some more asserts 2021-04-09 18:23:41 +09:00
smoogipoo
9ddcd686ac Fix incorrect assert 2021-04-09 18:23:38 +09:00
smoogipoo
b49997f531 Add test for no frames 2021-04-09 18:18:23 +09:00
smoogipoo
589ce4bdc2 Add test 2021-04-09 18:16:10 +09:00
Christine Chen
59d13b0dd3 Fixed indentation
sorry about the style fixes... I'm using JetBrains Rider from now on.
2021-04-08 21:53:42 -04:00
Christine Chen
6b6a71d3c3 trim whitespace 2021-04-08 20:39:17 -04:00
Christine Chen
493c095535 Fixed code style 2021-04-08 20:28:23 -04:00
Christine Chen
6bccb3aab6 Use DI to implement battery detection, add BatteryCutoff property
- Removed the Xamarin.Essentials package from osu.Game and added it to osu.iOS and osu.Android only.
- iOS and Android implementations use Xamarin.Essentials.Battery, while the Desktop implementation
only returns 100% battery for now.
- Added a BatteryCutoff property to PowerStatus so it can be different for each platform (default 20%, 25% on iOS)
2021-04-08 19:55:11 -04:00
smoogipoo
70cd018a98 Fix intermittent test failure 2021-04-08 21:38:58 +09:00
Dean Herbert
1e23f671fa
Merge pull request #12321 from smoogipoo/add-spectate-button-and-state
Add multiplayer spectating user state and button
2021-04-08 19:48:58 +09:00
smoogipoo
b38d332268 Fix broken test 2021-04-08 16:31:39 +09:00
Dean Herbert
545156d15c Add regression test coverage 2021-04-08 15:20:53 +09:00
Dean Herbert
8aff53172d Remove necessity for nested PassThroughInputManger 2021-04-08 15:18:31 +09:00
Christine Chen
0a6baf670e Send a warning notification if device is unplugged and low battery
- Uses Xamarin.Essentials in osu.Game.PlayerLoader to check battery level
- Encapsulated battery checking in the public BatteryManager class so battery level and plugged in status can be accessed and edited in TestPlayerLoader
- When checking battery level, catch NotImplementedException thrown by Xamarin.Essentials.Battery on non-mobile platforms
- Added visual unit tests for battery notification
  To mock battery status and level, we had to define a batteryManager object in TestPlayerLoader and add a new function ResetPlayerWithBattery()

Co-Authored-By: Marlina José <marlina@umich.edu>
2021-04-07 15:56:50 -04:00
smoogipoo
024adb699c Add test and fix several issues 2021-04-08 00:12:21 +09:00
smoogipoo
214813154b Fix class name 2021-04-07 22:28:22 +09:00
smoogipoo
99bee73ac1 Merge branch 'master' into add-spectate-button-and-state 2021-04-07 22:07:52 +09:00
Dan Balasescu
6eb809f4c4
Merge pull request #9194 from boswelja/rebind-song-select
Allow rebinding Song Select mods/random/options keys
2021-04-07 20:55:45 +09:00
smoogipoo
93c5935ebc Add match subscreen support + test 2021-04-07 20:46:30 +09:00
Dean Herbert
b4c6894d13 Add test coverage for song select footer area 2021-04-07 18:29:31 +09:00
smoogipoo
abd637ffaa Add button to footer 2021-04-07 17:35:18 +09:00
smoogipoo
56c13148f1 Fix typo in class name 2021-04-07 16:45:10 +09:00
smoogipoo
c744f77cfa Add participant panel state 2021-04-07 16:40:24 +09:00
smoogipoo
f5667125a0 Remove unnecessary method 2021-04-07 16:37:43 +09:00
smoogipoo
6be9c9f0f4 Link up ready button to spectate state 2021-04-07 16:35:50 +09:00
smoogipoo
1f57b6884d Add ready button to test scene 2021-04-07 16:30:40 +09:00
smoogipoo
6de91d7b6b Add spectate button + test 2021-04-06 21:37:27 +09:00
Leon Gebler
dd902441b0 Add tests for consecutive perfect-curve segments 2021-04-06 13:32:17 +02:00
Dan Balasescu
ba3689b5b9
Merge pull request #12269 from PercyDan54/beatmap-details
Use OnlineViewContainer for BeatmapDetails
2021-04-06 17:52:32 +09:00
Dan Balasescu
2321101518
Merge branch 'master' into fix-overzealousmouse-button-blocking 2021-04-06 16:45:25 +09:00
Dean Herbert
53c1bc666c Make addition of nested GlobalActionContainer in OsuGameTestScene optional 2021-04-06 15:18:00 +09:00
smoogipoo
9c1320e18b Add test 2021-04-06 14:34:26 +09:00
Dean Herbert
784552022f
Merge pull request #12303 from smoogipoo/fix-last-control-point-segmenting
Make last control point not able to make an implicit segment
2021-04-06 13:35:55 +09:00
Samuel Cattini-Schultz
4f614a703e Merge branch 'master' into diffcalc/dynamic-history 2021-04-06 11:34:33 +10:00
Dean Herbert
e486e521ff Fix regressed test 2021-04-05 22:46:01 +09:00
Dean Herbert
beebdb0734 Clean up implementation 2021-04-05 22:30:51 +09:00
smoogipoo
a3faf0a28e Increment start time 2021-04-05 18:07:07 +09:00
smoogipoo
42e816fcae Add failing tests 2021-04-05 17:48:29 +09:00
smoogipoo
3acc612a67 Adjust scoring values to better fit osu!mania 2021-04-05 13:28:46 +09:00
Bartłomiej Dach
b66ba43bc5 Add failing test scene 2021-04-03 14:02:46 +02:00
Bartłomiej Dach
7d4b0e3f0a Fix editor clock scene not re-enabling beatmap
Could interfere with other tests due to causing crashes on attempts to
change `Beatmap.Value`.
2021-04-03 12:34:48 +02:00
Samuel Cattini-Schultz
fe66b84bed Implement dynamic previous hitobject retention for Skill class
There is no reason we should be limiting skills to knowing only the previous 2 objects. This originally existed as an angle implementation detail of the original pp+ codebase which made its way here, but didn't get used in the same way.
2021-04-03 20:28:51 +11:00
Dean Herbert
67f0c0ceb9
Merge branch 'master' into spectator-refactor 2021-04-03 12:55:11 +09:00
PercyDan54
1ff77754fd
Use OnlineViewContainer 2021-04-02 20:14:31 +08:00
dependabot-preview[bot]
6a286c5e21
Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 16.9.1 to 16.9.4.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v16.9.1...v16.9.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-01 17:16:02 +00:00
smoogipoo
c3c7c18549 Fix tests 2021-04-01 23:48:26 +09:00
smoogipoo
9e95441aa6 Rename Spectator -> SoloSpectator 2021-04-01 22:08:52 +09:00
Dean Herbert
0c53b4eb93 Fix wrong counting and add test 2021-03-31 14:09:39 +09:00
Dean Herbert
8dfff999f9 Add rotation slider 2021-03-30 12:40:50 +09:00
smoogipoo
804ffe9f48 Fix inspections 2021-03-30 09:00:09 +09:00
Bartłomiej Dach
e9289853fc
Merge branch 'master' into fix-accuracy-formatting 2021-03-26 21:24:04 +01:00
Dean Herbert
4909eaf890 Add the ability to specify format provider (to make tests culture invariant) 2021-03-26 13:10:11 +09:00
Dean Herbert
6a7f926168 Change rounding to use a more general flooring approach 2021-03-26 13:10:11 +09:00
Max Hübner
558f8fa51e Adjust testscene 2021-03-25 23:20:26 +01:00
Dean Herbert
544117a494 Add test coverage of accuracy formatting function 2021-03-25 17:37:03 +09:00
Dean Herbert
e0b12abcc1
Merge pull request #12173 from frenzibyte/osk-ignore-case 2021-03-25 14:58:09 +09:00
Salman Ahmed
35810bb2fb Add test coverage 2021-03-24 22:55:15 +03:00
Dean Herbert
6cb14e91c9 Make Player abstract and introduce SoloPlayer 2021-03-23 18:18:49 +09:00
Dean Herbert
aeff9bd853 Add return bool to HandleRequest to better trigger failures 2021-03-23 18:17:29 +09:00
Bartłomiej Dach
a16c0641b2 Revert EF Core to version 2.2
This reverts commit f3faad74d5, reversing
changes made to 712e7bc7bf.

Several issues arose after migrating to 5.0, including, but possibly not
limited to, performance regressions in song select, as well as failures
when attempting to save beatmaps after metadata changes in the editor.
2021-03-21 11:05:15 +01:00
Dean Herbert
b9b351311a
Merge pull request #11824 from peppy/fix-unsafe-skinnable-sample-play
Fix playing skinned samples being unsafe during skin changes
2021-03-20 11:29:34 +09:00
Bartłomiej Dach
8e0536e1e2 Add failing test scene 2021-03-19 22:44:33 +01:00
Dean Herbert
f59327cc3e Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-03-19 20:29:44 +09:00
Dean Herbert
196f95ae54 Update to use new bindables and centered area offset 2021-03-19 19:01:32 +09:00
Dean Herbert
9a6a0f3df5 Add test coverage and better UI handling of no tablet connected scenario 2021-03-19 19:01:32 +09:00
Dean Herbert
a8e319a320 Remove min/max from test scene to fix weirdness when switching test sizings 2021-03-19 19:01:31 +09:00
Dean Herbert
382109c7a2 Make test scene feel more like settings (width-wise) 2021-03-19 19:01:31 +09:00
Dean Herbert
464702182d Consume device name 2021-03-19 19:01:31 +09:00
Dean Herbert
3b7edf1333 Make tablet display always fit to size of settings area 2021-03-19 19:01:31 +09:00
Dean Herbert
d026c8da85 Initial pass of configuration interface 2021-03-19 19:01:31 +09:00
Dean Herbert
1c865682ae Add tablet configuration tests 2021-03-19 18:57:49 +09:00
Dean Herbert
711d895a04
Merge pull request #8238 from voidedWarranties/editor-song-end 2021-03-19 16:32:23 +09:00
Bartłomiej Dach
aec859b4d1 Merge branch 'master' into fix-unsafe-skinnable-sample-play 2021-03-18 19:51:46 +01:00
Dan Balasescu
d9ec3c327e
Merge branch 'master' into input-handler-configuration 2021-03-18 22:17:48 +09:00
Dean Herbert
bb3c3f302a Fix skin parser not stripping whitespace before parsing 2021-03-18 15:36:11 +09:00
voidedWarranties
df6570ebf5 Improve logic and add previously failing test
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2021-03-17 15:48:55 -07:00
Bartłomiej Dach
21e18c9f6e Fix test hangs in browser due to changing tracks via music controller 2021-03-17 18:46:22 +01:00
Bartłomiej Dach
3b55eeb416 Fix test failure by setting beatmap
Post-merge, it was failing because somewhere along the way
`EditorClockTestScene` started expecting inheritors to set the beatmap
themselves explicitly in BDL.
2021-03-17 18:39:48 +01:00
Bartłomiej Dach
f1e66cc420 Adjust test namespace 2021-03-17 18:37:11 +01:00
Bartłomiej Dach
a691291ae8 Merge branch 'master' into editor-song-end 2021-03-17 18:18:19 +01:00
smoogipoo
e59b8b4ce6 Fix test checking nullable string 2021-03-17 19:07:29 +09:00
smoogipoo
f7ec79c5f4 Fix incorrect generic type 2021-03-17 19:02:25 +09:00
Dean Herbert
4bf57ad860 Remove remaining reference to obsolete value 2021-03-17 18:24:24 +09:00
smoogipoo
7fa5fd5647 Update usages of config with framework changes 2021-03-17 16:10:16 +09:00
Dean Herbert
f3faad74d5
Merge pull request #12003 from UselessToucan/ef_core_5 2021-03-15 15:05:32 +09:00
Dean Herbert
fce21f23d6 Add comments marking workarounds required for EFcore 5 2021-03-15 13:29:26 +09:00
Dean Herbert
1573298e68 Update remaining package references to point to efcore5 2021-03-15 13:12:10 +09:00
Joehu
d0644221ff Add test showing toolbar behavior change 2021-03-12 15:48:49 -08:00
Roman Kapustin
c6c616f244 Actualize tests 2021-03-11 21:02:40 +03:00