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

2399 Commits

Author SHA1 Message Date
Bartłomiej Dach
661dfbefaf Change containment check to overlap
Due to scenarios wherein a formatted link ended up as part of a larger
raw link after parsing, change the containment check to an overlap check
and add appropriate tests for these edge cases.
2019-10-25 00:42:58 +02:00
Bartłomiej Dach
cbd99cc767 Resolve link-in-link edge case
Testing with #6542 surfaced a crash scenario, caused by formatted links
that had URLs in the display text, for example

    [mean example - https://osu.ppy.sh](https://osu.ppy.sh)

In that case the outer Markdown link would get picked up once, and then
reduced to the link text when looking for other links, leading to it
being picked up again the second time when the raw link is found.

Add a check in the raw link parsing path that ensures that the found
URL is not a part of a bigger, pre-existing link.
2019-10-24 15:52:55 +02:00
Bartłomiej Dach
a89ea78a7a Add extended testing for Markdown links
While reviewing #6542 it became apparent that there was another Markdown
link format variant, used in comments that came from the web API, called
the "inline link" style. It allows to specify the tooltip title within
the actual URL portion, as such:

    [link text](https://osu.ppy.sh "tooltip text")

Add tests with a couple of easy and trickier examples of such a format.
Moreover, add a new edge case of a Markdown link with a link inside
the display text, which during tests was detected to be problematic.
2019-10-24 15:52:55 +02:00
smoogipoo
d83b9ef0e4 Rename grid snapping methods 2019-10-24 18:18:04 +09:00
Dean Herbert
40c202c394
Merge branch 'master' into comments-vote-pill 2019-10-23 15:41:54 +09:00
Dean Herbert
6866d27634 Merge remote-tracking branch 'upstream/master' into editor-timing-screen 2019-10-23 11:18:42 +09:00
Dean Herbert
25601ac17c Merge branch 'master' into editor-timing-screen 2019-10-22 18:01:53 +09:00
Andrei Zavatski
a3ab6d33c1 Add test 2019-10-22 01:37:30 +03:00
Dean Herbert
0fbba9a5e5 Split out more classes 2019-10-20 23:42:13 +09:00
Dean Herbert
7dc65ec964 Add missing required types 2019-10-20 23:32:49 +09:00
Salman Ahmed
eed6f708a2
Merge branch 'master' into beatmap-overlay-ruleset-selector 2019-10-19 04:06:43 +03:00
Andrei Zavatski
266f9a065f Merge remote-tracking branch 'refs/remotes/ppy/master' into comments-vote-pill 2019-10-18 19:25:05 +03:00
smoogipoo
89f50b26f7 Fix hitobject combo colour potentially not getting adjusted 2019-10-18 17:32:11 +09:00
Dean Herbert
f22ec6f5bd Merge branch 'master' into editor-timing-screen 2019-10-18 16:57:46 +09:00
Dean Herbert
99ea45da41
Merge pull request #6474 from smoogipoo/osu-beatsnapping-grid
Implement osu!'s beat snapping grid
2019-10-18 16:27:03 +09:00
Andrei Zavatski
a437ff74cc Move VotePill to it's own file 2019-10-17 14:18:31 +03:00
Dan Balasescu
bd57c0b58e
Merge branch 'master' into fix-incorrect-beatmap-set-info-equality 2019-10-17 19:51:03 +09:00
Dean Herbert
f92331531c Rename grid to DistanceSnap to be more in line with its purpose 2019-10-17 15:32:02 +09:00
Dean Herbert
3a6a25ffe8
Merge branch 'master' into non-static-rulesetstore 2019-10-17 14:25:06 +09:00
iiSaLMaN
40fc655b50 Add equality check test to ensure correct values 2019-10-17 01:19:50 +03:00
smoogipoo
12cd57744b Make RulestStore initialise at construction time 2019-10-15 16:14:06 +09:00
Andrei Zavatski
42a06a54ff Don't use ProfileShowMoreButton in the test scene to avoid confusion 2019-10-15 01:08:23 +03:00
Andrei Zavatski
09621f066e Childs -> Children 2019-10-15 00:32:21 +03:00
Andrei Zavatski
7cd3f5656d Cleanups 2019-10-14 16:43:43 +03:00
Andrei Zavatski
7ac87494e0 Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-14 16:21:34 +03:00
Dean Herbert
89f270a19a SortSelector -> SortTabControl 2019-10-14 21:32:41 +09:00
Dean Herbert
ae1a361f9f
Merge branch 'master' into commenst_header 2019-10-14 21:20:05 +09:00
Andrei Zavatski
2f209d1dfa Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-13 14:53:41 +03:00
Andrei Zavatski
a44cc2e70b Implement CommentsShowMoreButton 2019-10-13 14:43:30 +03:00
Andrei Zavatski
27e3ffd293 Update dependencies 2019-10-13 11:23:49 +03:00
Andrei Zavatski
7f867562ca Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-13 11:15:43 +03:00
Dean Herbert
00f0957cc3
Merge branch 'master' into editor-grids-2 2019-10-12 23:28:51 +09:00
Andrei Zavatski
7ffe5ac539 Merge remote-tracking branch 'refs/remotes/ppy/master' into commenst_header 2019-10-12 15:02:12 +03:00
Dan Balasescu
26a33bfa4e
Merge branch 'master' into fix-resume-from-player-audio 2019-10-11 19:21:14 +09:00
smoogipoo
631f155554 Add grid to make the test not appear empty 2019-10-11 18:24:33 +09:00
smoogipoo
050d86a741 Always use the local coordinate space 2019-10-11 18:24:33 +09:00
smoogipoo
9ecec806c2 Rename grid creation method + parameter 2019-10-11 18:24:33 +09:00
smoogipoo
5f0cd356d7 Rename startPosition to centrePosition 2019-10-11 18:24:33 +09:00
smoogipoo
824595427d Remove extra whitespace 2019-10-11 18:24:33 +09:00
smoogipoo
2aa3d0bb39 Implement base class for beat snapping grids 2019-10-11 18:24:33 +09:00
Dean Herbert
937dbb7bf6 Initial layout for timing screen 2019-10-11 16:22:24 +09:00
Dean Herbert
c7eb0b401b
Merge branch 'master' into ignore-macosx-folder-in-archives 2019-10-11 14:36:52 +09:00
Dean Herbert
f6e1e5b2ed
Merge branch 'master' into fix-line-buffered-reader-tests 2019-10-11 12:42:58 +09:00
Bartłomiej Dach
11acd177f1 Add import test with files to be filtered out
Add a test case reproducing the conditions encountered "in the wild"
wherein a skin import would be performed incorrectly due to a __MACOSX
resource fork directory present next to a directory with the actual skin
files in the archive.
2019-10-10 23:54:17 +02:00
Bartłomiej Dach
c8ffc134d4 Use nameof when instantiating headless game hosts
As a purely cosmetic code improvement, substitute string literals
in constructor calls of HeadlessGameHost in ImportBeatmapTest for nameof
operator usages.
2019-10-10 22:36:43 +02:00
Bartłomiej Dach
cb1f7e2dc7 Fix platform dependency in buffered reader test
Tests for the line-buffered reader added in 7b1ff38 were subtly
dependent on the execution environment due to differing end-of-line
markers on Windows and Unix-based systems.

Because StreamReader discards all newlines when reading line-by-line,
LineBufferedReader used a StringBuilder to patch the peeked lines
back together with the remaining contents of the file being read.
As StringBuilder.AppendLine uses the environment-specific newline
delimiter, the delimiters after the peeked-but-unconsumed lines can
therefore be substituted by the platform-specific variants, causing
the test failures due to the overly-simplified way they were written.

Reformulate the test to avoid such issues from resurfacing again
by splitting lines by \r or \n and then testing each line individually.
Additionally remove all raw literals in favour of explicitly mixing
various line delimiter character sequences for additional coverage.
2019-10-10 15:33:18 +02:00
Dean Herbert
8255a94cd4
Merge branch 'master' into fix-resume-from-player-audio 2019-10-10 22:08:20 +09:00
Andrei Zavatski
b45e7246b8 Rename SortCommentsBy to CommentsSortCriteria 2019-10-10 15:56:08 +03:00
Dean Herbert
5eba33e876 Simplify logic and add test coverage for remaining case 2019-10-10 20:12:47 +09:00
Andrei Zavatski
64f62bd2bf Implement CommentsHeader component 2019-10-10 12:06:25 +03:00
Dean Herbert
5d6648d9c9 Update 2.2 references 2019-10-10 17:45:38 +09:00
Dean Herbert
8df2e359c4 Fix tests on CI 2019-10-10 17:42:15 +09:00
Andrei Zavatski
371b7841d0 Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-10 11:27:44 +03:00
Dean Herbert
f74c79c2b8 Fix audio playback position being reset after resuming to song select 2019-10-10 11:58:43 +09:00
Andrei Zavatski
107d39c3e9 Add DeletedChildsPlaceholder to the bottom of the comments container 2019-10-09 14:10:05 +03:00
Andrei Zavatski
7e3c97f496 Implement DeletedChildsPlaceholder component 2019-10-09 13:37:07 +03:00
Andrei Zavatski
0a56b041fd Implement ShowChildsButton 2019-10-09 11:07:56 +03:00
Dean Herbert
f2adae8fd1 Rename test case to better match underlying class 2019-10-09 16:05:38 +09:00
Andrei Zavatski
6deafc04bf Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-09 10:00:20 +03:00
Dan Balasescu
69b9e359bf
Merge branch 'master' into fix-ss-track-playback 2019-10-09 12:26:07 +09:00
Dan Balasescu
e8276dc562
Merge branch 'master' into fix-ignored-test 2019-10-09 11:39:40 +09:00
Andrei Zavatski
29b0eacc82 Implement SortSelector component 2019-10-08 22:46:42 +03:00
Andrei Zavatski
574170124c Implement HeaderButton component 2019-10-08 21:38:19 +03:00
Andrei Zavatski
b9ad079bf8 Move CommentsHeader to it's own file 2019-10-08 20:57:55 +03:00
Andrei Zavatski
1c89841949 Move all the logic to it's own namespace 2019-10-08 14:51:12 +03:00
Andrei Zavatski
275648ee4f Merge remote-tracking branch 'refs/remotes/ppy/master' into comments_api 2019-10-08 13:31:52 +03:00
Dean Herbert
4446a2972c Move WaveContainer test out of editor namespace 2019-10-08 18:08:05 +09:00
Dean Herbert
8ebccfe31f Add comprehensive audio state tests 2019-10-08 17:03:13 +09:00
Dean Herbert
f284d096b7 Fix ignored song select test 2019-10-08 16:37:47 +09:00
Andrei Zavatski
aa8df0fa20 Hook up api and implement some visual comments representation 2019-10-07 18:26:07 +03:00
Andrei Zavatski
e772822bd5 Basic implementation 2019-10-07 17:49:20 +03:00
Dean Herbert
46d6c5ec3b Add failing test 2019-10-07 15:17:03 +09:00
Dean Herbert
62c4c1266e Move private functions to bottom 2019-10-07 15:17:03 +09:00
Dean Herbert
93c0cf14c1
Merge branch 'master' into allow-fallback-decoder-overwrite 2019-10-05 10:56:57 +08:00
Joehu
de658c932e Fix test regression 2019-10-04 17:22:42 -07:00
Bartłomiej Dach
76c74719a4 Add test for fallback decoder overwrite
LegacyDifficultyCalculatorBeatmapDecoder was registered as a fallback
decoder in commit ffde389 for future use in the server-side difficulty
calculation components. Due to the pre-existing fallback registrations
this causes a runtime crash when the diffcalc components are started.
Add a test reproducing this scenario to prevent the issue from
resurfacing in the future.
2019-10-04 17:00:51 +02:00
iiSaLMaN
4f40a04425 Add tests ensuring correct behaviour with ruleset selection 2019-10-04 17:57:39 +03:00
iiSaLMaN
edddbdb784 Add tests for beatmap ruleset selector 2019-10-04 17:37:09 +03:00
Dean Herbert
9eab56e2fc
Merge branch 'master' into editor-beatmap-changed-event 2019-10-04 17:58:58 +08:00
Dan Balasescu
457e0c4d7b
Merge pull request #6117 from bdach/beatmap-parsing-fallback-v2
Add fallback decoder option for badly-headered files
2019-10-04 15:03:10 +09:00
Dean Herbert
49fdb4b731
Fix Alt-F4 being blocked during gameplay (#6369)
Fix Alt-F4 being blocked during gameplay

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-10-04 13:33:00 +08:00
Dan Balasescu
2b61bb709e
Merge branch 'master' into beatmap-parsing-fallback-v2 2019-10-04 14:08:27 +09:00
Dean Herbert
f1772d01d2
Add the new switch button + labelled switch button (#6257)
Add the new switch button + labelled switch button

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-10-04 13:01:57 +08:00
Dan Balasescu
dc984d0d81
Merge branch 'master' into beatmap-parsing-fallback-v2 2019-10-04 13:51:56 +09:00
Dean Herbert
626f7388c8 Add tests for quick retry and quick exit scenarios 2019-10-04 12:23:01 +08:00
Dean Herbert
e646b2677c Add test coverage 2019-10-04 11:25:23 +08:00
Dean Herbert
a7b58cad99
Merge branch 'master' into labelled-switch-button 2019-10-04 11:15:54 +08:00
smoogipoo
a5e1cb8feb Merge remote-tracking branch 'Game4all/master' into truncate-metadata-on-wedge 2019-10-04 11:21:33 +09:00
Joseph Madamba
d87f6d270b
Merge branch 'master' into fix-alt-f4-being-blocked-by-overlays 2019-10-03 08:43:31 -07:00
Craftplacer
dbcb9e51c2
Merge branch 'master' into muted-notification 2019-10-03 12:51:22 +02:00
Dean Herbert
e9c73ce30f Fix random failures on BeatmapCarousel filter test
The "un-filter" step causes a `SelectNextRandom` invocation. If this happens to select a difficulty in set 3 other than the previously buffered difficulty #2, the subsequent test would fail.

I've split this test out to remove the random element, but added a new assert to ensure buffered (previously visited?) difficulty is re-selected on return to the same set.
2019-10-03 16:21:14 +08:00
Dean Herbert
6268bbcfc8
Merge branch 'master' into beatmap-parsing-fallback-v2 2019-10-03 15:12:21 +08:00
smoogipoo
3fb0b0b668 Rename to StartTimeChanged and add xmldocs 2019-10-03 14:37:16 +09:00
smoogipoo
f2719afd0e Add tests for Editorbeatmap 2019-10-03 14:27:40 +09:00
Joehu
ff56453f1a Fix test regressions 2019-10-02 12:07:07 -07:00
Craftplacer
4d4e846296
Merge branch 'master' into muted-notification 2019-10-02 17:31:34 +02:00
Craftplacer
5f399add82 Resolve @iiSaLMaN 's suggested changes 2019-10-01 18:15:40 +02:00
Craftplacer
4e394e0ed5
Merge branch 'master' into muted-notification 2019-10-01 17:26:11 +02:00
Ganendra Afrasya
208b9a4eba Add new virtual float for username to timestamp padding 2019-10-01 20:47:53 +07:00
Andrei Zavatski
f24ac04beb Add suggested blank line for consistency 2019-09-29 15:18:29 +03:00
Andrei Zavatski
97a0e0097f Add testing 2019-09-29 14:56:33 +03:00
Dean Herbert
193a9b0dd7
Merge branch 'master' into labelled-switch-button 2019-09-29 14:56:26 +08:00
Dean Herbert
539f3329ce Rename method to match new behaviour 2019-09-29 12:23:18 +08:00
Dean Herbert
02c1f490f1
Merge branch 'master' into muted-notification 2019-09-28 20:33:32 +08:00
Bartłomiej Dach
2487d4f0f2 Migrate beatmap carousel test to AddUntilStep
Due to non-deterministic test failures in TestSceneBeatmapCarousel,
migrate the checkSelected helper step from AddAssert to AddUntilStep.
This adds more leniency for performance-related issues while still
checking the desired behaviour.
2019-09-28 11:58:27 +02:00
Craftplacer
06c32d52dc Change wrong volume bindable used in test 2019-09-27 09:19:39 +02:00
Craftplacer
9a31ccd2e3 Add missing test cases for master, track and mute button
This also modifies the reset player method to make it possible to set something before the player is loaded but after the container has loaded.
2019-09-26 14:05:43 +02:00
Dean Herbert
e2744054c7
Merge branch 'master' into back-button-part-2 2019-09-25 22:46:08 +09:00
Dean Herbert
7d5544460b
Fix mania scrolling speed not including beatmap slider multipli… (#6236)
Fix mania scrolling speed not including beatmap slider multiplier

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-09-25 22:34:46 +09:00
Dean Herbert
8c01677e0b Merge remote-tracking branch 'upstream/master' into back-button-part-2 2019-09-25 22:12:00 +09:00
smoogipoo
244627ff10 Add comment + test for slider multiplier 2019-09-25 20:12:01 +09:00
smoogipoo
ccb5623487 Fix test name 2019-09-25 20:03:03 +09:00
Dean Herbert
f11156c2dc Fix tests not working correctly 2019-09-25 19:30:25 +09:00
smoogipoo
9f77a1ef35 Adjust namespaces 2019-09-25 17:53:08 +09:00
smoogipoo
d32a0acd10 Merge remote-tracking branch 'origin/master' into labelled-switch-button 2019-09-25 17:51:12 +09:00
smoogipoo
c9e39c124e Add a labelled switch button 2019-09-25 17:42:35 +09:00
smoogipoo
261ba5c80a Fix button not transforming correctly in some cases 2019-09-25 17:42:27 +09:00
Dean Herbert
8fd1a45a42 Change intro displayed for tests
As the triangles intro relies on the audio track's clock advancing, we can't use it just yet (CI server has no audio device). This is a temporary workaround for that shortcoming.
2019-09-25 15:29:02 +09:00
Dean Herbert
c83db94eb7 Use isolated storage/api 2019-09-25 15:00:08 +09:00
Dean Herbert
654b815b36 Merge remote-tracking branch 'upstream/master' into back-button-part-2 2019-09-25 14:38:39 +09:00
Dean Herbert
2089f6fc42 Fix potential test fail case 2019-09-25 14:28:35 +09:00
Joehu
102dbd85bd Fix CI errors 2019-09-24 16:48:22 -07:00
Joehu
cc6030ca14 Update beatmap info wedge tests 2019-09-24 16:23:36 -07:00
Joehu
8efba255c3 Add truncation test 2019-09-24 16:21:08 -07:00
Dean Herbert
4a59e3351e Update beatmap carousel tests code style
Also fixes one issue I spotted in BeatmapCarousel related to incorrectly holding a selection after new sets are loaded.
2019-09-25 02:42:12 +09:00
Dean Herbert
03ec0fb27d
Merge branch 'master' into fix-mania-scrolling-speed 2019-09-24 22:20:19 +09:00
Dean Herbert
4271b3bb50
Mark configuration lookup test headless (#6240)
Mark configuration lookup test headless
2019-09-24 19:50:19 +09:00
Dean Herbert
e78f134b90 Mark configuration lookup test headless 2019-09-24 19:35:42 +09:00
Dean Herbert
f493f1c71d Move new components to v2 namespace 2019-09-24 19:00:26 +09:00
smoogipoo
028c958431 Initial implementation of a switch button 2019-09-24 18:39:11 +09:00
smoogipoo
6b702eb6de Update with generic labelledcomponent 2019-09-24 18:25:17 +09:00
smoogipoo
5212c50654 Merge branch 'generic-labelledcomponent' into labelled-textbox-improvements 2019-09-24 18:23:01 +09:00
smoogipoo
df692b091c Make LabelledComponent generic 2019-09-24 18:22:02 +09:00
smoogipoo
4abe0473b9 Fix relative beat length not considering slider multiplier 2019-09-24 16:49:42 +09:00
Dean Herbert
9a6d748498
Merge branch 'master' into add-creator-artist-filters 2019-09-23 12:31:51 +09:00
Dean Herbert
d6ec6b1eda
Merge branch 'master' into labelled-textbox-improvements 2019-09-23 00:39:29 +09:00
Dean Herbert
9fe7675be8
Add a base class for all future labelled components (#6187)
Add a base class for all future labelled components
2019-09-23 00:38:51 +09:00
Bartłomiej Dach
70842f71f4 Fix floating point handling in filter intervals
Due to floating-point rounding and representation errors, filters could
wrongly display results incongruous with the wedge display text (ie.
a beatmap with the BPM of 139.99999 would be displayed as having 140
BPM and also pass the bpm<140 filter).

Apply tolerance when parsing floating-point constraints. The tolerance
chosen is half of what the UI displays for the particular values (so
for example half of 0.1 for AR/DR/CS, 0.01 for stars, etc.)

Tests updated accordingly.
2019-09-22 00:20:55 +02:00
Bartłomiej Dach
b262ba13cd Add creator= and artist= filters
To match stable, add creator= and artist= filters to the beatmap
carousel on song select screen. Contrary to stable, this implementation
supports phrase queries with spaces within using double quotes.

The quote handling is not entirely correct (can't nest), but quotes
should rarely happen within names, and it is an edge case of an edge
case - leaving best-effort as is. Test coverage also included.
2019-09-22 00:20:55 +02:00
Bartłomiej Dach
51509f6be0 Add filter steps to carousel visual test
Just a couple of steps for added coverage in visual tests. Very
on-the-surface, the unit tests are supposed to cover the gory details.
2019-09-22 00:20:54 +02:00
Bartłomiej Dach
41569fd2b6 Add filter evaluating unit tests
Introduce unit tests covering the actual evaluation of filters for
beatmaps. Partially covers most scenarios.
2019-09-22 00:20:54 +02:00
Bartłomiej Dach
d11d932a87 Add filter parsing tests
Introduce unit tests covering parsing for the originally introduced
filtering features. The introduced improvements (lower and upper
interval and decimal point support) also tested.
2019-09-22 00:20:54 +02:00
Dean Herbert
db90d211cb
Fix scores importing with deleted beatmap sets (#6190)
Fix scores importing with deleted beatmap sets
2019-09-22 01:15:22 +09:00
smoogipoo
08440ce5fd Adjust test to assert that the import failed 2019-09-22 00:59:40 +09:00
smoogipoo
24cc8ce0b7 Fix deleting null beatmap set 2019-09-22 00:59:01 +09:00
Dan Balasescu
73fe402756
Merge branch 'master' into fix-html-unescaping 2019-09-21 12:59:57 +09:00
Lucas A
bbf3ac77f8 Add visual test for HTML string unescaping. 2019-09-20 21:35:26 +02:00
smoogipoo
ff2f3cde02 Add test 2019-09-20 19:53:03 +09:00
smoogipoo
2bbf4ca4b5 Update LabelledTextBox to use LabelledComponent 2019-09-20 18:50:50 +09:00
smoogipoo
e0a97cfac5 Add a LabelledComponent base class 2019-09-20 18:35:15 +09:00