Skip to content

Commit

Permalink
Rename PageObjectDeInitEvent to PageObjectDeInitCompletedEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed Jan 16, 2025
1 parent cf60120 commit 4ffa52a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/Atata/Components/PageObject`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,12 @@ public TOwner ScrollDown()
void IPageObject.DeInit()
{
ExecuteTriggers(TriggerEvents.DeInit);

#pragma warning disable CS0618 // Type or member is obsolete
Session.EventBus.Publish(new PageObjectDeInitEvent(this));
#pragma warning restore CS0618 // Type or member is obsolete

Session.EventBus.Publish(new PageObjectDeInitCompletedEvent(this));
}

protected override string BuildComponentProviderName() => null;
Expand Down
17 changes: 17 additions & 0 deletions src/Atata/Events/PageObjectDeInitCompletedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable

namespace Atata;

/// <summary>
/// Represents an event that occurs when <see cref="PageObject{TOwner}"/> is deinitialized.
/// </summary>
public sealed class PageObjectDeInitCompletedEvent
{
public PageObjectDeInitCompletedEvent(UIComponent pageObject) =>
PageObject = pageObject;

/// <summary>
/// Gets the page object.
/// </summary>
public UIComponent PageObject { get; }
}
4 changes: 1 addition & 3 deletions src/Atata/Events/PageObjectDeInitEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Atata;

/// <summary>
/// Represents an event that occurs when <see cref="PageObject{TOwner}"/> is deinitialized.
/// </summary>
[Obsolete("Use PageObjectDeInitCompletedEvent instead.")] // Obsolete since v4.0.0.
public sealed class PageObjectDeInitEvent
{
public PageObjectDeInitEvent(UIComponent pageObject) =>
Expand Down

0 comments on commit 4ffa52a

Please sign in to comment.