From e103ee11dbcb31a7d451282bea42edb66f8eddba Mon Sep 17 00:00:00 2001 From: Itsik Kanias Date: Thu, 16 Jan 2025 17:33:46 +0200 Subject: [PATCH 1/3] Added test cases for exploring and configuring importers --- tests/features/.import-explorer.feature.swp | Bin 0 -> 16384 bytes tests/features/import-explorer.feature | 135 ++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 tests/features/.import-explorer.feature.swp create mode 100644 tests/features/import-explorer.feature diff --git a/tests/features/.import-explorer.feature.swp b/tests/features/.import-explorer.feature.swp new file mode 100644 index 0000000000000000000000000000000000000000..deda1b356b2d51212816246d64388900f8e14c68 GIT binary patch literal 16384 zcmeHOON<;x8Lk9KoHvSr0|BW3iFna^$8n?pKAA5(0!c0GB9IB1H)YI3NKB!jhk%=`R7+oG5q-;V?TZ1>TvR{tGAs0@-dcN5m_P({j%`SK*mao zg}1mLzv&0;4HMh5x-eG8Tan7F%=~pSNFreqm2Is)xv?d(cuUJvZi~#~AGtE+Q^{a@ zvPe!^X)L~Re-EUvg_fq5jB};!Nx74!N=v=sf7p9*-5nhR?_~xGJ2?5dd!Bgs^h3_n zKlRB^@Zx3`Xgj)9JWj)9JWj)9JWj)9JWj)4{fHouiUi|=mr-=FoLx3oUr z=dV}%=egGJ{<8b%80Z-280Z-280Z-280Z-280Z-280Z-280Z*y7cwAX#vZ}Co}q#t z@Bc&n|LT2={S0^n`1iex{R{X5@I&BH;5Oj-dl>sJFa$me90P6#-ng5wXMxkeL%Sng4BGHq$%%9o+(QoF^)Ij6a>dnhw>+5{S9$q z@>ERmTQWO@;kg(}_GB2kFc{WgoX8qCm&)k`1%KZK z=(aVHMKYz^{8TuTF-Y{-oy6c{X$(#HShDRm<7ONQQx1U@VszT19chUzDXb&G5WL7@ zEUhswW7j7nFky-)!i<9=O{X<2fv$=akxj=q;1O0F_&s`ZE`H@5A%?9&Bp?x63M$es ztW}xeYCu9N*P-_4aknX5lYA5|0QnRB`86qaJB`aPHa1zKQ z{S+Ffcr+5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@V>TfPFRdpvU%au_!D@J*s@ z`L=u$$~xzZY9@Ahqg7~kV7XPjx)%>a{2yJXjCFUcR@XDGIO48nz09dyz05CeT*f~y zuP-h0vVNMWoZ9WPRwZ>p?g*5Wp;STG`}3qQE%G%j zL!1p)b6$~E@~e!uUO{k@!8>{P(rReC&P>ao#{zce3i(d3?}T7OXe75@X i<;)w`c}9Bh*tp2N=xuJ$pmvybL5JSyR`wTkjQt-nxy_US literal 0 HcmV?d00001 diff --git a/tests/features/import-explorer.feature b/tests/features/import-explorer.feature new file mode 100644 index 0000000..b99408b --- /dev/null +++ b/tests/features/import-explorer.feature @@ -0,0 +1,135 @@ +Feature: Importer Explorer - View and configure importers on importers details page + Background: As a Devsecops I want to view and configure all of the Importers currently configured including default Importers + +#Scenario: The user can display importers page with all relevant field names +Given TPA 2.0 is installed successfully +When the user selects the importers menu option +Then importers page is displayed showing the fields Name, Type, Description, Source, Period and Status in a table +And there will be 3 dots (Hamburger icon) displayed for each importer + +#Scenario: The user can check pagination controls on importers page +Given TPA 2.0 is installed successfully +When the user selects the importers menu option +Then the importers page will be displayed with pagination controls with correct values +And it will be possible to move between pages accordingly +And it will be possible to add page numbers in the pagination text box and pressing Enter to move to the desired page + +#Scenario: The user can see that the search box appears in importers page +Given TPA 2.0 is installed successfully +When the user selects the importers menu option +Then there will be a search text box displayed + +#Scenario: The user can search a text in search text box +Given TPA 2.0 is installed successfully +When the user types a search string in the search text box and clicks the magnifying glass icon +Then only the related search results will be displayed in the importers page + +#Scenario: The user can search a text in search text box with pressing 'Enter' in the keyboard +Given TPA 2.0 is installed successfully +When the user types a search string in the search text box and presses Enter in the keyboard +Then only the related search results will be displayed in the importers page + +#Scenario: The user can expand an importer to see its logs +Given the importers option is selected on the left menu +When the user clicks on an importer row ‘>’ icon +Then the importer row will be expanded +And the following log fields will be displayed: ‘Start Date’, End Date’, Number of items’, ‘Error’ +And there will be pagination controls under the expanded importer row + +#Scenario: When the user clicks on the hamburger icon he can see the relevant options +Given the importers option is selected on the left menu +When the user clicks on the 3 dots icon +Then the following options will be displayed: Enable/Disable, Delete, Add/Create Importer and Edit + +#Scenario: The user is able to disable an enabled importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option Disable on an enabled importer +Then there will be a label of ‘Disabled’ displayed under the specific importer +And the specific importer will stop functioning and importing objects(SBOMs/CVEs/CSAF files) + +#scenario: The user is not able to disable an already disabled importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option Disable on a disabled importer +Then the ‘Disable’ option will be greyed out (disabled) +And it will not be possible to change the status to ‘Disabled’ + +#Scenario: The user is able to enable a disabled importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option Enable on a disabled importer +Then there will be a label of ‘Enabled’ displayed under the specific importer +And there will be a confirmation message about the importer being enabled +And the importer will start running and importing the objects(SBOMs/CVEs/CSAF files) + +#Scenario: The user is not able to enable an already enabled importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option Enable on an enabled importer +Then the ‘Enable’ option will be greyed out (disabled) +And it will not be possible to change the status to ‘Enabled' + +#Scenario: The user selects to delete an importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option ‘Delete’ on an importer +Then there will be a confirmation message for the deletion operation +And there will be buttons of ‘OK’ or ‘Cancel’ in the confirmation message + +#Scenario: The user deletes an existing importer +Given the user has clicked on the three dots icon under an importer +When the user selects the option ‘Delete’ on an importer and clicks ‘OK’ in the confirmation message +Then the importer will be deleted successfully and will not be displayed anymore in the importers page + +#Scenario: The user clicks on 'Delete' and then clicks 'Cancel' +Given the user has clicked on the three dots icon under an importer +When the user selects the option ‘Delete’ on an importer and clicks ‘Cancel’ in the confirmation message +Then the importer will be not be deleted and will still be displayed in the importers page +And it will be possible to click on the three dots icon and configure the importer + +#Scenario: The user clicks on 'Add/Create' an importer under the hamburger icon +Given the user has clicked on the three dots icon under an importer +When the user selects the option ‘Add/Create’ on an importer +Then there will be a pop up dialog window for adding a new importer +And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button +And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + +#Scenario: The user clicks on 'Create Importer' button on the importers main page +Given the user is in the importers main page +When the user has clicked on the ‘Create importer’ button on the importers page +Then there will be a pop up dialog window for adding a new importer +And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button +And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + + +#Scenario: The user tries to add a new importer without filling any field in the importer form +Given the user has selected to add a new importer +When the user leaves all the fields empty and clicks on ‘Create’ button +Then the ‘Create’ button will be disabled and the ‘Cancel’ button will be enabled +And it will not be possible to create a new importer + +#Scenario: The user adds a new importer +Given the user has selected to add a new importer +When the user fills all the mandatory fields and clicks the ‘Create’ button +Then the importer will be created successfully and displayed in the importers page +And all the parameters added to the importers will be displayed accordingly + +#Scenario: The user tries to add a new importer and clicks 'Cancel' +Given the user has selected to add a new importer +When the user fills all the mandatory fields and clicks the ‘Cancel’ button +Then the importer will not be created and will not be displayed in the importers page +And it will not be possible to find the importer while searching it in the importers page + +#Scenario: The user tries to edit an existing importer +Given the user has clicked on the three dots icon under an importer +When the user selects ‘Edit’ option on an existing importer +Then there will be a pop up dialog window for editing the selected importer +And there will be two buttons in the bottom of the pop up dialog window: ‘Save’ and ‘Cancel’ +And it will be possible to update all the fields in the importer dialog box + +#Scenario: The user is in editing mode of an importer but does not update anything +Given the user has selected to update an importer +When the user does not change anything in the dialog window +Then the ‘Save’ button will be disabled and the ‘Cancel’ button will be enabled + +#Scenario: The user updated an existing importer +Given the user has selected to update an importer +When the user does not change anything in the dialog window and clicks ‘Cancel’ +Then no changes will be done to the importer +And the importer will be displayed with the same data in the importers page \ No newline at end of file From 6291ca0661c5a3ae6d0be47bfd2b094bcbad2f6d Mon Sep 17 00:00:00 2001 From: Itsik Kanias Date: Sun, 19 Jan 2025 18:43:57 +0200 Subject: [PATCH 2/3] Updated file with fixes --- tests/features/import-explorer.feature | 269 +++++++++++++------------ 1 file changed, 135 insertions(+), 134 deletions(-) diff --git a/tests/features/import-explorer.feature b/tests/features/import-explorer.feature index b99408b..4b85cd6 100644 --- a/tests/features/import-explorer.feature +++ b/tests/features/import-explorer.feature @@ -1,135 +1,136 @@ Feature: Importer Explorer - View and configure importers on importers details page - Background: As a Devsecops I want to view and configure all of the Importers currently configured including default Importers - -#Scenario: The user can display importers page with all relevant field names -Given TPA 2.0 is installed successfully -When the user selects the importers menu option -Then importers page is displayed showing the fields Name, Type, Description, Source, Period and Status in a table -And there will be 3 dots (Hamburger icon) displayed for each importer - -#Scenario: The user can check pagination controls on importers page -Given TPA 2.0 is installed successfully -When the user selects the importers menu option -Then the importers page will be displayed with pagination controls with correct values -And it will be possible to move between pages accordingly -And it will be possible to add page numbers in the pagination text box and pressing Enter to move to the desired page - -#Scenario: The user can see that the search box appears in importers page -Given TPA 2.0 is installed successfully -When the user selects the importers menu option -Then there will be a search text box displayed - -#Scenario: The user can search a text in search text box -Given TPA 2.0 is installed successfully -When the user types a search string in the search text box and clicks the magnifying glass icon -Then only the related search results will be displayed in the importers page - -#Scenario: The user can search a text in search text box with pressing 'Enter' in the keyboard -Given TPA 2.0 is installed successfully -When the user types a search string in the search text box and presses Enter in the keyboard -Then only the related search results will be displayed in the importers page - -#Scenario: The user can expand an importer to see its logs -Given the importers option is selected on the left menu -When the user clicks on an importer row ‘>’ icon -Then the importer row will be expanded -And the following log fields will be displayed: ‘Start Date’, End Date’, Number of items’, ‘Error’ -And there will be pagination controls under the expanded importer row - -#Scenario: When the user clicks on the hamburger icon he can see the relevant options -Given the importers option is selected on the left menu -When the user clicks on the 3 dots icon -Then the following options will be displayed: Enable/Disable, Delete, Add/Create Importer and Edit - -#Scenario: The user is able to disable an enabled importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option Disable on an enabled importer -Then there will be a label of ‘Disabled’ displayed under the specific importer -And the specific importer will stop functioning and importing objects(SBOMs/CVEs/CSAF files) - -#scenario: The user is not able to disable an already disabled importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option Disable on a disabled importer -Then the ‘Disable’ option will be greyed out (disabled) -And it will not be possible to change the status to ‘Disabled’ - -#Scenario: The user is able to enable a disabled importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option Enable on a disabled importer -Then there will be a label of ‘Enabled’ displayed under the specific importer -And there will be a confirmation message about the importer being enabled -And the importer will start running and importing the objects(SBOMs/CVEs/CSAF files) - -#Scenario: The user is not able to enable an already enabled importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option Enable on an enabled importer -Then the ‘Enable’ option will be greyed out (disabled) -And it will not be possible to change the status to ‘Enabled' - -#Scenario: The user selects to delete an importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option ‘Delete’ on an importer -Then there will be a confirmation message for the deletion operation -And there will be buttons of ‘OK’ or ‘Cancel’ in the confirmation message - -#Scenario: The user deletes an existing importer -Given the user has clicked on the three dots icon under an importer -When the user selects the option ‘Delete’ on an importer and clicks ‘OK’ in the confirmation message -Then the importer will be deleted successfully and will not be displayed anymore in the importers page - -#Scenario: The user clicks on 'Delete' and then clicks 'Cancel' -Given the user has clicked on the three dots icon under an importer -When the user selects the option ‘Delete’ on an importer and clicks ‘Cancel’ in the confirmation message -Then the importer will be not be deleted and will still be displayed in the importers page -And it will be possible to click on the three dots icon and configure the importer - -#Scenario: The user clicks on 'Add/Create' an importer under the hamburger icon -Given the user has clicked on the three dots icon under an importer -When the user selects the option ‘Add/Create’ on an importer -Then there will be a pop up dialog window for adding a new importer -And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button -And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ - -#Scenario: The user clicks on 'Create Importer' button on the importers main page -Given the user is in the importers main page -When the user has clicked on the ‘Create importer’ button on the importers page -Then there will be a pop up dialog window for adding a new importer -And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button -And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ - - -#Scenario: The user tries to add a new importer without filling any field in the importer form -Given the user has selected to add a new importer -When the user leaves all the fields empty and clicks on ‘Create’ button -Then the ‘Create’ button will be disabled and the ‘Cancel’ button will be enabled -And it will not be possible to create a new importer - -#Scenario: The user adds a new importer -Given the user has selected to add a new importer -When the user fills all the mandatory fields and clicks the ‘Create’ button -Then the importer will be created successfully and displayed in the importers page -And all the parameters added to the importers will be displayed accordingly - -#Scenario: The user tries to add a new importer and clicks 'Cancel' -Given the user has selected to add a new importer -When the user fills all the mandatory fields and clicks the ‘Cancel’ button -Then the importer will not be created and will not be displayed in the importers page -And it will not be possible to find the importer while searching it in the importers page - -#Scenario: The user tries to edit an existing importer -Given the user has clicked on the three dots icon under an importer -When the user selects ‘Edit’ option on an existing importer -Then there will be a pop up dialog window for editing the selected importer -And there will be two buttons in the bottom of the pop up dialog window: ‘Save’ and ‘Cancel’ -And it will be possible to update all the fields in the importer dialog box - -#Scenario: The user is in editing mode of an importer but does not update anything -Given the user has selected to update an importer -When the user does not change anything in the dialog window -Then the ‘Save’ button will be disabled and the ‘Cancel’ button will be enabled - -#Scenario: The user updated an existing importer -Given the user has selected to update an importer -When the user does not change anything in the dialog window and clicks ‘Cancel’ -Then no changes will be done to the importer -And the importer will be displayed with the same data in the importers page \ No newline at end of file + Background: + Given: The user navigates to TPA URL and logs into the TPA application + +Scenario: The user navigates to Importers Explore page + Given the user navigates to TPA URL page successfully + When the user selects the importers menu option + Then application navigates to Importers page + And the column headers Name, Type, Description, Source, Period and Status should be visible + And And Call to Action button for each importer should be visible + +Scenario: The user can check pagination controls on importers page + Given the user navigates to TPA URL page successfully + When the user selects the importers page from left navigation menu option + Then the importers page will be displayed with pagination controls with correct values + And it will be possible to move between pages accordingly + And it will be possible to add page numbers in the pagination text box and pressing Enter to move to the desired page + +Scenario: The user can see that the search box appears in importers page + Given the user navigates to TPA URL page successfully + When the user selects the importers menu option + Then there will be a search text box displayed + +Scenario: The user can search a text in search text box + Given the user navigates to TPA URL page successfully + When the user types a search string in the search text box and clicks the magnifying glass icon + Then only the related search results will be displayed in the importers page + +Scenario: The user can search a text in search text box with pressing 'Enter' in the keyboard + Given the user navigates to TPA URL page successfully + When the user types a search string in the search text box and presses Enter in the keyboard + Then only the related search results will be displayed in the importers page + +Scenario: The user can expand an importer to see its logs + Given the importers option is selected on the left menu + When the user the user expands an importer row + Then the importer row will be expanded + And the following log fields will be displayed: ‘Start Date’, End Date’, Number of items’, ‘Error’ + And there will be pagination controls under the expanded importer row + +Scenario: When the user clicks on the Call to Action button he can see the relevant options + Given the importers option is selected on the left menu + When the user clicks on the Call to Action icon + Then the following options will be displayed: Enable/Disable, Delete, Add/Create Importer and Edit + +Scenario: The user is able to disable an enabled importer + Given the user has clicked on the Call to Action button under an importer + When the user selects the option Disable on an enabled importer + Then there will be a label of ‘Disabled’ displayed under the specific importer + And the specific importer will stop functioning and importing objects(SBOMs/CVEs/CSAF files) + +Scenario: The user is not able to disable an already disabled importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option Disable on a disabled importer + Then the ‘Disable’ option will be greyed out (disabled) + And it will not be possible to change the status to ‘Disabled’ + +Scenario: The user is able to enable a disabled importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option Enable on a disabled importer + Then there will be a label of ‘Enabled’ displayed under the specific importer + And there will be a confirmation message about the importer being enabled + And the importer will start running and importing the objects(SBOMs/CVEs/CSAF files) + +Scenario: The user is not able to enable an already enabled importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option Enable on an enabled importer + Then the ‘Enable’ option will be greyed out (disabled) + And it will not be possible to change the status to ‘Enabled' + +Scenario: The user selects to delete an importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option ‘Delete’ on an importer + Then there will be a confirmation message for the deletion operation + And there will be buttons of ‘OK’ or ‘Cancel’ in the confirmation message + +Scenario: The user deletes an existing importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option ‘Delete’ on an importer and clicks ‘OK’ in the confirmation message + Then the importer will be deleted successfully and will not be displayed anymore in the importers page + +Scenario: The user clicks on 'Delete' and then clicks 'Cancel' + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option ‘Delete’ on an importer and clicks ‘Cancel’ in the confirmation message + Then the importer will be not be deleted and will still be displayed in the importers page + And it will be possible to click on the three dots icon and configure the importer + +Scenario: The user clicks on 'Add/Create' an importer under the hamburger icon + Given the user has clicked on the Call to Action icon under an importer + When the user selects the option ‘Add/Create’ on an importer + Then there will be a pop up dialog window for adding a new importer + And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button + And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + +Scenario: The user clicks on 'Create Importer' button on the importers main page + Given the user is in the importers main page + When the user has clicked on the ‘Create importer’ button on the importers page + Then there will be a pop up dialog window for adding a new importer + And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button + And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + +Scenario: The user tries to add a new importer without filling any field in the importer form + Given the user has selected to add a new importer + When the user leaves all the fields empty and clicks on ‘Create’ button + Then the ‘Create’ button will be disabled and the ‘Cancel’ button will be enabled + And it will not be possible to create a new importer + +Scenario: The user adds a new importer + Given the user has selected to add a new importer + When the user fills all the mandatory fields and clicks the ‘Create’ button + Then the importer will be created successfully and displayed in the importers page + And all the parameters added to the importers will be displayed accordingly + +Scenario: The user tries to add a new importer and clicks 'Cancel' + Given the user has selected to add a new importer + When the user fills all the mandatory fields and clicks the ‘Cancel’ button + Then the importer will not be created and will not be displayed in the importers page + And it will not be possible to find the importer while searching it in the importers page + +Scenario: The user tries to edit an existing importer + Given the user has clicked on the Call to Action icon under an importer + When the user selects ‘Edit’ option on an existing importer + Then there will be a pop up dialog window for editing the selected importer + And there will be two buttons in the bottom of the pop up dialog window: ‘Save’ and ‘Cancel’ + And it will be possible to update all the fields in the importer dialog box + +Scenario: The user is in editing mode of an importer but does not update anything + Given the user has selected to update an importer + When the user does not change anything in the dialog window + Then the ‘Save’ button will be disabled and the ‘Cancel’ button will be enabled + +Scenario: The user updated an existing importer + Given the user has selected to update an importer + When the user does not change anything in the dialog window and clicks ‘Cancel’ + Then no changes will be done to the importer + And the importer will be displayed with the same data in the importers page \ No newline at end of file From 6ff66c56714b23846aab89faf44238ef435ea2ae Mon Sep 17 00:00:00 2001 From: Itsik Kanias Date: Thu, 23 Jan 2025 15:27:44 +0200 Subject: [PATCH 3/3] Uppdated test cases for exploring and configuring importers --- tests/features/.import-explorer.feature.swp | Bin 16384 -> 0 bytes tests/features/import-explorer.feature | 90 ++++++++++---------- 2 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 tests/features/.import-explorer.feature.swp diff --git a/tests/features/.import-explorer.feature.swp b/tests/features/.import-explorer.feature.swp deleted file mode 100644 index deda1b356b2d51212816246d64388900f8e14c68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOON<;x8Lk9KoHvSr0|BW3iFna^$8n?pKAA5(0!c0GB9IB1H)YI3NKB!jhk%=`R7+oG5q-;V?TZ1>TvR{tGAs0@-dcN5m_P({j%`SK*mao zg}1mLzv&0;4HMh5x-eG8Tan7F%=~pSNFreqm2Is)xv?d(cuUJvZi~#~AGtE+Q^{a@ zvPe!^X)L~Re-EUvg_fq5jB};!Nx74!N=v=sf7p9*-5nhR?_~xGJ2?5dd!Bgs^h3_n zKlRB^@Zx3`Xgj)9JWj)9JWj)9JWj)9JWj)4{fHouiUi|=mr-=FoLx3oUr z=dV}%=egGJ{<8b%80Z-280Z-280Z-280Z-280Z-280Z-280Z*y7cwA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3 z2=O~S@JK5x#0t@wdL+Inf+m?AHL}7u5tM_YDv6QdB4?l1 z1oXKIEwyU&l?e{A1tbwgj>StnUF{a^xkb|>l*Nl}%HMg}ziLuZmg+RGzqRf>wr&pX zh1o9W!S;8UjVwrn!oJbJrPceW?sKpp5TpQ(V&vSR0BU5EcA`8hRr1zXX!4Dztf4`3 zl+;BY1}WuqrpYOB2Z}4+D&iZnh`GbKCZ9z8Ncuo?RWc20Zz)qqYN^P=VF$yQQ$T0*atkTnaGtEsmJW6OpEY9dF3l0o5>p{m>o%h}xhMZ(- zmvUH!7HCzuwKlJt;T;Q!skMlT6>R=S{aPyFGHa#ru0@V>TfPFRdpvU%au_!D@J*s@ z`L=u$$~xzZY9@Ahqg7~kV7XPjx)%>a{2yJXjCFUcR@XDGIO48nz09dyz05CeT*f~y zuP-h0vVNMWoZ9WPRwZ>p?g*5Wp;STG`}3qQE%G%j zL!1p)b6$~E@~e!uUO{k@!8>{P(rReC&P>ao#{zce3i(d3?}T7OXe75@X i<;)w`c}9Bh*tp2N=xuJ$pmvybL5JSyR`wTkjQt-nxy_US diff --git a/tests/features/import-explorer.feature b/tests/features/import-explorer.feature index 4b85cd6..00c78ee 100644 --- a/tests/features/import-explorer.feature +++ b/tests/features/import-explorer.feature @@ -9,128 +9,128 @@ Scenario: The user navigates to Importers Explore page And the column headers Name, Type, Description, Source, Period and Status should be visible And And Call to Action button for each importer should be visible -Scenario: The user can check pagination controls on importers page +Scenario: Pagination controls on importer explorer page Given the user navigates to TPA URL page successfully - When the user selects the importers page from left navigation menu option - Then the importers page will be displayed with pagination controls with correct values - And it will be possible to move between pages accordingly - And it will be possible to add page numbers in the pagination text box and pressing Enter to move to the desired page + When the user is on Importer Explorer page + Then the importers page should be displayed with pagination controls with correct values + And it should be possible to move between pages accordingly + And it should be possible to add page numbers in the pagination text box and pressing Enter to move to the desired page Scenario: The user can see that the search box appears in importers page Given the user navigates to TPA URL page successfully When the user selects the importers menu option - Then there will be a search text box displayed + Then there should be a search text box displayed Scenario: The user can search a text in search text box Given the user navigates to TPA URL page successfully When the user types a search string in the search text box and clicks the magnifying glass icon - Then only the related search results will be displayed in the importers page + Then only the related search results should be displayed in the importers page Scenario: The user can search a text in search text box with pressing 'Enter' in the keyboard Given the user navigates to TPA URL page successfully When the user types a search string in the search text box and presses Enter in the keyboard - Then only the related search results will be displayed in the importers page + Then only the related search results should be displayed in the importers page Scenario: The user can expand an importer to see its logs Given the importers option is selected on the left menu - When the user the user expands an importer row - Then the importer row will be expanded - And the following log fields will be displayed: ‘Start Date’, End Date’, Number of items’, ‘Error’ - And there will be pagination controls under the expanded importer row + When the user expands an importer row + Then the importer row should be expanded + And the following log fields should be displayed: ‘Start Date’, End Date’, Number of items’, ‘Error’ + And there should be pagination controls under the expanded importer row Scenario: When the user clicks on the Call to Action button he can see the relevant options Given the importers option is selected on the left menu When the user clicks on the Call to Action icon - Then the following options will be displayed: Enable/Disable, Delete, Add/Create Importer and Edit + Then the following options should be displayed: Enable/Disable, Delete, Add/Create Importer and Edit Scenario: The user is able to disable an enabled importer Given the user has clicked on the Call to Action button under an importer When the user selects the option Disable on an enabled importer - Then there will be a label of ‘Disabled’ displayed under the specific importer - And the specific importer will stop functioning and importing objects(SBOMs/CVEs/CSAF files) + Then there should be a label of ‘Disabled’ displayed under the specific importer + And the specific importer should stop functioning and importing objects(SBOMs/CVEs/CSAF files) Scenario: The user is not able to disable an already disabled importer Given the user has clicked on the Call to Action icon under an importer When the user selects the option Disable on a disabled importer - Then the ‘Disable’ option will be greyed out (disabled) - And it will not be possible to change the status to ‘Disabled’ + Then the ‘Disable’ option should be greyed out (disabled) + And it should not be possible to change the status to ‘Disabled’ Scenario: The user is able to enable a disabled importer Given the user has clicked on the Call to Action icon under an importer When the user selects the option Enable on a disabled importer - Then there will be a label of ‘Enabled’ displayed under the specific importer - And there will be a confirmation message about the importer being enabled - And the importer will start running and importing the objects(SBOMs/CVEs/CSAF files) + Then there should be a label of ‘Enabled’ displayed under the specific importer + And there should be a confirmation message about the importer being enabled + And the importer should start running and importing the objects(SBOMs/CVEs/CSAF files) Scenario: The user is not able to enable an already enabled importer Given the user has clicked on the Call to Action icon under an importer When the user selects the option Enable on an enabled importer - Then the ‘Enable’ option will be greyed out (disabled) - And it will not be possible to change the status to ‘Enabled' + Then the ‘Enable’ option should be greyed out (disabled) + And it should not be possible to change the status to ‘Enabled' Scenario: The user selects to delete an importer Given the user has clicked on the Call to Action icon under an importer When the user selects the option ‘Delete’ on an importer - Then there will be a confirmation message for the deletion operation - And there will be buttons of ‘OK’ or ‘Cancel’ in the confirmation message + Then there should be a confirmation message for the deletion operation + And there should be buttons of ‘OK’ or ‘Cancel’ in the confirmation message Scenario: The user deletes an existing importer Given the user has clicked on the Call to Action icon under an importer When the user selects the option ‘Delete’ on an importer and clicks ‘OK’ in the confirmation message - Then the importer will be deleted successfully and will not be displayed anymore in the importers page + Then the importer should be deleted successfully and should not be displayed anymore in the importers page Scenario: The user clicks on 'Delete' and then clicks 'Cancel' Given the user has clicked on the Call to Action icon under an importer When the user selects the option ‘Delete’ on an importer and clicks ‘Cancel’ in the confirmation message - Then the importer will be not be deleted and will still be displayed in the importers page - And it will be possible to click on the three dots icon and configure the importer + Then the importer should be not be deleted and should still be displayed in the importers page + And it should be possible to click on the three dots icon and configure the importer Scenario: The user clicks on 'Add/Create' an importer under the hamburger icon Given the user has clicked on the Call to Action icon under an importer When the user selects the option ‘Add/Create’ on an importer - Then there will be a pop up dialog window for adding a new importer - And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button - And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + Then there should be a pop up dialog window for adding a new importer + And it should be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button + And there should be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ Scenario: The user clicks on 'Create Importer' button on the importers main page Given the user is in the importers main page When the user has clicked on the ‘Create importer’ button on the importers page - Then there will be a pop up dialog window for adding a new importer - And it will be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button - And there will be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ + Then there should be a pop up dialog window for adding a new importer + And it should be possible to configure the following parameters: Type (SBOM, CSAF, OSV, CVE), Name, Description, Enable/Disable, Source, Period (exact m/h/d/w/y) and an ‘Add key’ button + And there should be two buttons at the bottom of the page: ‘Create’ and ‘Cancel’ Scenario: The user tries to add a new importer without filling any field in the importer form Given the user has selected to add a new importer When the user leaves all the fields empty and clicks on ‘Create’ button - Then the ‘Create’ button will be disabled and the ‘Cancel’ button will be enabled - And it will not be possible to create a new importer + Then the ‘Create’ button should be disabled and the ‘Cancel’ button should be enabled + And it should not be possible to create a new importer Scenario: The user adds a new importer Given the user has selected to add a new importer When the user fills all the mandatory fields and clicks the ‘Create’ button - Then the importer will be created successfully and displayed in the importers page - And all the parameters added to the importers will be displayed accordingly + Then the importer should be created successfully and displayed in the importers page + And all the parameters added to the importers should be displayed accordingly Scenario: The user tries to add a new importer and clicks 'Cancel' Given the user has selected to add a new importer When the user fills all the mandatory fields and clicks the ‘Cancel’ button - Then the importer will not be created and will not be displayed in the importers page - And it will not be possible to find the importer while searching it in the importers page + Then the importer should not be created and should not be displayed in the importers page + And it should not be possible to find the importer while searching it in the importers page Scenario: The user tries to edit an existing importer Given the user has clicked on the Call to Action icon under an importer When the user selects ‘Edit’ option on an existing importer - Then there will be a pop up dialog window for editing the selected importer - And there will be two buttons in the bottom of the pop up dialog window: ‘Save’ and ‘Cancel’ - And it will be possible to update all the fields in the importer dialog box + Then there should be a pop up dialog window for editing the selected importer + And there should be two buttons in the bottom of the pop up dialog window: ‘Save’ and ‘Cancel’ + And it should be possible to update all the fields in the importer dialog box Scenario: The user is in editing mode of an importer but does not update anything Given the user has selected to update an importer When the user does not change anything in the dialog window - Then the ‘Save’ button will be disabled and the ‘Cancel’ button will be enabled + Then the ‘Save’ button should be disabled and the ‘Cancel’ button should be enabled Scenario: The user updated an existing importer Given the user has selected to update an importer When the user does not change anything in the dialog window and clicks ‘Cancel’ - Then no changes will be done to the importer - And the importer will be displayed with the same data in the importers page \ No newline at end of file + Then no changes should be done to the importer + And the importer should be displayed with the same data in the importers page \ No newline at end of file