Skip to content

Commit

Permalink
Fixed the getting started link in the login welcome message. It now p…
Browse files Browse the repository at this point in the history
…oints to a valid url.
  • Loading branch information
bsutton committed Mar 25, 2024
1 parent 65bd0a5 commit 34ba23a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/commands/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:dcli_core/dcli_core.dart';
import 'package:dcli_terminal/dcli_terminal.dart';
import 'package:url_builder/url_builder.dart';

import '../api/api.dart';
import '../exceptions.dart';
Expand Down Expand Up @@ -108,14 +109,17 @@ void showWelcome(
firstMessage = '''
Welcome to OnePub.
Read the getting started guide at:
${orange('${OnePubSettings.use().onepubWebUrl}/getting-started')}
${blue(urlJoin(OnePubSettings.use().onepubWebUrl, 'Blog?id=zuhnoflygz'))}
The OnePub manual can be found at:
${blue('https://docs.onepub.dev')}
''';
}

print('''
${blue('Successfully logged into $organisationName as $operator.')}
${green('Successfully logged into $organisationName as $operator.')}
$firstMessage
''');
Expand Down
8 changes: 8 additions & 0 deletions test/src/commands/login_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import 'package:dcli_core/dcli_core.dart';
import 'package:onepub/src/commands/login.dart';
import 'package:onepub/src/entry_point.dart';
import 'package:onepub/src/my_runner.dart';
import 'package:onepub/src/onepub_settings.dart';
Expand All @@ -19,4 +20,11 @@ void main() {
}
// , tags: ['manual']
);

test('welcome', () {
showWelcome(
firstLogin: true,
organisationName: 'Test Org',
operator: 'Test Operator');
});
}

0 comments on commit 34ba23a

Please sign in to comment.