summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-02-29 10:42:04 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2020-03-06 02:44:53 -0500
commitd2c70dbd9cf102c96ae5c2cc655945f326cf2a6b (patch)
tree19fa340fae5ecd6c63da71314cdbb7209ad59ae5
parent112101e0e0394e425047211c558317b1d1224d2b (diff)
add cucumber tests for downloads page
-rw-r--r--config/initializers/constants.rb26
-rw-r--r--features/downloads/downloads_index.feature77
-rw-r--r--features/downloads/downloads_select.feature886
-rw-r--r--features/step_definitions/common_steps.rb65
-rw-r--r--features/step_definitions/downloads_steps.rb35
-rw-r--r--features/support/debug.rb5
-rw-r--r--features/support/downloads.rb14
7 files changed, 1095 insertions, 13 deletions
diff --git a/config/initializers/constants.rb b/config/initializers/constants.rb
index 2f4b8c301..7ff5d73f6 100644
--- a/config/initializers/constants.rb
+++ b/config/initializers/constants.rb
@@ -19,6 +19,16 @@ IMAGE_OPTIONS =
]
} ,
{
+ :id => :init ,
+ :prompt => 'Init-System' ,
+ :default => 'systemd' ,
+ :options =>
+ [
+ { :id => 'openrc' , :label => 'OpenRC' , :desc => "non-systemd init-system" } ,
+ { :id => 'systemd' , :label => 'SystemD' , :desc => "standard Arch init-system" }
+ ]
+ } ,
+ {
:id => :wmde ,
:prompt => 'Graphical Environment' ,
:default => 'lxde' ,
@@ -30,19 +40,9 @@ IMAGE_OPTIONS =
]
} ,
{
- :id => :init ,
- :prompt => 'Init-System' ,
- :default => 'systemd' ,
- :options =>
- [
- { :id => 'openrc' , :label => 'OpenRC' , :desc => "non-systemd init-system" } ,
- { :id => 'systemd' , :label => 'SystemD' , :desc => "standard Arch init-system" }
- ]
- } ,
- {
- :id => :install ,
- :prompt => 'Install' ,
- :default => 'complete' ,
+ :id => :install ,
+ :prompt => 'Install' ,
+ :default => 'netinstall' ,
:options =>
[
{ :id => 'complete' , :label => 'Complete' , :desc => "fast install, online or offline" } ,
diff --git a/features/downloads/downloads_index.feature b/features/downloads/downloads_index.feature
new file mode 100644
index 000000000..319a00ce3
--- /dev/null
+++ b/features/downloads/downloads_index.feature
@@ -0,0 +1,77 @@
+Feature: Downloads Page
+ # NOTE: there is no Downloads model
+ # NOTE: ensure that the folling directories exist on the test system:
+ # * /srv/repo/main/iso/armv7h-systemd-cli-NNNN.NN
+ # * /srv/repo/main/iso/{dual,i686,x86_64}-{systemd,openrc}-{cli,lxde}-NNNN.NN
+ # where each N is a digit [0-9]
+
+ Background:
+
+
+ Scenario: Direct downloads
+ # valid armv7h requests
+ When I visit the downloads URL with query params: "armv7h" , "" , "" , ""
+ Then I should download the "armv7h-systemd-cli tarball" image
+ When I visit the downloads URL with query params: "armv7h" , "ignored" , "ignored" , "ignored"
+ Then I should download the "armv7h-systemd-cli tarball" image
+ When I visit the downloads URL with query params: "armv7h" , "systemd" , "cli" , "complete"
+ Then I should download the "armv7h-systemd-cli tarball" image
+ When I visit the downloads URL with query params: "armv7h" , "openrc" , "lxde" , "netinstall"
+ Then I should download the "armv7h-systemd-cli tarball" image
+ # invalid requests
+ When I visit the downloads URL with query params: "i686" , "" , "" , ""
+ Then I should be on the 'index' 'Downloads' page
+ When I visit the downloads URL with query params: "x86_64" , "" , "" , ""
+ Then I should be on the 'index' 'Downloads' page
+ When I visit the downloads URL with query params: "invalid" , "systemd" , "cli" , "complete"
+ Then I should be on the 'index' 'Downloads' page
+ When I visit the downloads URL with query params: "i686" , "invalid" , "cli" , "complete"
+ Then I should be on the 'index' 'Downloads' page
+ When I visit the downloads URL with query params: "i686" , "systemd" , "invalid" , "complete"
+ Then I should be on the 'index' 'Downloads' page
+ When I visit the downloads URL with query params: "i686" , "systemd" , "cli" , "invalid"
+ Then I should be on the 'index' 'Downloads' page
+ # valid i686 requests
+ When I visit the downloads URL with query params: "i686" , "openrc" , "cli" , "complete"
+ Then I should download the "i686-openrc-cli complete" image
+ When I visit the downloads URL with query params: "i686" , "openrc" , "cli" , "netinstall"
+ Then I should download the "i686-openrc-cli netinstall" image
+ When I visit the downloads URL with query params: "i686" , "openrc" , "lxde" , "complete"
+ Then I should download the "i686-openrc-lxde complete" image
+ When I visit the downloads URL with query params: "i686" , "openrc" , "lxde" , "netinstall"
+ Then I should download the "i686-openrc-lxde netinstall" image
+ When I visit the downloads URL with query params: "i686" , "systemd" , "cli" , "complete"
+ Then I should download the "i686-systemd-cli complete" image
+ When I visit the downloads URL with query params: "i686" , "systemd" , "cli" , "netinstall"
+ Then I should download the "i686-systemd-cli netinstall" image
+ When I visit the downloads URL with query params: "i686" , "systemd" , "lxde" , "complete"
+ Then I should download the "i686-systemd-lxde complete" image
+ When I visit the downloads URL with query params: "i686" , "systemd" , "lxde" , "netinstall"
+ Then I should download the "i686-systemd-lxde netinstall" image
+ # valid x86_64 requests
+ When I visit the downloads URL with query params: "x86_64" , "openrc" , "cli" , "complete"
+ Then I should download the "x86_64-openrc-cli complete" image
+ When I visit the downloads URL with query params: "x86_64" , "openrc" , "cli" , "netinstall"
+ Then I should download the "x86_64-openrc-cli netinstall" image
+ When I visit the downloads URL with query params: "x86_64" , "openrc" , "lxde" , "complete"
+ Then I should download the "x86_64-openrc-lxde complete" image
+ When I visit the downloads URL with query params: "x86_64" , "openrc" , "lxde" , "netinstall"
+ Then I should download the "x86_64-openrc-lxde netinstall" image
+ When I visit the downloads URL with query params: "x86_64" , "systemd" , "cli" , "complete"
+ Then I should download the "x86_64-systemd-cli complete" image
+ When I visit the downloads URL with query params: "x86_64" , "systemd" , "cli" , "netinstall"
+ Then I should download the "x86_64-systemd-cli netinstall" image
+ When I visit the downloads URL with query params: "x86_64" , "systemd" , "lxde" , "complete"
+ Then I should download the "x86_64-systemd-lxde complete" image
+ When I visit the downloads URL with query params: "x86_64" , "systemd" , "lxde" , "netinstall"
+ Then I should download the "x86_64-systemd-lxde netinstall" image
+
+
+ Scenario: Downloads view
+ Given I am on the 'index' 'Downloads' page
+ Then I should see "Parabola GNU/Linux-libre Release Images and Installers"
+ And I should see "Migrating to Parabola from an existing Pacman-based Distro"
+ And I should see "Download Parabola"
+ And I should see "HTTP(S) Mirrors"
+ And I should see "Qemu Images"
+ And I should see "Preview/Experimental Images"
diff --git a/features/downloads/downloads_select.feature b/features/downloads/downloads_select.feature
new file mode 100644
index 000000000..790da1cde
--- /dev/null
+++ b/features/downloads/downloads_select.feature
@@ -0,0 +1,886 @@
+Feature: Downloads Selection Page
+ # NOTE: there is no Downloads model - this file was generated by 'prepare_test_data.sh'
+
+ Background:
+
+ Scenario: Select armv7h-systemd-cli tarball download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'armv7h' switch
+ And I press the 'Accept' button
+ Then I should download the "armv7h-systemd-cli tarball" image
+
+ Scenario: Select i686-openrc-cli complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "i686-openrc-cli complete" image
+
+ Scenario: Select i686-openrc-cli netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "i686-openrc-cli netinstall" image
+
+ Scenario: Select i686-openrc-lxde complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "i686-openrc-lxde complete" image
+
+ Scenario: Select i686-openrc-lxde netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "i686-openrc-lxde netinstall" image
+
+ Scenario: Select i686-systemd-cli complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "i686-systemd-cli complete" image
+
+ Scenario: Select i686-systemd-cli netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "i686-systemd-cli netinstall" image
+
+ Scenario: Select i686-systemd-lxde complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "i686-systemd-lxde complete" image
+
+ Scenario: Select i686-systemd-lxde netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'i686' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "i686-systemd-lxde netinstall" image
+
+ Scenario: Select x86_64-openrc-cli complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-openrc-cli complete" image
+
+ Scenario: Select x86_64-openrc-cli netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-openrc-cli netinstall" image
+
+ Scenario: Select x86_64-openrc-lxde complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-openrc-lxde complete" image
+
+ Scenario: Select x86_64-openrc-lxde netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'OpenRC' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-openrc-lxde netinstall" image
+
+ Scenario: Select x86_64-systemd-cli complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-systemd-cli complete" image
+
+ Scenario: Select x86_64-systemd-cli netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'CLI' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-systemd-cli netinstall" image
+
+ Scenario: Select x86_64-systemd-lxde complete download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'Complete' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-systemd-lxde complete" image
+
+ Scenario: Select x86_64-systemd-lxde netinstall download
+ # step 1
+ Given I am on the 'select' 'Downloads' page
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Architecture"
+ And I should see "armv7h"
+ And I should see "i686"
+ And I should see "x86_64"
+ But I should not see "Download"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 2
+ When I press the 'x86_64' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Init-System"
+ And I should see "OpenRC"
+ And I should see "SystemD"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Install"
+ # step 3
+ When I press the 'SystemD' switch
+ And I press the 'Accept' button
+ Then I should see "Back"
+ And I should see "Accept"
+ And I should see "Graphical Environment"
+ And I should see "CLI"
+ And I should see "LXDE"
+ But I should not see "Download"
+ And I should not see "Architecture"
+ And I should not see "Init-System"
+ And I should not see "Install"
+ # step 4
+ When I press the 'LXDE' switch
+ And I press the 'Accept' button
+ Then I should see "Download"
+ And I should see "Install"
+ And I should see "Complete"
+ And I should see "NetInstall"
+ But I should not see "Back"
+ And I should not see "Accept"
+ And I should not see "Architecture"
+ And I should not see "Graphical Environment"
+ And I should not see "Init-System"
+ # done
+ When I press the 'NetInstall' switch
+ And I press the 'Download' button
+ Then I should download the "x86_64-systemd-lxde netinstall" image
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
new file mode 100644
index 000000000..0adee2dcb
--- /dev/null
+++ b/features/step_definitions/common_steps.rb
@@ -0,0 +1,65 @@
+## Givens ##
+
+Given /^I am on the '(.*)' '(.*)' page$/ do | action , model |
+dbg "/I am on the '#{action}' '#{model}' page/"
+
+ routes = case model
+ when 'Issue' ; spam_filter_routes ;
+ when 'Message' ; spam_filter_routes ;
+ when 'Downloads' ; downloads_routes ;
+ end
+
+ visit routes[action][model][:in ]
+ @expected_route = routes[action][model][:out]
+end
+
+When /^I press the '(.*)' button$/ do | button_text |
+dbg "/I press the '#{button_text}' button/ (on #{current_path})"
+
+ begin
+ (expect page).to have_button button_text
+ click_button button_text
+ rescue ActionController::RoutingError => ex
+ end
+end
+
+When /^I press the '(.*)' switch$/ do | radio_label |
+dbg "/I press the '#{radio_label}' switch/ (on #{current_path})"
+
+ choose "#{radio_label}"
+end
+
+When /^I click ".*"$/ do | link_text |
+dbg "/I click \"#{link_text}\"/ (on #{current_path})" ; dbg_validate_form_access ;
+
+ begin
+ (expect page).to have_content link_text
+ (first :css , 'a' , :text => link_text).click
+ rescue ActionController::RoutingError => ex
+ end
+end
+
+
+## Thens ##
+
+Then /^I should see "(.*)"$/ do | text |
+dbg_current_path
+
+ (expect page).to have_content text
+end
+
+Then /^I should not see "(.*)"$/ do | text |
+ (expect page).not_to have_content text
+end
+
+Then /^I should be on the '(.*)' '(.*)' page$/ do | action , model |
+dbg "/I should be on the '#{action}' '#{model}' page/"
+
+ routes = case model
+ when 'Issue' ; spam_filter_routes ;
+ when 'Message' ; spam_filter_routes ;
+ when 'Downloads' ; downloads_routes ;
+ end
+
+ (expect current_path).to eq routes[action][model][:in ]
+end
diff --git a/features/step_definitions/downloads_steps.rb b/features/step_definitions/downloads_steps.rb
new file mode 100644
index 000000000..7555391c9
--- /dev/null
+++ b/features/step_definitions/downloads_steps.rb
@@ -0,0 +1,35 @@
+include DownloadsStepsHarness
+
+
+## setup/teardown ##
+
+World(DownloadsStepsHarness)
+
+
+## Givens ##
+
+## Whens ##
+
+When /^I visit the downloads URL with query params: "(.*)" , "(.*)" , "(.*)" , "(.*)"$/ do | arch , init , wmde , install |
+dbg "I visit the downloads URL with query params: ... arch=" + arch # + " init=" + init + " wmde=" + wmde + " install=" + install
+
+ begin
+ visit "/downloads?arch=#{arch}&init=#{init}&wmde=#{wmde}&install=#{install}"
+ (expect current_path).to eq '/downloads'
+ rescue ActionController::RoutingError => ex
+dbg "rescue current_path=#{current_path}" ; dbg "rescue ex=#{ex.message}" ;
+
+ (expect current_path).to match /^\/iso\/.*/
+ end
+end
+
+
+## Thens ##
+
+Then /^I should download the "(.*)-(.*)-(.*) (.*)" image$/ do | arch , init , wmde , install |
+dbg "I should download the ... current_path=#{current_path}"
+
+ url = /\/iso\/#{arch}-#{init}-#{wmde}-[0-9]{4}\.[0-9]{2}\/parabola-#{arch}-#{init}-#{wmde}-[0-9]{4}\.[0-9]{2}-#{install}\..*/
+
+ (expect current_path).to match url
+end
diff --git a/features/support/debug.rb b/features/support/debug.rb
new file mode 100644
index 000000000..e5dda6225
--- /dev/null
+++ b/features/support/debug.rb
@@ -0,0 +1,5 @@
+DEBUG_CUC = false
+DEBUG_CUC_SETUP = false
+
+def dbg msg ; p "[#{(caller[0].gsub /.*\// , '').gsub /:in.*/ , ''}]: #{msg}" if DEBUG_CUC ; end ;
+def dbg_current_path ; dbg "current_path=#{current_path}" ; end # dbg page.body ; dbg current_path ; end ;
diff --git a/features/support/downloads.rb b/features/support/downloads.rb
new file mode 100644
index 000000000..1e525c09d
--- /dev/null
+++ b/features/support/downloads.rb
@@ -0,0 +1,14 @@
+module DownloadsStepsHarness
+
+## routes ##
+
+ def downloads_routes
+ {
+ 'index' => { 'Downloads' => { :in => "/downloads" ,
+ :out => 'downloads::index' } } ,
+ 'select' => { 'Downloads' => { :in => "/downloads/select?nojs=true" ,
+ :out => 'downloads::select' } }
+ }
+ end
+
+end