-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
AtataSessionDeInitEvent
to AtataSessionDeInitStartedEvent
- Loading branch information
1 parent
0b5a50d
commit 357b9e1
Showing
6 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Atata/Events/AtataSessionDeInitEvent.cs → .../Events/AtataSessionDeInitStartedEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Atata/NUnit/EventHandlers/TakePageSnapshotOnNUnitErrorEventHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
namespace Atata; | ||
|
||
public sealed class TakePageSnapshotOnNUnitErrorEventHandler : IConditionalEventHandler<AtataSessionDeInitEvent> | ||
public sealed class TakePageSnapshotOnNUnitErrorEventHandler : IConditionalEventHandler<AtataSessionDeInitStartedEvent> | ||
{ | ||
private readonly string _snapshotTitle; | ||
|
||
public TakePageSnapshotOnNUnitErrorEventHandler(string snapshotTitle = "Failed") => | ||
_snapshotTitle = snapshotTitle; | ||
|
||
public bool CanHandle(AtataSessionDeInitEvent eventData, AtataContext context) => | ||
public bool CanHandle(AtataSessionDeInitStartedEvent eventData, AtataContext context) => | ||
NUnitAdapter.IsCurrentTestFailed() && eventData.Session.IsActive; | ||
|
||
public void Handle(AtataSessionDeInitEvent eventData, AtataContext context) => | ||
public void Handle(AtataSessionDeInitStartedEvent eventData, AtataContext context) => | ||
(eventData.Session as WebSession)?.TakePageSnapshot(_snapshotTitle); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters