Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ozzie.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class Ozzie {

String get _groupFolderName => '$rootFolderName/$groupName';

String get _timestamp => DateTime.now().toIso8601String();
String get _timestamp =>
DateTime.now().toIso8601String().replaceAll(':', '.');

String _fileName(String screenshotName) => '$_timestamp-$screenshotName.png';

Expand Down
10 changes: 10 additions & 0 deletions test/ozzie_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ void main() {
expect(true, resultFile.path.contains('rim.png'));
});

test('takeScreenshot generates PNGs don`t contains character ":" on name',
() async {
await ozzie.takeScreenshot('character');
final files =
Directory('$rootFolderName/$testGroupName').listSync().toList();
final resultFile =
files.where((f) => f is File).map((f) => f as File).first;
expect(false, resultFile.path.contains(':'));
});

group('HTML report generation', () {
test('not calling generateHtmlReport does not create index.html',
() async {
Expand Down