From 1730062d624168c489d946b61893799405696f7c Mon Sep 17 00:00:00 2001
From: John Sparger <john.sparger@ess.eu>
Date: Mon, 26 Apr 2021 20:45:31 +0200
Subject: [PATCH] added several feature files

---
 features/browse-iocs.feature  | 48 +++++++++++++++++++++++++++++++++++
 features/ioc-creation.feature | 27 ++++++++++++++++++++
 features/logout.feature       | 13 ++++++++++
 features/menu.feature         | 10 ++++++++
 features/navigation.feature   | 25 ++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 100644 features/browse-iocs.feature
 create mode 100644 features/ioc-creation.feature
 create mode 100644 features/logout.feature
 create mode 100644 features/menu.feature
 create mode 100644 features/navigation.feature

diff --git a/features/browse-iocs.feature b/features/browse-iocs.feature
new file mode 100644
index 00000000..8e21d84f
--- /dev/null
+++ b/features/browse-iocs.feature
@@ -0,0 +1,48 @@
+Feature: Browse IOCs
+
+  Scenario: User wants to browse IOCs
+    Given the user is logged in
+    When the user navigates to the IOCs page
+    Then they should be presented with a table of IOCs
+
+  Scenario: User wants to see all IOCs
+    Given the user is on the IOCs page
+    When the user opens the Explore IOCs tab
+    Then the table should display all IOCs in the facility
+    And recently updated IOCs should be at the top
+
+  Scenario: User wants to see relevant IOCs
+    Given the user is on the IOCs page
+    When the user clicks on the Your IOCs tab
+    Then the table should display only IOCs which the user can edit
+    And recently updated IOCs should be at the top
+
+  Scenario: User wants to navigate to a specific IOC
+    Given the user is on the IOCs page
+    When the user clicks (exactly) on the IOC name link
+    Then the user should be redirected to the IOC Details page.
+
+  Scenario: User wants to highlight copy values from table to clipboard
+    Given the user is on the IOCs page
+    When the user highlights content within the table
+    Then they shall not be redirected to the IOC Details page
+
+  Scenario: User wants to search for an IOC
+    Given the user is on the IOCs page
+    When the user types a query in the search bar
+    Then the IOCs table should be updated with the search results
+
+  Scenario: User wants to filter the IOCs
+    Given the user is on the IOCs page
+    When the user types a filter into the search bar
+    Then the IOCs in the table should be filtered based on the search results.
+
+  Scenario: User wants change the order the IOCs are displayed
+    Given the user is on the IOCs page
+    When the user clicks on a column header in the table
+    Then the IOC table rows should be sorted by the values of that column
+
+  Scenario: More IOCs than can be displayed
+    Given the user is on the IOCs page
+    When there are more IOCs matching the search query than can be displayed
+    Then a warning should be shown letting the user know that all IOCs are not rendered
diff --git a/features/ioc-creation.feature b/features/ioc-creation.feature
new file mode 100644
index 00000000..58f5bdbf
--- /dev/null
+++ b/features/ioc-creation.feature
@@ -0,0 +1,27 @@
+  Scenario: User opens IOC creation form
+    Given the user is on the IOCs page
+    When the user clicks the create IOC button
+    Then the user should be presented with a form to create an IOC
+
+  Scenario: User searches for host in IOC form
+    Given the user has opened the IOC form
+    When the user types into the target host field
+    Then an autocomplete box should prompt the user with possible matches
+  
+  Scenario: User searches for git repository in IOC form
+    Given the user has opened the IOC form
+    When the user types into the git repository field
+    Then an autocomplete box should prompt the user with possible matches
+
+  Scenario: User searches for git version in IOC form
+    Given the user has opended the IOC from
+    And populated the git repository field with a valid repository
+    When the user types into the git version field
+    Then an autocomplete box should prompt the user with possible matches 
+  
+  Scenario: User submits IOC creation form
+    Given the user has filled out the IOC creation form
+    And the information is valid
+    When the user clicks on the Create IOC button
+    Then A new IOC should be created
+    And the user should be redirected to the new IOC details page
\ No newline at end of file
diff --git a/features/logout.feature b/features/logout.feature
new file mode 100644
index 00000000..4ef2c352
--- /dev/null
+++ b/features/logout.feature
@@ -0,0 +1,13 @@
+Feature: Logging out
+
+  Scenario: The user clicks the logout button
+    Given the user is logged in
+    When the user clicks the logout button
+    Then they should be logged out from the application
+    And they should be redirected to the login page
+
+  Scenario: The user's session expires
+    Given the user is logged in
+    When the session time has elapsed
+    Then the user should be logged out from the application
+    And they should be redirected to the login page
\ No newline at end of file
diff --git a/features/menu.feature b/features/menu.feature
new file mode 100644
index 00000000..8700a895
--- /dev/null
+++ b/features/menu.feature
@@ -0,0 +1,10 @@
+Feature: Navigation menu
+  
+  Scenario: User opens the navigation menu
+    Given the user is logged in
+    When they click on the menu icon
+    Then they will see their user information
+    And a link to browse IOCs
+    And a link to browse hosts
+    And a link to browse deployments
+    And a link to logout of the application
\ No newline at end of file
diff --git a/features/navigation.feature b/features/navigation.feature
new file mode 100644
index 00000000..647101f8
--- /dev/null
+++ b/features/navigation.feature
@@ -0,0 +1,25 @@
+Feature: Intuitive Navigation
+
+  Scenario: User navigates between internal pages
+    Given the user has opened the application
+    When they click on an internal link
+    Then the selected content shall be loaded
+    And the application source shall not be reloaded
+
+  Scenario: User clicks on link to external page
+    Given the user has opened the application
+    When they click on a link to an external site
+    Then the content will open in a new tab or window
+
+  Scenario: User clicks the browser back button
+    Given the user has navigated within the application
+    When they click the browser's back button
+    Then they shall be taken to the previous internal page they visited
+    And the application source shall not be reloaded
+
+  Scenario: User clicks the browser refresh button
+    Given the user has opened the application
+    When they click the browser refresh button
+    Then the application source shall be reloaded
+    And the user will be returned to the same page
+
-- 
GitLab