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

22 Commits

Author SHA1 Message Date
Bartłomiej Dach
e45d456324
Fix TestFriendScore intermittently failing due to randomness
If `createRandomScore()` happened to randomly pick the highest total
score when called with `friend` as the sole argument, that particular
score would not be pink.

`GetScoreByUsername()` would arbitrarily pick the first score for the
user, so in this particular case where a friend had the number 1 score,
the test would wrongly fail.

Fix by checking whether any of the 3 added friend scores have received
the pink colour. Because there is more than 1 friend score in the test,
doing so ensures that at least one of those should eventually become
pink (because, obviously, you can't have two scores at number 1).
2023-09-21 21:12:44 +02:00
Bartłomiej Dach
9301a1907a
Rewrite TestFriendScore assertions to constraint model
Allows to clearly see what the failure is:

	TearDown : System.TimeoutException : "friend score is pink" timed out: Expected: some item equal to "#FF549A"
	  But was:  < "#FFFFFF", "#7FCC33", "#444444" >

The #7FCC33 colour is used for the first score on the leaderboard.
2023-09-21 21:05:41 +02:00
Dean Herbert
87ec33bb66 Tidy up test 2023-09-07 14:50:22 +09:00
cdwcgt
68752f95e5
color friend score to pink 2023-09-06 22:58:03 +09:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
maromalo
b7ef9b176d Make score type consistent 2022-11-06 19:59:27 -03:00
Dean Herbert
8edb1cb98a Add test coverage of current score staying on screen 2022-09-28 15:57:50 +09:00
Dean Herbert
5cc2721e9a Add failing test showing layout failure in gameplay leaderboard 2022-09-21 14:42:02 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
Dean Herbert
e84224f64c Rename AddPlayer method now that there's no conflict 2021-08-12 16:20:37 +09:00
Dean Herbert
68dbbc17e8 Add support for automatic scrolling in gameplay leaderboard 2021-08-12 16:20:37 +09:00
Dean Herbert
f4591b01d7 Add test step to show leaderboard in expanded state by default 2021-08-12 15:21:00 +09:00
Dean Herbert
92d74a9343 Fix potential nullref in test scene 2020-12-28 20:48:14 +09:00
Dean Herbert
d0e8347968 Change asserts into until steps 2020-12-24 22:28:25 +09:00
Salman Ahmed
228acf25a7 Add test case creating leaderboard scores with existing users 2020-12-18 13:13:31 +03:00
Dean Herbert
668536ce56 Fix vertical size potentially changing during relayout 2020-12-18 17:25:48 +09:00
Dean Herbert
bca4d83af7 Revert previous player add flow via interface 2020-12-18 17:19:55 +09:00
Dean Herbert
ceb2e4762d Add test covering a more consistent spread of player scores 2020-12-18 16:20:42 +09:00
Salman Ahmed
a8abefcd66 Make GameplayLeaderboardScore a model class 2020-12-18 03:34:33 +03:00
Salman Ahmed
0faf3fdfd3 Update gameplay leaderboard scores with the new design 2020-12-17 15:19:10 +03:00
Dean Herbert
b5ab400ad7 Fix test filename not matching updated class name 2020-12-15 15:44:43 +09:00