Skip to content

Commit

Permalink
#818 Update default page snapshot file name template
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed Feb 7, 2024
1 parent 3fb14ee commit 3849c9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public PageSnapshotsAtataContextBuilder UseStrategy(IPageSnapshotStrategy strate

/// <summary>
/// Sets the file name template of page snapshots.
/// The default value is <c>"{snapshot-number:D2}{snapshot-pageobjectname: - *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}"</c>.
/// The default value is <c>"{snapshot-number:D2}{snapshot-pageobjectname: *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}"</c>.
/// </summary>
/// <param name="fileNameTemplate">The file name template.</param>
/// <returns>The <see cref="PageSnapshotsAtataContextBuilder"/> instance.</returns>
Expand Down
4 changes: 2 additions & 2 deletions src/Atata/Context/PageSnapshots/PageSnapshotsConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ public sealed class PageSnapshotsConfiguration : ICloneable
/// <summary>
/// Gets or sets the page snapshot file name template.
/// The file name is relative to Artifacts path.
/// The default value is <c>"{snapshot-number:D2}{snapshot-pageobjectname: - *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}"</c>.
/// The default value is <c>"{snapshot-number:D2}{snapshot-pageobjectname: *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}"</c>.
/// </summary>
public string FileNameTemplate { get; set; } =
"{snapshot-number:D2}{snapshot-pageobjectname: - *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}";
"{snapshot-number:D2}{snapshot-pageobjectname: *}{snapshot-pageobjecttypename: *}{snapshot-title: - *}";

/// <inheritdoc cref="Clone"/>
object ICloneable.Clone() => Clone();
Expand Down
10 changes: 5 additions & 5 deletions test/Atata.IntegrationTests/ReportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ public void PageSnapshot()
VerifyLastLogMessagesMatch(
minLogLevel: LogLevel.Trace,
"^> Take page snapshot #01$",
"^< Take page snapshot #01 \\(.*\\) >> \"01 - Test page.mhtml\"$",
"^> Take page snapshot #02 - sometitle$",
"^< Take page snapshot #02 - sometitle \\(.*\\) >> \"02 - Test page - sometitle.mhtml\"$");
"^< Take page snapshot #01 \\(.*\\) >> \"01 Test page.mhtml\"$",
"^> Take page snapshot #02 sometitle$",
"^< Take page snapshot #02 sometitle \\(.*\\) >> \"02 Test page - sometitle.mhtml\"$");

AtataContext.Current.Artifacts.Should.ContainFiles(
"01 - Test page.mhtml",
"02 - Test page - sometitle.mhtml");
"01 Test page.mhtml",
"02 Test page - sometitle.mhtml");
}

[Test]
Expand Down

0 comments on commit 3849c9a

Please sign in to comment.