1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Fix activation not firing with refactors

This commit is contained in:
Dean Herbert 2022-09-12 15:04:30 +09:00
parent 60b0b909a5
commit 9b31aa6d7a
2 changed files with 10 additions and 3 deletions

View File

@ -155,7 +155,11 @@ namespace osu.Game.Tests.Visual.UserInterface
checkProgressingCount(1); checkProgressingCount(1);
waitForCompletion(); waitForCompletion();
AddStep("click notification", () => notificationOverlay.ChildrenOfType<Notification>().Single().TriggerClick());
UpdateManager.UpdateApplicationCompleteNotification? completionNotification = null;
AddUntilStep("wait for completion notification",
() => (completionNotification = notificationOverlay.ChildrenOfType<UpdateManager.UpdateApplicationCompleteNotification>().SingleOrDefault()) != null);
AddStep("click notification", () => completionNotification?.TriggerClick());
AddUntilStep("wait for update applied", () => applyUpdate); AddUntilStep("wait for update applied", () => applyUpdate);
} }

View File

@ -110,7 +110,7 @@ namespace osu.Game.Updater
} }
} }
protected class UpdateApplicationCompleteNotification : ProgressCompletionNotification public class UpdateApplicationCompleteNotification : ProgressCompletionNotification
{ {
public UpdateApplicationCompleteNotification() public UpdateApplicationCompleteNotification()
{ {
@ -120,7 +120,10 @@ namespace osu.Game.Updater
public class UpdateProgressNotification : ProgressNotification public class UpdateProgressNotification : ProgressNotification
{ {
protected override Notification CreateCompletionNotification() => new UpdateApplicationCompleteNotification(); protected override Notification CreateCompletionNotification() => new UpdateApplicationCompleteNotification
{
Activated = CompletionClickAction
};
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()