From de62099aa502c0615b915bf3f65770697aa2c93a Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Fri, 13 May 2016 09:08:44 +0200 Subject: lvc: provide a common parent for branching snapshots --- cucumber/features/step_definitions/common_steps.rb | 4 +++- cucumber/features/step_definitions/snapshots.rb | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'cucumber') diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb index ed896d3a..5463a0a3 100644 --- a/cucumber/features/step_definitions/common_steps.rb +++ b/cucumber/features/step_definitions/common_steps.rb @@ -263,12 +263,14 @@ When /^I destroy the computer$/ do $vm.destroy_and_undefine end -Given /^I boot the computer, and select ([a-z]*) mode$/ do |ui_mode| +Given /^I boot to the d-i splash screen$/ do boot_timeout = 30 @screen.wait("d-i8_bootsplash.png", boot_timeout) +end +Given /^I select ([a-z]*) mode and wait for the remote shell$/ do |ui_mode| if "gui" == ui_mode @screen.type(Sikuli::Key.DOWN) @screen.wait("d-i_bootmenu_graphical.png", 10) diff --git a/cucumber/features/step_definitions/snapshots.rb b/cucumber/features/step_definitions/snapshots.rb index 1eb9fb84..452f0598 100644 --- a/cucumber/features/step_definitions/snapshots.rb +++ b/cucumber/features/step_definitions/snapshots.rb @@ -1,13 +1,21 @@ def checkpoints { - 'boot-d-i-to-tasksel' => { + 'boot-d-i' => { :description => "I have started Debian Installer and stopped at the Tasksel prompt", :parent_checkpoint => nil, :steps => [ 'I create a 8 GiB disk named "target"', 'I plug ide drive "target"', 'I start the computer', - 'I boot the computer, and select text mode', + 'I boot to the d-i splash screen', + ], + }, + + 'boot-d-i-to-tasksel' => { + :description => "I have started Debian Installer and stopped at the Tasksel prompt", + :parent_checkpoint => 'boot-d-i', + :steps => [ + 'I select text mode and wait for the remote shell', 'in text mode I select British English', 'in text mode I accept the hostname, using "example.com" as the domain', 'in text mode I set the root password to "rootme"', @@ -22,12 +30,9 @@ def checkpoints 'boot-g-i-to-tasksel' => { :description => "I have started GUI Debian Installer and stopped at the Tasksel prompt", - :parent_checkpoint => nil, + :parent_checkpoint => 'boot-d-i', :steps => [ - 'I create a 8 GiB disk named "target"', - 'I plug ide drive "target"', - 'I start the computer', - 'I boot the computer, and select gui mode', + 'I select gui mode and wait for the remote shell', 'in gui mode I select British English', 'in gui mode I accept the hostname, using "example.com" as the domain', 'in gui mode I set the root password to "rootme"', -- cgit v1.2.3-70-g09d2