Skip to content

Commit f016c7b

Browse files
committed
Make hint about cloning example repo more prominent
Related issue: https://progress.opensuse.org/issues/184459 I tried to create an example test in the webui, but the existing hint did not make clear to me that it would do something, I just thought it would be a link to the example distribution repo.
1 parent 87a4d34 commit f016c7b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/OpenQA/WebAPI/Controller/Test.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ sub _load_scenario_definitions ($self, $preset) {
139139
catch ($e) {
140140
return $self->stash(flash_error => "Unable to read scenario definitions for the specified preset: $e")
141141
unless $e =~ /no.*file/i;
142-
my $info = Mojo::ByteStream->new(
143-
qq(You first need to <a href="#" onclick="cloneTests(this)">clone the $distri test distribution</a>.));
142+
my $info
143+
= Mojo::ByteStream->new(
144+
qq(You first need to clone the <a href="https://github.com/os-autoinst/os-autoinst-distri-$distri">$distri</a> test distribution to automatically fill out the fields: <a href="#" class="btn btn-primary" onclick="cloneTests(this)">Clone</a>)
145+
);
144146
return $self->stash(flash_info => $info);
145147
}
146148
my $defs;

t/ui/29-create_tests.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ subtest 'preset information can be loaded from INI file, note about non-existing
7777
unlike $flash_messages, qr/does not exist/i, 'preset defined in INI file is available';
7878

7979
like $flash_messages,
80-
qr|You first need to clone the does-not-exist test distribution|i,
80+
qr|You first need to clone the .*does-not-exist.* test distribution|i,
8181
'note about cloning test distribution shown';
8282

83-
$driver->find_element_by_link_text('clone the does-not-exist test distribution')->click;
83+
$driver->find_element_by_link_text('Clone')->click;
8484
my $error_message = wait_for_element selector => '#flash-messages .alert-danger', description => 'error message';
8585
like $error_message->get_text, qr/No Minion worker available/i, 'expected error shown';
8686
};

0 commit comments

Comments
 (0)