Skip to content

Commit

Permalink
Patrol log reset counter (#2399)
Browse files Browse the repository at this point in the history
* Reset step counter

* Prepare changelog

---------

Co-authored-by: piotruela <[email protected]>
  • Loading branch information
piotruela and piotruela authored Nov 8, 2024
1 parent cfb6391 commit e4a4870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/patrol_log/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.1+1

- Reset step counter in develop.

## 0.0.1

- Initial release as a standalone package.
8 changes: 4 additions & 4 deletions packages/patrol_log/lib/src/patrol_log_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ class PatrolLogReader {

// Print the test entry to the console.
log(entry.pretty());

// Reset the counters needed for clearing the lines.
stepsCounter = 0;
logsCounter = 0;
case TestEntry():
// Close the single test entry for the test that is finished.
_singleEntries.last.closeTest(entry);
Expand All @@ -175,10 +179,6 @@ class PatrolLogReader {
final executionTime = _singleEntries.last.executionTime.inSeconds;
// Print test entry summary to console.
log('${entry.pretty()} ${AnsiCodes.gray}(${executionTime}s)${AnsiCodes.reset}');

// Reset the counters needed for clearing the lines.
stepsCounter = 0;
logsCounter = 0;
case StepEntry():
_singleEntries.last.addEntry(entry);
if (!hideTestSteps) {
Expand Down
2 changes: 1 addition & 1 deletion packages/patrol_log/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: patrol_log
description: >
Log package for Patrol, a powerful Flutter-native UI testing framework.
version: 0.0.1
version: 0.0.1+1
homepage: https://patrol.leancode.co
repository: https://github.com/leancodepl/patrol/tree/master/packages/patrol_log
issue_tracker: https://github.com/leancodepl/patrol/issues
Expand Down

0 comments on commit e4a4870

Please sign in to comment.