From b761435f4bdf40ae5cf7f233e95c60eb51277c7d Mon Sep 17 00:00:00 2001 From: cesarvh Date: Thu, 16 Jun 2016 19:59:53 -0700 Subject: [PATCH 01/12] CQA-54: Working version of this test plan --- .../collectionspace/qa/records/Person.java | 36 ++++ .../cucumber/advanced_search/person.feature | 170 +++++++----------- 2 files changed, 104 insertions(+), 102 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Person.java b/src/test/java/org/collectionspace/qa/records/Person.java index 46b4711..d3eebe1 100644 --- a/src/test/java/org/collectionspace/qa/records/Person.java +++ b/src/test/java/org/collectionspace/qa/records/Person.java @@ -57,6 +57,42 @@ public Person() { fieldSelectorByLabel.put("Forename", "csc-personAuthority-foreName"); // Selector for the Person Vocab field in the cataloging record fieldSelectorByLabel.put("Cataloging->Content->Person", "csc-object-description-content-person"); + + dropDownMap.put("Status", "csc-personAuthority-termStatus"); + dropDownMap.put("Gender", "csc-personAuthority-gender"); + + + fieldSelectorByLabel.put("Display Name", "csc-personAuthority-termDisplayName"); + fieldSelectorByLabel.put("Birth Date", "csc-personAuthority-birthDate"); + fieldSelectorByLabel.put("Death Date", "csc-personAuthority-deathDate"); + + xpathMap.put("Latest Birth Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/input"); + xpathMap.put("Latest Birth Date Month", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input"); + xpathMap.put("Latest Birth Date Day", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[4]/input"); + xpathMap.put("Earliest/Single Birth Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/input"); + xpathMap.put("Earliest/Single Birth Date Month", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[3]/input"); + xpathMap.put("Earliest/Single Birth Date Day", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[4]/input"); + xpathMap.put("Latest Death Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/input"); + xpathMap.put("Latest Death Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input"); + xpathMap.put("Latest Death Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[4]/input"); + xpathMap.put("Earliest/Single Death Date Year", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/input"); + xpathMap.put("Earliest/Single Death Date Month", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[3]/input"); + xpathMap.put("Earliest/Single Death Date Day", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div[2]/div[2]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[4]/input"); + + fieldSelectorByLabel.put("Biographical Note", "csc-personAuthority-bioNote"); + fieldSelectorByLabel.put("Group", "csc-personAuthority-group"); + fieldSelectorByLabel.put("Nationality", "csc-personAuthority-nationality"); + fieldSelectorByLabel.put("Occupation", "csc-personAuthority-occupation"); + fieldSelectorByLabel.put("School/Style", "csc-personAuthority-schoolOrStyle"); + fieldSelectorByLabel.put("Name Notes", "csc-personAuthority-nameNote"); + fieldSelectorByLabel.put("Earliest Birth Date", "csc-person-birthDateGroupStart"); + fieldSelectorByLabel.put("Latest Birth Date", "csc-person-birthDateGroupEnd"); + fieldSelectorByLabel.put("Earliest Death Date", "csc-person-deathDateGroupStart"); + fieldSelectorByLabel.put("Latest Death Date", "csc-person-deathDateGroupEnd"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-person-updatedAtStart"); + fieldSelectorByLabel.put("Latest Modified Date", "csc-person-updatedAtEnd"); + fieldSelectorByLabel.put("Record last modified by","csc-person-updatedBy"); + } diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature index 1c997c0..c5b8c0b 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature @@ -1,5 +1,5 @@ #Created by Forest Yang on 1/11/2016 - +# Working as of June 16, 2016 -Cesar @advancedsearch Feature: Advanced Search - Person @@ -8,195 +8,173 @@ Feature: Advanced Search - Person # Given user is on the "Create New" page # And selects the "Person" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Person" record - Then the titlebar should contain "Person" + Given user is on a blank "Local Persons" record And enters "Fleet Foxes" in the "Person" "Display Name" field - # And clicks on the "Person" "Status" field - # Then a drop down list should appear in the "Status" row - # And selects "Accepted" from dropdown in "Status" row And selects "Accepted" from the "Person" "Status" dropdown And enters "2011-01-01" in the "Person" "Birth Date" field + And enters "2011" in the "Person" "Earliest/Single Birth Date Year" field + And enters "01" in the "Person" "Earliest/Single Birth Date Month" field + And enters "01" in the "Person" "Earliest/Single Birth Date Day" field + And enters "2011-01-01" in the "Person" "Death Date" field + And enters "2011" in the "Person" "Earliest/Single Death Date Year" field + And enters "01" in the "Person" "Earliest/Single Death Date Month" field + And enters "01" in the "Person" "Earliest/Single Death Date Day" field And enters "Fetty Wap" in the "Person" "Group" field And enters "Trapanese" in the "Person" "Nationality" field - # And clicks on the "Person" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row And selects "Male" from the "Person" "Gender" dropdown And enters "Emcee" in the "Person" "Occupation" field And enters "Banger" in the "Person" "School/Style" field And clicks the "Save" button Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And enters "Fleet Foxes" in the "Person" "Display Name" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Status - Given user is on the "My CollectionSpace" page + # Scenario: Search by Status + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Status" field - # Then a drop down list should appear in the "Status" row - # And selects "Accepted" from dropdown in "Status" row And selects "Accepted" from the "Person" "Status" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Birth Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Birth Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - And enters "2011-01-01" in the "Person" "Birth Date" field + And enters "2011-01-01" in the "Person" "Earliest Birth Date" field + And enters "2011-01-01" in the "Person" "Latest Birth Date" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Death Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Death Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - And enters "2011-01-01" in the "Person" "Death Date" field + And enters "2011-01-01" in the "Person" "Earliest Death Date" field + And enters "2011-01-01" in the "Person" "Latest Death Date" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Group - Given user is on the "My CollectionSpace" page + # Scenario: Search by Group + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And enters "Fetty Wap" in the "Person" "Group" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Occupation - Given user is on the "My CollectionSpace" page + # Scenario: Search by Occupation + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And enters "Emcee" in the "Person" "Occupation" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Nationality - Given user is on the "My CollectionSpace" page + # Scenario: Search by Nationality + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And enters "Trapanese" in the "Person" "Nationality" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Gender - Given user is on the "My CollectionSpace" page + # Scenario: Search by Gender + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row And selects "Male" from the "Person" "Gender" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by School/Style - Given user is on the "My CollectionSpace" page + # Scenario: Search by School/Style + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And enters "Banger" in the "Person" "School/Style" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by Modified Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Modified Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - And enters today's date in the "GeneralPages" "Earliest Modified Date" field + And enters today's date in the "Person" "Earliest Modified Date" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" - Then close the browser + # Then close the browser - Scenario: Search by username - Given user is on the "My CollectionSpace" page + # Scenario: Search by username + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown - And enters "admin@core.collectionspace.org" in the "Advanced Search" "Record last modified by" field + And enters "admin@core.collectionspace.org" in the "Person" "Record last modified by" field And clicks the "Advanced Search search" button Then the search results should contain "Fleet Foxes" Then close the browser - #Test2 + # Test2 Scenario: Boolean field-based search # Given user is on the "Create New" page # And selects the "Person" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Person" record - Then the titlebar should contain "Person" + Given user is on a blank "Local Persons" record And enters "Lorelai" in the "Person" "Display Name" field And enters "1975-07-05" in the "Person" "Birth Date" field - # And clicks on the "Person" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Female" from dropdown in "Gender" row + And enters "1975" in the "Person" "Earliest/Single Birth Date Year" field + And enters "07" in the "Person" "Earliest/Single Birth Date Month" field + And enters "05" in the "Person" "Earliest/Single Birth Date Day" field And selects "Female" from the "Person" "Gender" dropdown And enters "testtest" in the "Person" "Name Notes" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Person" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Person" record - Then the titlebar should contain "Person" + Given user is on a blank "Local Persons" record And enters "Andrea" in the "Person" "Display Name" field And enters "1975-07-05" in the "Person" "Birth Date" field - # And clicks on the "Person" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Female" from dropdown in "Gender" row + And enters "1975" in the "Person" "Earliest/Single Birth Date Year" field + And enters "07" in the "Person" "Earliest/Single Birth Date Month" field + And enters "05" in the "Person" "Earliest/Single Birth Date Day" field And selects "Female" from the "Person" "Gender" dropdown And enters "testtest" in the "Person" "Biographical Note" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Person" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Person" record - Then the titlebar should contain "Person" + Given user is on a blank "Local Persons" record And enters "DD" in the "Person" "Display Name" field - And enters "1975-07-05" in the "Person" "Birth" field - # And clicks on the "Person" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row + And enters "1975-07-05" in the "Person" "Birth Date" field + And enters "1975" in the "Person" "Earliest/Single Birth Date Year" field + And enters "07" in the "Person" "Earliest/Single Birth Date Month" field + And enters "05" in the "Person" "Earliest/Single Birth Date Day" field And selects "Male" from the "Person" "Gender" dropdown And enters "textbook" in the "Person" "Name Notes" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown #should automatically go in earliest.. i think - And enters "1975-06-05" in the "Person" "Birth Date" field - # And clicks on the "Person" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row + And enters "1975-06-05" in the "Person" "Earliest Birth Date" field And selects "Male" from the "Person" "Gender" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Lorelai" @@ -204,13 +182,9 @@ Feature: Advanced Search - Person Then the search results should contain "DD" And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "1975-06-06" in the "Person" "Birth Date" field - # And clicks on the "Advanced Search" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Female" from dropdown in "Gender" row + And enters "1975-06-06" in the "Person" "Earliest Birth Date" field And selects "Female" from the "Person" "Gender" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Lorelai" @@ -222,14 +196,10 @@ Feature: Advanced Search - Person Scenario: Boolean and Keyword Search Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "testtest" in the "AdvancedSearch" "search" field - And enters "1975-06-05" in the "Advanced Search" "Birth Date" field - # And clicks on the "Advanced Search" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row + And enters "testtest" in the "AdvancedSearch" "Keyword Search" field + And enters "1975-06-05" in the "Person" "Earliest Birth Date" field And selects "Male" from the "Person" "Gender" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Lorelai" @@ -237,14 +207,10 @@ Feature: Advanced Search - Person Then the search results should not contain "DD" And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Person" from the "AdvancedSearch" "record type" dropdown And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "textbook" in the "AdvancedSearch" "search" field - And enters "1975-06-05" in the "Advanced Search" "Birth Date" field - # And clicks on the "Advanced Search" "Gender" field - # Then a drop down list should appear in the "Gender" row - # And selects "Male" from dropdown in "Gender" row + And enters "textbook" in the "AdvancedSearch" "Keyword Search" field + And enters "1975-06-05" in the "Person" "Earliest Birth Date" field And selects "Male" from the "Person" "Gender" dropdown And clicks the "Advanced Search search" button Then the search results should not contain "Lorelai" From 0efddad90dbfe4db22c3f3ebe13d7d66e143a841 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Thu, 16 Jun 2016 20:00:39 -0700 Subject: [PATCH 02/12] CQA-54: Working version of this test plan --- .../collectionspace/qa/cucumber/advanced_search/person.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature index c5b8c0b..9ab1e02 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/person.feature @@ -1,5 +1,5 @@ #Created by Forest Yang on 1/11/2016 -# Working as of June 16, 2016 -Cesar +# Working as of June 16, 2016 -Cesar @advancedsearch Feature: Advanced Search - Person From 4c553d8baed3f00782f0971993dd26aa87c28c0e Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 18 Jun 2016 09:23:33 -0700 Subject: [PATCH 03/12] CQA-71: Working Version of this Test Plan --- .../qa/records/Acquisition.java | 4 +++- .../advanced_search/acquisition.feature | 18 ++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Acquisition.java b/src/test/java/org/collectionspace/qa/records/Acquisition.java index e39bfaa..c91a7a2 100644 --- a/src/test/java/org/collectionspace/qa/records/Acquisition.java +++ b/src/test/java/org/collectionspace/qa/records/Acquisition.java @@ -38,7 +38,9 @@ public Acquisition(){ xpathMap.put("Acquisition Authorizer", "//*[@id=\"primaryTab\"]/div/div[3]/div[1]/div[2]/div[1]/div[1]/div[3]/div[2]/table/tbody/tr/td[1]/input[2]"); - xpathMap.put("Acquisition Source", "//*[@name=\"primary-fields.acquisitionSources\"]/following-sibling::input[1]"); + xpathMap.put("Acquisition Source", "//*[@id=\"primaryTab\"]/div/div[3]/div/div[2]/div/div/div[6]/div[2]/div/ul/li/input[3]"); + xpathMap.put("Search Acquisition Source", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[4]/div/div/div/div/div[6]/div[2]/div/ul/li/input[3]"); + xpathMap.put("Funding Source", "//*[@id=\"repeat::\"]/td[4]/input[2]"); xpathMap.put("Search Acquisition source", "//*[@name=\"primary-acquisitionSources\"]/following-sibling::input[1]"); xpathMap.put("Search Funding source", "//*[@id=\".csc-acquisition-acquisitionFunding\"]/input[2]"); diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature index 2f86a9b..257280c 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature @@ -1,7 +1,7 @@ # Created by Cesar Villalobos on 9/15/15 # Acquisition source is not working as desired # Everything else works as of May 31 -@advancedsearch +@place Feature: Advanced Search ­ Acquisition Searching for a record based on boolean-search as well as regular search terms @@ -25,8 +25,7 @@ Feature: Advanced Search ­ Acquisition And selects "Purchase" from the "Acquisition" "Acquisition Method" dropdown And enters "CQA-71 Test" in the "Acquisition" "Field collection event name" field - # # And enters "CQA-71 Acquisition Source" in the "Acquisition" "Acquisition Source" field - # # And clicks on "CQA-71 Acquisition Source" from autocomplete options + And enters "CQA-71 Acquisition Source" in the "Acquisition" "Acquisition Source" field And enters "CQA-71 Funding source" in the "Acquisition" "Funding Source" autocomplete field And enters "textbook" in the "Acquisition" "Credit Line" field @@ -62,13 +61,12 @@ Feature: Advanced Search ­ Acquisition And clicks the "Advanced Search search" button Then the search results should contain "CQA71.1" # - #Acquisition Source -# And clicks the "Advanced Search" button -# And selects "Acquisition" from the "AdvancedSearch" "record type" dropdown -# And enters "CQA-71 Acquisition Source" in the "Acquisition" "Acquisition Source" field -# And clicks on "CQA-71 Acquisition Source" from autocomplete options -# And clicks the "Advanced Search search" button -# Then the search results should contain "CQA71.1" + # Acquisition Source + And clicks the "Advanced Search" button + And selects "Acquisition" from the "AdvancedSearch" "record type" dropdown + And enters "CQA-71 Acquisition Source" in the "Acquisition" "Search Acquisition Source" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA71.1" # #Acquisition Funding And clicks the "Advanced Search" button From 8b847be1baaebe9b76d94db575515d7f479eae37 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 18 Jun 2016 09:24:21 -0700 Subject: [PATCH 04/12] CQA-71: Changed @place tag to @advancedsearch on working test --- .../qa/cucumber/advanced_search/acquisition.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature index 257280c..fa54615 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/acquisition.feature @@ -1,7 +1,7 @@ # Created by Cesar Villalobos on 9/15/15 # Acquisition source is not working as desired # Everything else works as of May 31 -@place +@advancedsearch Feature: Advanced Search ­ Acquisition Searching for a record based on boolean-search as well as regular search terms From ce5c88205b38462984a5c53b9acc40cc57efde79 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 18 Jun 2016 11:05:46 -0700 Subject: [PATCH 05/12] CQA-80: Working Version of this Test Plan --- .../qa/records/LocationMovementInventory.java | 75 +++-- .../location_movement_inventory.feature | 283 +++++++----------- 2 files changed, 160 insertions(+), 198 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/LocationMovementInventory.java b/src/test/java/org/collectionspace/qa/records/LocationMovementInventory.java index cdb14ff..b74e1e3 100644 --- a/src/test/java/org/collectionspace/qa/records/LocationMovementInventory.java +++ b/src/test/java/org/collectionspace/qa/records/LocationMovementInventory.java @@ -5,32 +5,57 @@ public class LocationMovementInventory extends Record { public LocationMovementInventory() { - xpathMap.put("Current Location", "//*[@id=\"primaryTab\"]/div/div[3]/div[1]/div[2]/div[2]/div/div[2]/table/tbody/tr/td[1]/input[2]"); - xpathMap.put("Contact", "//*[@id=\"primaryTab\"]/div/div[3]/div[2]/div[2]/div[1]/div[2]/div/div[2]/input[2]"); + + + dropDownMap.put("Inventory Action Required", "csc-movement-inventoryActionRequired"); + dropDownMap.put("Inventory Frequency", "csc-movement-frequencyForInventory"); + dropDownMap.put("Movement Method", "csc-movement-movementMethods"); + dropDownMap.put("Reason for move", "csc-movement-reasonForMove"); + + fieldSelectorByLabel.put("Earliest Inventory Date", "csc-movement-inventoryDateStart"); + fieldSelectorByLabel.put("Earliest Location Date", "csc-movement-locationDateStart"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-movement-updatedAtEnd"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-movement-updatedAtStart"); + fieldSelectorByLabel.put("Earliest Next Inventory Date", "csc-movement-nextInventoryDateStart"); + fieldSelectorByLabel.put("Earliest Planned removal date", "csc-movement-plannedRemovalDateStart"); + fieldSelectorByLabel.put("Earliest Removal date", "csc-movement-removalDateStart"); + fieldSelectorByLabel.put("Fitness", "csc-movement-currentLocationFitness"); + fieldSelectorByLabel.put("Inventory Date", "csc-movement-inventoryDate"); + fieldSelectorByLabel.put("Inventory Information", "csc-movement-inventory"); + fieldSelectorByLabel.put("Inventory Note", "csc-movement-inventoryNote"); + fieldSelectorByLabel.put("Latest Inventory Date", "csc-movement-inventoryDateEnd"); + fieldSelectorByLabel.put("Latest Location Date", "csc-movement-locationDateEnd"); + fieldSelectorByLabel.put("Latest Next Inventory Date", "csc-movement-nextInventoryDateEnd"); + fieldSelectorByLabel.put("Latest Planned removal date", "csc-movement-plannedRemovalDateEnd"); + fieldSelectorByLabel.put("Latest Removal date", "csc-movement-removalDateEnd"); + fieldSelectorByLabel.put("Location Date", "csc-movement-locationDate"); + fieldSelectorByLabel.put("Movement Information", "csc-movement-movementControlInformation"); + fieldSelectorByLabel.put("Movement Note", "csc-movement-movementNote"); + fieldSelectorByLabel.put("Next Inventory Date", "csc-movement-nextInventoryDate"); + fieldSelectorByLabel.put("Object Location Information", "csc-movement-locationMovementInformation"); + fieldSelectorByLabel.put("Object Location Note", "csc-movement-currentLocationNote"); + fieldSelectorByLabel.put("Planned removal date", "csc-movement-plannedRemovalDate"); + fieldSelectorByLabel.put("Record last modified by", "csc-movement-updatedBy"); + fieldSelectorByLabel.put("Reference Number", "csc-movement-movementReferenceNumber"); + fieldSelectorByLabel.put("Removal date", "csc-movement-removalDate"); + + xpathMap.put("Current Location Search", "//*[@id=\"all-content\"]/div/div[1]/div/div/div/div[2]/div[4]/div/div/div/div/div/div[2]/div/ul/li/input[3]"); + xpathMap.put("Inventory Contact Search", "//*[@id=\"all-content\"]/div/div[1]/div/div/div/div[2]/div[4]/div/div/div/div/div[11]/div[2]/div/ul/li/input[3]"); + xpathMap.put("Inventory Contact", "//*[@id=\"primaryTab\"]/div/div[3]/div[3]/div[2]/div[2]/div[1]/div/div[2]/div/ul/li/input[3]"); + xpathMap.put("Movement Contact Search", "//*[@id=\"all-content\"]/div/div[1]/div/div/div/div[2]/div[4]/div/div/div/div/div[4]/div[2]/div/ul/li/input[3]"); + xpathMap.put("Movement Contact", "//*[@id=\"secondary-nav-menu\"]/div[2]/div/div[3]/div[2]/div[2]/div/div[2]/div/div[2]/input[2]"); + xpathMap.put("Normal Location Search", "//*[@id=\"all-content\"]/div/div[1]/div/div/div/div[2]/div[2]/div/div[3]/div[2]/div[2]/div/div[2]/div/div[2]/input[2]"); xpathMap.put("Normal Location", "//*[@id=\"primaryTab\"]/div/div[3]/div[1]/div[2]/div[1]/div[2]/div/div[2]/input[2]"); - xpathMap.put("Second Contact", "//*[@id=\"fluid-id-5jxc7z9x-1204\"]/ul/li/input[3]"); // fix fluid id.... - - // fieldSelectorByLabel.put("Contact", "csc-movement-movementContact"); // "Contact" in UI. Disambiguating name could be "Movement Contact" - // fieldSelectorByLabel.put("Current Location", "csc-movement-currentLocation"); - fieldSelectorByLabel.put("First Note", "csc-movement-currentLocationNote"); // "Note" in UI. Disambiguating name could be "Current Location Note" - fieldSelectorByLabel.put("Fitness", "csc-movement-currentLocationFitness"); - fieldSelectorByLabel.put("Inventory Action Required", "csc-movement-inventoryActionRequired"); - //fieldSelectorByLabel.put("Second Contact", "csc-movement-inventoryContact"); // "Contact" in UI. Disambiguating name could be "Inventory Contact" - fieldSelectorByLabel.put("Inventory Date", "csc-movement-inventoryDate"); - fieldSelectorByLabel.put("Inventory Frequency", "csc-movement-frequencyForInventory"); - fieldSelectorByLabel.put("Inventory Information", "csc-movement-inventory"); - fieldSelectorByLabel.put("Location Date", "csc-movement-locationDate"); - fieldSelectorByLabel.put("Method", "csc-movement-movementMethod"); - fieldSelectorByLabel.put("Movement Information", "csc-movement-movementControlInformation"); - fieldSelectorByLabel.put("Next Inventory Date", "csc-movement-nextInventoryDate"); - // fieldSelectorByLabel.put("Normal Location", "csc-movement-normalLocation"); - fieldSelectorByLabel.put("Object Location Information", "csc-movement-locationMovementInformation"); - fieldSelectorByLabel.put("Planned removal date", "csc-movement-plannedRemovalDate"); - fieldSelectorByLabel.put("Reason for move", "csc-movement-reasonForMove"); - fieldSelectorByLabel.put("Reference Number", "csc-movement-movementReferenceNumber"); - fieldSelectorByLabel.put("Removal date", "csc-movement-removalDate"); - fieldSelectorByLabel.put("Second Note", "csc-movement-movementNote"); // "Note" in UI. Disambiguating name could be "Movement Note" - fieldSelectorByLabel.put("Third Note", "csc-movement-inventoryNote"); // "Note" in UI. Disambiguating name could be "Inventory Note" + xpathMap.put("Current Location", "//*[@id=\"primaryTab\"]/div/div[3]/div[1]/div[2]/div[2]/div/div[2]/table/tbody/tr/td[1]/input[2]"); + + + // And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field + // And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" autocomplete field + + // And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field + // And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" autocomplete field + + } diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/location_movement_inventory.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/location_movement_inventory.feature index 24812a8..2368757 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/location_movement_inventory.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/location_movement_inventory.feature @@ -1,242 +1,194 @@ #Created by Forest Yang on 12/29/2015 - +# Passing as of June 18 @advancedsearch Feature: Advanced Search - Location / Movement / Inventory - #Test1 + # Test1 Scenario: Advanced Search Fields # Given user is on the "Create New" page # And selects the "Location/Movement/Inventory" radio button on the Create New page # And clicks on the Create button Given user is on a blank "Location/Movement/Inventory" record - Then the titlebar should contain "Location/Movement/Inventory" - And enters "Ssidweet" in the "Location/Movement/Inventory" "Current Location" vocab field - And adds "Ssidweet" to "Local Storage Locations" + And enters "Ssidweet" in the "Location/Movement/Inventory" "Current Location" autocomplete field And enters "1002-01-01" in the "Location/Movement/Inventory" "Location Date" field - And enters "Teewdiss" in the "Location/Movement/Inventory" "Normal Location" vocab field - And adds "Teewdiss" to "Local Storage Locations" - And enters "hobinrood" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And adds "hobinrood" to "Local Persons" - # And clicks on the "Location/Movement/Inventory" "Movement Method" field - # Then a drop down list should appear in the "Movement Method" row - # And selects "Forklift" from dropdown in "Movement Method" row + And enters "Teewdiss" in the "Location/Movement/Inventory" "Normal Location" autocomplete field + And enters "hobinrood" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field And selects "Forklift" from the "Location/Movement/Inventory" "Movement Method" dropdown And enters "1002-01-01" in the "Location/Movement/Inventory" "Planned removal date" field And enters "1002-01-01" in the "Location/Movement/Inventory" "Removal date" field - # And clicks on the "Location/Movement/Inventory" "Reason for move" field - # Then a drop down list should appear in the "Reason for move" field - # And selects "Conservation" from dropdown in "Reason for move" row And selects "Conservation" from the "Location/Movement/Inventory" "Reason for move" dropdown And enters "1002-01-01" in the "Location/Movement/Inventory" "Inventory Date" field - And enters "hobinrood" in the "Location/Movement/Inventory" "Inventory Contact" field - And clicks on "hobinrood" from autocomplete options - # And clicks on the "Location/Movement/Inventory" "Inventory Action Required" field - # Then a drop down list should appear in the "Inventory Action Required" field - # And selects "Conservation" from dropdown in "Inventory Action Required" row + And enters "hobinrood" in the "Location/Movement/Inventory" "Inventory Contact" autocomplete field + And selects "Conservation" from the "Location/Movement/Inventory" "Inventory Action Required" dropdown - And enters "irrelevant" in "Location/Movement/Inventory" "Inventory Note" field - # And clicks on the "Location/Movement/Inventory" "Inventory Frequency" field - # Then a drop down list should appear in the "Inventory Frequency" field - # And selects "Daily" from dropdown in "Inventory Frequency" row - And selects "Daily" from the "Location/Movement/Inventory" "Inventory Frequency" dropdown + And enters "irrelevant" in the "Location/Movement/Inventory" "Inventory Note" field + And selects "Daily" from the "Location/Movement/Inventory" "Inventory Frequency" dropdown And enters "1002-01-01" in the "Location/Movement/Inventory" "Next Inventory Date" field And enters "3357" in the "Location/Movement/Inventory" "Reference Number" field And clicks the "Save" button + And clicks the confirmation save button Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "Ssidweet" in the "Location/Movement/Inventory" "Current Location" vocab field - And clicks on "Ssidweet" from autocomplete options + And enters "Ssidweet" in the "Location/Movement/Inventory" "Current Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Location Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Location Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "1002-01-01" in the "Location/Movement/Inventory" "Location Date" field + And enters "1002-01-01" in the "Location/Movement/Inventory" "Earliest Location Date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Normal Location - Given user is on the "My CollectionSpace" page + # Scenario: Search by Normal Location + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "Teewdiss" in the "Location/Movement/Inventory" "Normal Location" vocab field - And clicks on "Teewdiss" from autocomplete options + And enters "Teewdiss" in the "Location/Movement/Inventory" "Normal Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Movement Contact - Given user is on the "My CollectionSpace" page + # Scenario: Search by Movement Contact + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "hobinrood" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And clicks on "hobinrood" from autocomplete options + And enters "hobinrood" in the "Location/Movement/Inventory" "Movement Contact Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Movement Method - Given user is on the "My CollectionSpace" page + # Scenario: Search by Movement Method + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Movement Method" field - # Then a drop down list should appear in the "Movement Method" row - # And selects "Forklift" from dropdown in "Movement Method" row And selects "Forklift" from the "Location/Movement/Inventory" "Movement Method" dropdown And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Planned removal date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Planned removal date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "1002-01-01" in the "Location/Movement/Inventory" "Planned removal date" field + And enters "1002-01-01" in the "Location/Movement/Inventory" "Earliest Planned removal date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Removal date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Removal date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "1002-01-01" in the "Location/Movement/Inventory" "Removal Date" field + And enters "1002-01-01" in the "Location/Movement/Inventory" "Earliest Removal date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Reason for move - Given user is on the "My CollectionSpace" page + # Scenario: Search by Reason for move + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Reason for move" field - # Then a drop down list should appear in the "Reason for move" row - # And selects "Conservation" from dropdown in "Reason for move" row And selects "Conservation" from the "Location/Movement/Inventory" "Reason for move" dropdown And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser - - Scenario: Search by Inventory Date - Given user is on the "My CollectionSpace" page - And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" - And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "1002-01-01" in the "Location/Movement/Inventory" "Inventory Date" field - And clicks the "Advanced Search search" button - Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Inventory Contact - Given user is on the "My CollectionSpace" page + # Scenario: Search by Inventory Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "hobinrood" in the "Location/Movement/Inventory" "Inventory Contact" vocab field - And clicks on "hobinrood" from autocomplete options + And enters "1002-01-01" in the "Location/Movement/Inventory" "Earliest Inventory Date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Inventory action required - Given user is on the "My CollectionSpace" page + # Scenario: Search by Inventory action required + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Inventory Action Required" field - # Then a drop down list should appear in the "Inventory Action Required" row - # And selects "Conservation" from dropdown in "Inventory Action Required" row And selects "Conservation" from the "Location/Movement/Inventory" "Inventory Action Required" dropdown And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Inventory Note - Given user is on the "My CollectionSpace" page + # Scenario: Search by Inventory Note + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And enters "irrelevant" in the "Location/Movement/Inventory" "Inventory Note" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Inventory Frequency - Given user is on the "My CollectionSpace" page + # Scenario: Search by Inventory Frequency + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Inventory Frequency" field - # Then a drop down list should appear in the "Inventory Frequency" row - # And selects "Daily" from dropdown in "Inventory Frequency" row And selects "Daily" from the "Location/Movement/Inventory" "Inventory Frequency" dropdown And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Next Inventory Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Next Inventory Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "1002-01-01" in the "Location/Movement/Inventory" "Next Inventory Date" field + And enters "1002-01-01" in the "Location/Movement/Inventory" "Earliest Next Inventory Date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by Modified Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Modified Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And enters today's date in the "Location/Movement/Inventory" "Earliest Modified Date" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: Search by username - Given user is on the "My CollectionSpace" page + # Scenario: Search by username + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And enters "admin@core.collectionspace.org" in the "GeneralPages" "Record last modified by" field + And enters "admin@core.collectionspace.org" in the "Location/Movement/Inventory" "Record last modified by" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: search by reference number - Given user is on the "My CollectionSpace" page + # Scenario: search by reference number + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And enters "3357" in the "Location/Movement/Inventory" "Reference Number" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser - Scenario: search by reference number fragment - Given user is on the "My CollectionSpace" page + # Scenario: search by reference number fragment + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And enters "33*" in the "Location/Movement/Inventory" "Reference Number" field And clicks the "Advanced Search search" button Then the search results should contain "3357" - Then close the browser + # Then close the browser + + # Scenario: Search by Inventory Contact + # Given user is on the "My CollectionSpace" page + And clicks the "Advanced Search" button + And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown + And enters "hobinrood" in the "Location/Movement/Inventory" "Inventory Contact Search" autocomplete field + And clicks the "Advanced Search search" button + Then the search results should contain "3357" + Then close the browser + #Test2 Scenario: Boolean field-based search @@ -244,52 +196,43 @@ Feature: Advanced Search - Location / Movement / Inventory # And selects the "Location/Movement/Inventory" radio button on the Create New page # And clicks on the Create button Given user is on a blank "Location/Movement/Inventory" record - Then the titlebar should contain "Location/Movement/Inventory" And enters "7533" in the "Location/Movement/Inventory" "Reference Number" field - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And adds "Jane Doe" to "Local Persons" - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And adds "In a Shoebox" to "Local Storage Locations" - And enters "testtest" in the "Location/Movement/Inventory" "Movement Information Note" field + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" autocomplete field + And enters "testtest" in the "Location/Movement/Inventory" "Movement Note" field And clicks the "Save" button - Then the record is successfully saved + And clicks the confirmation save button + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Location/Movement/Inventory" radio button on the Create New page # And clicks on the Create button And user is on a blank "Location/Movement/Inventory" record - Then the titlebar should contain "Location/Movement/Inventory" And enters "7534" in the "Location/Movement/Inventory" "Reference Number" field - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And adds "Jane Doe" to "Local Persons" - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And adds "In a Shoebox" to "Local Storage Locations" - And enters "testtest" in the "Location/Movement/Inventory" "Movement Information Note" field + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" autocomplete field + And enters "testtest" in the "Location/Movement/Inventory" "Movement Note" field And clicks the "Save" button - Then the record is successfully saved + And clicks the confirmation save button + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Location/Movement/Inventory" radio button on the Create New page # And clicks on the Create button And user is on a blank "Location/Movement/Inventory" record - Then the titlebar should contain "Location/Movement/Inventory" And enters "7535" in the "Location/Movement/Inventory" "Reference Number" field - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And adds "Jane Doe" to "Local Persons" - And enters "In my Pocket" in the "Location/Movement/Inventory" "Current Location" vocab field - And adds "In my Pocket" to "Local Storage Locations" - And enters "testtest" in the "Location/Movement/Inventory" "Movement Information Note" field + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" autocomplete field + And enters "In my Pocket" in the "Location/Movement/Inventory" "Current Location" autocomplete field + And enters "testtest" in the "Location/Movement/Inventory" "Movement Note" field And clicks the "Save" button - Then the record is successfully saved + And clicks the confirmation save button + # Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And clicks on "Jane Doe" from autocomplete options - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And clicks on "In a Shoebox" from autocomplete options + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact Search" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "7533" Then the search results should contain "7534" @@ -298,10 +241,8 @@ Feature: Advanced Search - Location / Movement / Inventory And clicks the "Advanced Search" button And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And clicks on "Jane Doe" from autocomplete options - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And clicks on "In a Shoebox" from autocomplete options + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact Search" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "7533" Then the search results should contain "7534" @@ -312,28 +253,24 @@ Feature: Advanced Search - Location / Movement / Inventory Scenario: Boolean and Keyword Search Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" - And enters "testtest" in the "AdvancedSearch" "search" field + + And enters "testtest" in the "AdvancedSearch" "Keyword Search" field And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And clicks on "Jane Doe" from autocomplete options - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And clicks on "In a Shoebox" from autocomplete options + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact Search" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "7533" Then the search results should contain "7534" Then the search results should contain "7535" And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" - And enters "testtest" in the "AdvancedSearch" "search" field + + And enters "testtest" in the "AdvancedSearch" "Keyword Search" field And selects "Location/Movement/Inventory" from the "AdvancedSearch" "record type" dropdown - And selects "and (ALL)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact" vocab field - And clicks on "Jane Doe" from autocomplete options - And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location" vocab field - And clicks on "In a Shoebox" from autocomplete options + And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown + And enters "Jane Doe" in the "Location/Movement/Inventory" "Movement Contact Search" autocomplete field + And enters "In a Shoebox" in the "Location/Movement/Inventory" "Current Location Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "7533" Then the search results should contain "7534" @@ -347,27 +284,27 @@ Feature: Advanced Search - Location / Movement / Inventory And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Acquisition" deletion should be confirmed in a dialog + Then "Location/Movement/Inventory" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "7533" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Acquisition" deletion should be confirmed in a dialog + Then "Location/Movement/Inventory" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "7534" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Acquisition" deletion should be confirmed in a dialog + Then "Location/Movement/Inventory" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "7535" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Acquisition" deletion should be confirmed in a dialog + Then "Location/Movement/Inventory" deletion should be confirmed in a dialog And clicks delete confirmation OK button Then close the browser From be28ae301e2460e2edfab9dd282555c760d29f8f Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 18 Jun 2016 12:16:29 -0700 Subject: [PATCH 06/12] CQA-84: Working version of this test plan --- .../qa/records/ValuationControl.java | 27 ++- .../advanced_search/valuation.feature | 184 ++++++------------ 2 files changed, 77 insertions(+), 134 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/ValuationControl.java b/src/test/java/org/collectionspace/qa/records/ValuationControl.java index a4b3b1a..4ddcf68 100644 --- a/src/test/java/org/collectionspace/qa/records/ValuationControl.java +++ b/src/test/java/org/collectionspace/qa/records/ValuationControl.java @@ -4,17 +4,24 @@ public class ValuationControl extends Record { public ValuationControl() { - fieldSelectorByLabel.put("Amount", "csc-valuationcontrol-valueAmount"); - fieldSelectorByLabel.put("Currency", "csc-valuationcontrol-valueCurrency"); - fieldSelectorByLabel.put("Date", "csc-valuationcontrol-valueDate"); - fieldSelectorByLabel.put("Note", "csc-valuationcontrol-valueNote"); - fieldSelectorByLabel.put("Object Valuation Information", "csc-valuationcontrol-objectValuationInformation"); - fieldSelectorByLabel.put("Renewal Date", "csc-valuationcontrol-valueRenewalDate"); - fieldSelectorByLabel.put("Type", "csc-valuationcontrol-valueType"); - fieldSelectorByLabel.put("Valuation Control Reference Number", "csc-valuationcontrol-valuationcontrolRefNumber"); + fieldSelectorByLabel.put("Amount", "csc-valuationcontrol-valueAmount"); + fieldSelectorByLabel.put("Currency", "csc-valuationcontrol-valueCurrency"); + fieldSelectorByLabel.put("Date", "csc-valuationcontrol-valueDate"); + fieldSelectorByLabel.put("Note", "csc-valuationcontrol-valueNote"); + fieldSelectorByLabel.put("Object Valuation Information", "csc-valuationcontrol-objectValuationInformation"); + fieldSelectorByLabel.put("Renewal Date", "csc-valuationcontrol-valueRenewalDate"); + fieldSelectorByLabel.put("Valuation Control Reference Number", "csc-valuationcontrol-valuationcontrolRefNumber"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-valuationcontrol-updatedAtStart"); + fieldSelectorByLabel.put("Latest Modified Date", "csc-valuationcontrol-updatedAtEnd"); + fieldSelectorByLabel.put("Record last modified by", "csc-valuationcontrol-updatedBy"); + fieldSelectorByLabel.put("Earliest Date", "csc-valuationcontrol-valueDateStart"); + fieldSelectorByLabel.put("Latest Date", "csc-valuationcontrol-valueDateEnd"); + fieldSelectorByLabel.put("Earliest Renewal Date", "csc-valuationcontrol-valueRenewalDateStart"); + fieldSelectorByLabel.put("Latest Renewal Date", "csc-valuationcontrol-valueRenewalDateEnd"); + dropDownMap.put("Type", "csc-valuationcontrol-valueType"); - xpathMap.put("Source", "//*[@id=\"primaryTab\"]/div/div[3]/div[2]/div[2]/div[2]/div[1]/div[2]/input[2]"); - + xpathMap.put("Source", "//*[@id=\"primaryTab\"]/div/div[3]/div[2]/div[2]/div[2]/div[1]/div[2]/input[2]"); + xpathMap.put("Source Search", "//*[@class=\"cs-autocomplete-input\"]"); } } diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/valuation.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/valuation.feature index ff67a99..a8d552a 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/valuation.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/valuation.feature @@ -9,112 +9,83 @@ Feature: Advanced Search - Valuation # And selects the "Valuation Control" radio button on the Create New page # And clicks on the Create button Given user is on a blank "Valuation Control" record - Then the titlebar should contain "Valuation Control" - And enters "multi-love" in the "Valuation Control" "Valuation Control Reference Number" field + And enters "multilove" in the "Valuation Control" "Valuation Control Reference Number" field And enters "06-06-1666" in the "Valuation Control" "Date" field And enters "06-06-1666" in the "Valuation Control" "Renewal Date" field - # And clicks on the "Valuation Control" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row - # And selects "Current Value" from the "Valuation Control" "Type" dropdown - And enters "sarcastish" in the "Valuation Control" "Source" vocab field - # And adds "sarcastish" to "Local Persons" - # And enters "textbook" in the "Valuation Control" "Note" field - Given user is on a blank "Valuation Control" record - And clicks the "Save" button - Then the record is successfully saved - - And clicks the "Advanced Search" button - # Then the titlebar should contain "Advanced Search" - # And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And clicks on the "Advanced Search" "Type" field - - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row And selects "Current Value" from the "Valuation Control" "Type" dropdown - And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + And enters "sarcastish" in the "Valuation Control" "Source" autocomplete field + And enters "textbook" in the "Valuation Control" "Note" field + And clicks the "Save" button + # Then the record is successfully saved - Scenario: Search by ref number - Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "multi-love" in the "Valuation Control" "Valuation Control" field + And selects "Current Value" from the "Valuation Control" "Type" dropdown And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by ref number + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "1666-06-06" in the "Valuation Control" "Date" field + And enters "multilove" in the "Valuation Control" "Valuation Control Reference Number" field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by Renewal Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "1666-06-06" in the "Valuation Control" "Renewal Date" field + And enters "1666-06-06" in the "Valuation Control" "Earliest Date" field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by Source - Given user is on the "My CollectionSpace" page + # Scenario: Search by Renewal Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "sarcastish" in the "Valuation Control" "Source" vocab field - And clicks on "sarcastish" from autocomplete options + And enters "1666-06-06" in the "Valuation Control" "Earliest Renewal Date" field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by note - Given user is on the "My CollectionSpace" page + # Scenario: Search by Source + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "textbook" in the "Valuation Control" "Note" field + And enters "sarcastish" in the "Valuation Control" "Source Search" autocomplete field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by partial note - Given user is on the "My CollectionSpace" page + # Scenario: Search by note + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "textb*" in the "Valuation Control" "Note" field + And enters "textbook" in the "AdvancedSearch" "Keyword Search" field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" - Then close the browser + Then the search results should contain "multilove" + # Then close the browser - Scenario: Search by Modified Date - Given user is on the "My CollectionSpace" page + # Scenario: Search by Modified Date + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters today's date in the "Valuation Control" "Modified Date" field + And enters today's date in the "Valuation Control" "Earliest Modified Date" field And clicks the "Advanced Search search" button Then the search results should contain "multilove" - Then close the browser + # Then close the browser - Scenario: Search by username - Given user is on the "My CollectionSpace" page + # Scenario: Search by username + # Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown - And enters "admin@core.collectionspace.org" in the "GeneralPages" "Record last modified by" field + And enters "admin@core.collectionspace.org" in the "Valuation Control" "Record last modified by" field And clicks the "Advanced Search search" button - Then the search results should contain "multi-love" + Then the search results should contain "multilove" Then close the browser #Test2 @@ -123,57 +94,37 @@ Feature: Advanced Search - Valuation # And selects the "Valuation Control" radio button on the Create New page # And clicks on the Create button Given user is on a blank "Valuation Control" record - Then the titlebar should contain "Valuation Control" And enters "Extreme Wealth" in the "Valuation Control" "Valuation Control Reference Number" field - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And adds "Jane Doe" to "Local Persons" - # And clicks on the "Valuation Control" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "Jane Doe" in the "Valuation Control" "Source" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And enters "testtest" in the "Valuation Control" "Note" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Valuation Control" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Valuation Control" record - Then the titlebar should contain "Valuation Control" + And user is on a blank "Valuation Control" record And enters "Casual Cruelty" in the "Valuation Control" "Valuation Control Reference Number" field - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And adds "Jane Doe" to "Local Persons" - # And clicks on the "Valuation Control" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "Jane Doe" in the "Valuation Control" "Source" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And enters "testtest" in the "Valuation Control" "Note" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved # Given user is on the "Create New" page # And selects the "Valuation Control" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Valuation Control" record - Then the titlebar should contain "Valuation Control" + And user is on a blank "Valuation Control" record And enters "Unknown Mortal" in the "Valuation Control" "Valuation Control Reference Number" field - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And adds "Jane Doe" to "Local Persons" - # And clicks on the "Valuation Control" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Original Value" from dropdown in "Type" row + And enters "Jane Doe" in the "Valuation Control" "Source" autocomplete field And selects "Original Value" from the "Valuation Control" "Type" dropdown And enters "testtest" in the "Valuation Control" "Note" field And clicks the "Save" button - Then the record is successfully saved + # Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And clicks on "Jane Doe" from autocomplete options - # And clicks on the "Advanced Search" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "Jane Doe" in the "Valuation Control" "Source Search" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Extreme Wealth" @@ -181,14 +132,9 @@ Feature: Advanced Search - Valuation Then the search results should contain "Unknown Mortal" And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And clicks on "Jane Doe" from autocomplete options - # And clicks on the "Advanced Search" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "Jane Doe" in the "Valuation Control" "Source Search" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Extreme Wealth" @@ -200,15 +146,10 @@ Feature: Advanced Search - Valuation Scenario: Boolean and Keyword Search Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown And selects "any (OR)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "testtest" in the "AdvancedSearch" "search" field - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And clicks on "Jane Doe" from autocomplete options - # And clicks on the "Advanced Search" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "testtest" in the "AdvancedSearch" "Keyword Search" field + And enters "Jane Doe" in the "Valuation Control" "Source Search" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Extreme Wealth" @@ -216,15 +157,10 @@ Feature: Advanced Search - Valuation Then the search results should contain "Unknown Mortal" And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Valuation Control" from the "AdvancedSearch" "record type" dropdown And selects "all (AND)" from the "AdvancedSearch" "Field-based search" dropdown - And enters "testtest" in the "AdvancedSearch" "search" field - And enters "Jane Doe" in the "Valuation Control" "Source" vocab field - And clicks on "Jane Doe" from autocomplete options - # And clicks on the "Advanced Search" "Type" field - # Then a drop down list should appear in the "Type" row - # And selects "Current Value" from dropdown in "Type" row + And enters "testtest" in the "AdvancedSearch" "Keyword Search" field + And enters "Jane Doe" in the "Valuation Control" "Source Search" autocomplete field And selects "Current Value" from the "Valuation Control" "Type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Extreme Wealth" @@ -234,31 +170,31 @@ Feature: Advanced Search - Valuation Scenario: Record deletion Given user is on the "My CollectionSpace" page - And navigates to the record with identification number "multi-love" + And navigates to the record with identification number "multilove" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Work" deletion should be confirmed in a dialog + Then "Valuation Control" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "Extreme Wealth" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Work" deletion should be confirmed in a dialog + Then "Valuation Control" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "Casual Cruelty" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Work" deletion should be confirmed in a dialog + Then "Valuation Control" deletion should be confirmed in a dialog And clicks delete confirmation OK button And navigates to the record with identification number "Unknown Mortal" And clicks on the "Delete" button Then delete confirmation dialogue should appear And clicks the confirmation delete button - Then "Work" deletion should be confirmed in a dialog + Then "Valuation Control" deletion should be confirmed in a dialog And clicks delete confirmation OK button Then close the browser From fe05ce82851caf781440118d46b4a90cec98dc58 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 28 Jun 2016 19:26:59 -0700 Subject: [PATCH 07/12] CQA-56: Working version of this test plan --- .../org/collectionspace/qa/records/Place.java | 17 +++++++- .../qa/cucumber/advanced_search/place.feature | 40 +++---------------- 2 files changed, 22 insertions(+), 35 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Place.java b/src/test/java/org/collectionspace/qa/records/Place.java index a0b1cb8..db15517 100644 --- a/src/test/java/org/collectionspace/qa/records/Place.java +++ b/src/test/java/org/collectionspace/qa/records/Place.java @@ -3,6 +3,22 @@ public class Place extends Record { public Place(){ + fieldSelectorByLabel.put("Record last modified by", "csc-place-updatedBy"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-place-updatedAtStart"); + fieldSelectorByLabel.put("Latest Modified Date", "csc-place-updatedAtEnd"); + + dropDownMap.put("Status", "csc-placeAuthority-termStatus"); + dropDownMap.put("Language", "csc-placeAuthority-termLanguage"); + dropDownMap.put("Place type", "csc-place-placeType"); + + // And enters "Conyay" in the "Place" "Display Name" field + // And enters "RealFrend" in the "Place" "Name" field + // And enters "I love you honeybear" in the "Place" "Place note" field + // And enters "Travvy" in the "Place" "Owner" vocab field + // And adds "Travvy" to "Local Persons" + + xpathMap.put("Owner", "//*[@class=\"owner\"]/input[2]"); // When the tests run this element is NOT found for some reason + xpathMap.put("Owner Search", "//*[@id=\".csc-place-placeOwnerGroup\"]/input[2]"); // When the tests run this element is NOT found for some reason requiredMap.put("csc-placeAuthority-termDisplayName", "No place like Home"); @@ -42,7 +58,6 @@ public Place(){ fieldSelectorByLabel.put("Note", "csc-place-ownershipNote"); fieldSelectorByLabel.put("Note", "csc-placeAuthority-nameNote"); fieldSelectorByLabel.put("Object component type", "csc-hierarchy-narrowerContextType"); - fieldSelectorByLabel.put("Owner", "csc-place-owner"); fieldSelectorByLabel.put("Place Authority", "csc-place-placeAuthorityInformation"); fieldSelectorByLabel.put("Place Record Type", "csc-place-placeType"); fieldSelectorByLabel.put("Place Term Group(s)", "csc-place-placeAuthority"); diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/place.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/place.feature index de692b1..411cc3b 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/place.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/place.feature @@ -1,4 +1,5 @@ #Created by Forest Yang on 1/9/2016 +# Working as of June 28 2016 @advancedsearch Feature: Advanced Search - Place @@ -8,29 +9,17 @@ Feature: Advanced Search - Place # Given user is on the "Create New" page # And selects the "Place" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Place" record - Then the titlebar should contain "Place" + Given user is on a blank "Local Places" record And enters "Conyay" in the "Place" "Display Name" field And enters "RealFrend" in the "Place" "Name" field - # And clicks on the "Place" "Status" field - # Then a drop down list should appear in the "Status" row - # And selects "Under Review" from dropdown in "Status" row And selects "Under Review" from the "Place" "Status" dropdown - # And clicks on the "Place" "Language" field - # Then a drop down list should appear in the "Language" row - # And selects "Japanese" from dropdown in "Language" row And selects "Japanese" from the "Place" "Language" dropdown - # And clicks on the "Place" "Place type" field - # Then a drop down list should appear in the "Place type" row - # And selects "Borough" from dropdown in "Place type" row And selects "Borough" from the "Place" "Place type" dropdown And enters "I love you honeybear" in the "Place" "Place note" field - And enters "Travvy" in the "Place" "Owner" vocab field - And adds "Travvy" to "Local Persons" + And enters "Travvy" in the "Place" "Owner" autocomplete field And clicks the "Save" button Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown And enters "Conyay" in the "Place" "Display Name" field And clicks the "Advanced Search search" button @@ -40,7 +29,6 @@ Feature: Advanced Search - Place Scenario: Search by Name Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown And enters "RealFrend" in the "Place" "Name" field And clicks the "Advanced Search search" button @@ -50,11 +38,7 @@ Feature: Advanced Search - Place Scenario: Search by Status Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Status" field - # Then a drop down list should appear in the "Status" row - # And selects "Under Review" from dropdown in "Status" field And selects "Under Review" from the "Place" "Status" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Conyay" @@ -63,11 +47,7 @@ Feature: Advanced Search - Place Scenario: Search by Language Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Language" field - # Then a drop down list should appear in the "Language" row - # And selects "Japanese" from dropdown in "Language" row And selects "Japanese" from the "Place" "Language" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Conyay" @@ -76,11 +56,7 @@ Feature: Advanced Search - Place Scenario: Search by place type Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Place type" field - # Then a drop down list should appear in the "Place type" row - # And selects "Borough" from dropdown in "Place type" row And selects "Borough" from the "Place" "Place type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Conyay" @@ -89,7 +65,6 @@ Feature: Advanced Search - Place Scenario: Search by Place note Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown And enters "I love you honeybear" in the "Place" "Place note" field And clicks the "Advanced Search search" button @@ -99,19 +74,17 @@ Feature: Advanced Search - Place Scenario: Search by owner Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown - And enters "Travvy" in the "Place" "Owner" vocab field - And clicks on "Travvy" from autocomplete options + And enters "Travvy" in the "Place" "Owner Search" autocomplete field + And clicks the "Advanced Search search" button Then the search results should contain "Conyay" Then close the browser Scenario: Search by Modified Date Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown - And enters today's date in the "GeneralPages" "Earliest Modified Date" field + And enters today's date in the "Place" "Earliest Modified Date" field And clicks the "Advanced Search search" button Then the search results should contain "Conyay" Then close the browser @@ -119,7 +92,6 @@ Feature: Advanced Search - Place Scenario: Search by username Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Place" from the "AdvancedSearch" "record type" dropdown And enters "admin@core.collectionspace.org" in the "Place" "Record last modified by" field And clicks the "Advanced Search search" button From aa19d916947217b9bf6d1a9032718ffe6d54c087 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 28 Jun 2016 20:34:23 -0700 Subject: [PATCH 08/12] CQA-21: Updated Version of this test plan-- not fully working --- .../collectionspace/qa/records/Citation.java | 10 +- .../collectionspace/qa/utils/Utilities.java | 6 + .../citation.feature | 121 ++++++++++++------ 3 files changed, 93 insertions(+), 44 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Citation.java b/src/test/java/org/collectionspace/qa/records/Citation.java index 90f3e8e..a632b73 100644 --- a/src/test/java/org/collectionspace/qa/records/Citation.java +++ b/src/test/java/org/collectionspace/qa/records/Citation.java @@ -4,6 +4,13 @@ public class Citation extends Record { public Citation() { + dropDownMap.put("Language", "csc-citationAuthority-termLanguage"); + dropDownMap.put("Status", "csc-citationAuthority-termStatus"); + dropDownMap.put("Term Type", "csc-citationAuthority-termType"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-collection-object-updatedAtStart"); + fieldSelectorByLabel.put("Latest Modified Date", "csc-collection-object-updatedAtEnd"); + fieldSelectorByLabel.put("Record last modified by", "csc-collection-object-updatedBy"); + requiredMap.put("csc-citationAuthority-termDisplayName", "A citation like no other"); // ----- Start of entries generated by an automated script ----- @@ -27,7 +34,6 @@ public Citation() { fieldSelectorByLabel.put("Formatted Display Name", "csc-citationAuthority-termFormattedDisplayName"); fieldSelectorByLabel.put("Full Citation", "csc-citationAuthority-termFullCitation"); fieldSelectorByLabel.put("Issue", "csc-citationAuthority-termIssue"); - fieldSelectorByLabel.put("Language", "csc-citationAuthority-termLanguage"); fieldSelectorByLabel.put("Narrower Context", "csc-hierarchy-narrowerContext"); fieldSelectorByLabel.put("Note", "csc-citation-note"); fieldSelectorByLabel.put("Object component type", "csc-hierarchy-narrowerContextType"); @@ -48,11 +54,9 @@ public Citation() { fieldSelectorByLabel.put("Source Detail", "csc-citationAuthority-termSourceDetail"); fieldSelectorByLabel.put("Source ID", "csc-citationAuthority-termSourceID"); fieldSelectorByLabel.put("Source Note", "csc-citationAuthority-termSourceNote"); - fieldSelectorByLabel.put("Status", "csc-citationAuthority-termStatus"); fieldSelectorByLabel.put("Subtitle", "csc-citationAuthority-termSubTitle"); fieldSelectorByLabel.put("Term", "csc-citationAuthority-termName"); fieldSelectorByLabel.put("Term Flag", "csc-citationAuthority-termFlag"); - fieldSelectorByLabel.put("Term Type", "csc-citationAuthority-termType"); fieldSelectorByLabel.put("Title", "csc-citationAuthority-termTitle"); fieldSelectorByLabel.put("Type", "csc-citation-relationType"); fieldSelectorByLabel.put("Type", "csc-citation-type"); diff --git a/src/test/java/org/collectionspace/qa/utils/Utilities.java b/src/test/java/org/collectionspace/qa/utils/Utilities.java index e92bf64..1728b78 100644 --- a/src/test/java/org/collectionspace/qa/utils/Utilities.java +++ b/src/test/java/org/collectionspace/qa/utils/Utilities.java @@ -488,6 +488,9 @@ record = new AdvancedSearch(); case "AdvancedSearchVocabulary": record = new AdvancedSearchVocabulary(); break; + case "Citation": + record = new Citation(); + break; case "Condition Check": record = new ConditionCheck(); break; @@ -557,6 +560,9 @@ record = new SupplementarySecondary(); case "SupplementaryPrimary": record = new SupplementaryPrimary(); break; + case "Storage Location": + record = new StorageLocation(); + break; case "Valuation Control": record = new ValuationControl(); break; diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/citation.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/citation.feature index d5e9d85..1d48daf 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/citation.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/citation.feature @@ -1,43 +1,82 @@ # Created by Regina Xu on 2/26/16 +# CQA-21 +# NOTE: Commented-Out Parts not working for some reason. The WebElement can't be found. +@advancesearch +Feature: Advanced Search - Citation -@advancedsearchvocab -Feature: Advanced Search - Citation - -## The remainder of this feature file, below, needs to be converted from narrative to steps -# -# Scenario 1: Advanced Search Fields -# -# Actions: -# Create a new Citation record -# Fill in the following fields: -# Display Name (remember what you entered) -# Full Citation -# Language -# Status -# Term Type -# Title -# Save the record -# Print out the record to remember what you entered in each field -# Navigate to advanced search via the link next to the search field in the upper right hand corner -# Select Citation in the record type drop down -# Enter what you previously entered into the Display Name field in the record, into the Display Name field in Advanced Search -# Click search -# -# Expected: -# The Citation record you just created should appear in the search results -# -# Actions: -# Do this for each of the fields listed above, field by field, by erasing / un-selecting the value you entered into the previous field, and entering the value in the next field. -# Expected: -# The Citation record you just created should appear in the search results -# -# Actions: -# Search the Record Last Modified By field for your username (e.g. admin@core.collectionspace.org) -# Expected: -# The Citation record you just created should appear in the search results -# -# Actions: -# Search the Modified Date field for today's date -# Expected: -# The Citation record you just created should appear in the search results -# (Note, 2/2016: Be aware of the way that Collectionspace handles the time difference between your location and UTC. I last modified a record on 2016-02-04T20:17:36:927 PST, but CSpace recorded the modification at 2016-02-05T00:17:36:927Z, i.e., just after midnight the next day. An advanced search on modified date - latest date February 4, 2016 does not detect the record. This is expected CSpace behavior, though confusing to users, perhaps. - Rick) + Scenario: Advanced Search Fields + Given user is on a blank "Local Citations" record + And enters "CQA21" in the "Citation" "Display Name" field + And enters "CQA21 Citation" in the "Citation" "Full Citation" field + And selects "French" from the "Citation" "Language" dropdown + And selects "Accepted" from the "Citation" "Status" dropdown + And selects "Biography" from the "Citation" "Term Type" dropdown + And enters "CQA21 Title" in the "Citation" "Title" field + And clicks the "Save" button + + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And enters "CQA21" in the "Citation" "Display Name" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + Then close the browser + + Scenario: Search by fields + Given user is on the "My CollectionSpace" page + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And enters "CQA21 Citation" in the "Citation" "Full Citation" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And selects "French" from the "Citation" "Language" dropdown + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And selects "Accepted" from the "Citation" "Status" dropdown + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And selects "Biography" from the "Citation" "Term Type" dropdown + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + + And clicks the "Advanced Search" button + And selects "Citation" from the "AdvancedSearch" "record type" dropdown + And enters "CQA21 Title" in the "Citation" "Title" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA21" + Then close the browser + + + # Scenario: Search by last modified by username + # Given user is on the "My CollectionSpace" page + # And clicks the "Advanced Search" button + # And selects "Citation" from the "AdvancedSearch" "record type" dropdown + # And enters "admin@core.collectionspace.org" in the "Citation" "Record last modified by" field + # And clicks the "Advanced Search search" button + # Then the search results should contain "CQA21" + + # Scenario: Search by last modified date + # And clicks the "Advanced Search" button + # And selects "Citation" from the "AdvancedSearch" "record type" dropdown + # And enters today's date in the "Citation" "Earliest Modified Date" field + # And clicks the "Advanced Search search" button + # Then the search results should contain "CQA21" + # Then close the browser + + Scenario: Record deletion + Given user is on the "My CollectionSpace" page + And navigates to the record with identification number "CQA21" + And clicks on the "Delete" button + Then delete confirmation dialogue should appear + And clicks the confirmation delete button + Then "Citation" deletion should be confirmed in a dialog + And clicks delete confirmation OK button + Then close the browser From 269c3c049085e4baeb4e1b7bdaa6d000780d1e37 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Tue, 28 Jun 2016 21:19:42 -0700 Subject: [PATCH 09/12] CQA-58: Working version of this test plan --- .../org/collectionspace/qa/records/Work.java | 17 +++-- .../collectionspace/qa/utils/Utilities.java | 3 + .../qa/cucumber/advanced_search/work.feature | 62 +++---------------- 3 files changed, 23 insertions(+), 59 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Work.java b/src/test/java/org/collectionspace/qa/records/Work.java index 69ed493..10872bf 100644 --- a/src/test/java/org/collectionspace/qa/records/Work.java +++ b/src/test/java/org/collectionspace/qa/records/Work.java @@ -3,7 +3,15 @@ public class Work extends Record { public Work() { + dropDownMap.put("Language", "csc-workAuthority-termLanguage"); + dropDownMap.put("Status", "csc-workAuthority-termStatus"); + dropDownMap.put("Work Record Type", "csc-work-workType"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-work-updatedAtStart"); + fieldSelectorByLabel.put("Record last modified by", "csc-work-updatedBy"); + + xpathMap.put("Creator", "//*[@id=\"repeat::\"]/td[2]/input[2]"); + xpathMap.put("Creator Search", "//*[@id=\".csc-work-creatorGroup\"]/input[2]"); requiredMap.put("csc-workAuthority-termDisplayName", "To work, to work we go"); // ----- Start of entries generated by an automated script ----- @@ -13,13 +21,12 @@ public Work() { fieldSelectorByLabel.put("Broader Context", "csc-hierarchy-broaderContext"); fieldSelectorByLabel.put("Broader object type", "csc-hierarchy-broaderContextType"); - fieldSelectorByLabel.put("Creator", "csc-work-creator"); fieldSelectorByLabel.put("Creator type", "csc-work-creatorType"); fieldSelectorByLabel.put("Display Name", "csc-workAuthority-termDisplayName"); fieldSelectorByLabel.put("Equivalent Context", "csc-hierarchy-equivalentContexts"); fieldSelectorByLabel.put("Formatted Display Name", "csc-workAuthority-termFormattedDisplayName"); fieldSelectorByLabel.put("History notes", "csc-work-workHistoryNote"); - fieldSelectorByLabel.put("Language", "csc-workAuthority-termLanguage"); + // fieldSelectorByLabel.put("Language", "csc-workAuthority-termLanguage"); fieldSelectorByLabel.put("Narrower Context", "csc-hierarchy-narrowerContext"); fieldSelectorByLabel.put("Object component type", "csc-hierarchy-narrowerContextType"); fieldSelectorByLabel.put("Pref for Lang", "csc-workAuthority-termPrefForLang"); @@ -31,12 +38,12 @@ public Work() { fieldSelectorByLabel.put("Source Detail", "csc-workAuthority-termSourceDetail"); fieldSelectorByLabel.put("Source Note", "csc-workAuthority-termSourceNote"); fieldSelectorByLabel.put("Source Unique ID", "csc-workAuthority-termSourceID"); - fieldSelectorByLabel.put("Status", "csc-workAuthority-termStatus"); + // fieldSelectorByLabel.put("Status", "csc-workAuthority-termStatus"); fieldSelectorByLabel.put("Term", "csc-workAuthority-termName"); fieldSelectorByLabel.put("Term Flag", "csc-workAuthority-termFlag"); fieldSelectorByLabel.put("Term Type", "csc-workAuthority-termType"); fieldSelectorByLabel.put("Work Information", "csc-work-workAuthorityInformation"); - fieldSelectorByLabel.put("Work Record Type", "csc-work-workType"); + // fieldSelectorByLabel.put("Work Record Type", "csc-work-workType"); fieldSelectorByLabel.put("Work Term Group(s)", "csc-work-workAuthority"); fieldSelectorByLabel.put("Work date", "csc-work-workDateGroup"); @@ -68,6 +75,6 @@ public Work() { // Not found: text label for message key 'workDateGroup-workDateLabel' // ----- End of entries generated by an automated script ----- - + } } diff --git a/src/test/java/org/collectionspace/qa/utils/Utilities.java b/src/test/java/org/collectionspace/qa/utils/Utilities.java index 1728b78..634c701 100644 --- a/src/test/java/org/collectionspace/qa/utils/Utilities.java +++ b/src/test/java/org/collectionspace/qa/utils/Utilities.java @@ -569,6 +569,9 @@ record = new ValuationControl(); case "VocabularyTerms": record = new VocabularyTerms(); break; + case "Work": + record = new Work(); + break; default: throw new Exception(recordType + ": No classes of that Type known"); } diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/work.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/work.feature index 0a54123..cf7ccf3 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/work.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search/work.feature @@ -1,4 +1,5 @@ -#Created by Forest Yang on 1/8/2016 +# Created by Forest Yang on 1/8/2016 +# Working as of June 28th 2016 @advancedsearch Feature: Advanced Search - Work @@ -8,27 +9,16 @@ Feature: Advanced Search - Work # Given user is on the "Create New" page # And selects the "Work" radio button on the Create New page # And clicks on the Create button - Given user is on a blank "Work" record - Then the titlebar should contain "Work" + Given user is on a blank "Local Works" record And enters "Carly" in the "Work" "Display Name" field - # And clicks on the "Work" "Language" field - # Then a drop down list should appear in the "Language" row - # And selects "Ancient Greek" from dropdown in "Language" row And selects "Ancient Greek" from the "Work" "Language" dropdown - # And clicks on the "Work" "Status" field - # Then a drop down list should appear in the "Status" field - # And selects "Complete" from dropdown in "Status" row And selects "Complete" from the "Work" "Status" dropdown - # And clicks on the "Work" "Work type" field - # Then a drop down list should appear in the "Work type" row - And selects "Built" from the "Work" "Work type" dropdown - And enters "Rae" in the "Work" "Creator" vocab field - And adds "Rae" to "Local Persons" + And selects "Built" from the "Work" "Work Record Type" dropdown + And enters "Rae" in the "Work" "Creator" autocomplete field And clicks the "Save" button Then the record is successfully saved And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown And enters "Carly" in the "Work" "Display Name" field And clicks the "Advanced Search search" button @@ -38,11 +28,7 @@ Feature: Advanced Search - Work Scenario: Search by language Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Language" field - # Then a drop down list should appear in the "Language" row - # And selects "Ancient Greek" from dropdown in "Language" row And selects "Ancient Greek" from the "Work" "Language" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Carly" @@ -51,11 +37,7 @@ Feature: Advanced Search - Work Scenario: Search by Status Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Status" field - # Then a drop down list should appear in the "Language" row - # And selects "Complete" from dropdown in "Status" row And selects "Complete" from the "Work" "Status" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Carly" @@ -64,12 +46,8 @@ Feature: Advanced Search - Work Scenario: Search by Work type Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown - # And clicks on the "Advanced Search" "Work type" field - # Then a drop down list should appear in the "Work type" row - # And selects "Built" from dropdown in "Work type" row - And selects "Built" from the "Work" "Work type" dropdown + And selects "Built" from the "Work" "Work Record Type" dropdown And clicks the "Advanced Search search" button Then the search results should contain "Carly" Then close the browser @@ -77,10 +55,8 @@ Feature: Advanced Search - Work Scenario: Search by Creator Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown - And enters "Rae" in the "Work" "Creator" vocab field - And clicks on "Rae" from autocomplete options + And enters "Rae" in the "Work" "Creator Search" autocomplete field And clicks the "Advanced Search search" button Then the search results should contain "Carly" Then close the browser @@ -88,9 +64,8 @@ Feature: Advanced Search - Work Scenario: Search by Modified Date Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown - And enters today's date in the "GeneralPages" "Earliest Modified Date" field + And enters today's date in the "Work" "Earliest Modified Date" field And clicks the "Advanced Search search" button Then the search results should contain "Carly" Then close the browser @@ -98,7 +73,6 @@ Feature: Advanced Search - Work Scenario: Search by username Given user is on the "My CollectionSpace" page And clicks the "Advanced Search" button - Then the titlebar should contain "Advanced Search" And selects "Work" from the "AdvancedSearch" "record type" dropdown And enters "admin@core.collectionspace.org" in the "Work" "Record last modified by" field And clicks the "Advanced Search search" button @@ -114,23 +88,3 @@ Feature: Advanced Search - Work Then "Work" deletion should be confirmed in a dialog And clicks delete confirmation OK button Then close the browser - - # Scenario: Search by Modified Date - # Given user is on the "My CollectionSpace" page - # And clicks the "Advanced Search" button - # Then the titlebar should contain "Advanced Search" - # And selects "Work" from the "AdvancedSearch" "record type" dropdown - # And enters today's date in the "Modified Date" field - # And clicks the "Advanced Search search" button - # Then the search results should contain "textbook" - # Then close the browser - # - # Scenario: Search by username - # Given user is on the "My CollectionSpace" page - # And clicks the "Advanced Search" button - # Then the titlebar should contain "Advanced Search" - # And selects "Work" from the "AdvancedSearch" "record type" dropdown - # And enters username in the "Advanced Search" "Record last modified by" field - # And clicks the "Advanced Search search" button - # Then the search results should contain "textbook" - # Then close the browser From 71897f593385cee3721c2509b4fd3a6082d2ccd4 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Wed, 29 Jun 2016 01:29:31 -0700 Subject: [PATCH 10/12] CQA-51: Working version of this test plan --- .../collectionspace/qa/records/Concept.java | 12 ++- .../collectionspace/qa/utils/Utilities.java | 3 + .../concept.feature | 73 +++++++++++++++++-- 3 files changed, 79 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Concept.java b/src/test/java/org/collectionspace/qa/records/Concept.java index 4134e37..1d3745e 100644 --- a/src/test/java/org/collectionspace/qa/records/Concept.java +++ b/src/test/java/org/collectionspace/qa/records/Concept.java @@ -5,6 +5,10 @@ public class Concept extends Record { public Concept() { requiredMap.put("csc-ConceptAuthority-termDisplayName", "A very concepty concept"); + dropDownMap.put("Language", "csc-conceptAuthority-termLanguage"); + dropDownMap.put("Status", "csc-conceptAuthority-termStatus"); + fieldSelectorByLabel.put("Record last modified by","csc-concept-updatedBy"); + fieldSelectorByLabel.put("Earliest Modified Date","csc-concept-updatedAtStart"); // ----- Start of entries generated by an automated script ----- // @@ -27,7 +31,7 @@ public Concept() { fieldSelectorByLabel.put("Equivalent Context", "csc-hierarchy-equivalentContexts"); fieldSelectorByLabel.put("Formatted Display Name", "csc-conceptAuthority-termFormattedDisplayName"); fieldSelectorByLabel.put("Historical Flag", "csc-conceptAuthority-historicalStatus"); - fieldSelectorByLabel.put("Language", "csc-conceptAuthority-termLanguage"); + // fieldSelectorByLabel.put("Language", "csc-conceptAuthority-termLanguage"); fieldSelectorByLabel.put("Narrower Context", "csc-hierarchy-narrowerContext"); fieldSelectorByLabel.put("Object component type", "csc-hierarchy-narrowerContextType"); fieldSelectorByLabel.put("Pref for Lang", "csc-conceptAuthority-termPrefForLang"); @@ -40,7 +44,7 @@ public Concept() { fieldSelectorByLabel.put("Source Detail", "csc-conceptAuthority-termSourceDetail"); fieldSelectorByLabel.put("Source ID", "csc-conceptAuthority-termSourceID"); fieldSelectorByLabel.put("Source Note", "csc-conceptAuthority-termSourceNote"); - fieldSelectorByLabel.put("Status", "csc-conceptAuthority-termStatus"); + // fieldSelectorByLabel.put("Status", "csc-conceptAuthority-termStatus"); fieldSelectorByLabel.put("Term", "csc-conceptAuthority-termName"); fieldSelectorByLabel.put("Term Flag", "csc-conceptAuthority-termFlag"); fieldSelectorByLabel.put("Term Type", "csc-conceptAuthority-termType"); @@ -74,7 +78,7 @@ public Concept() { // Not found: text label for message key 'conceptAuthority-conceptTermGroupLabel' // Not found: text label for message key 'conceptAuthority-termInformationLabel' - // ----- End of entries generated by an automated script ----- - + // ----- End of entries generated by an automated script ----- + } } diff --git a/src/test/java/org/collectionspace/qa/utils/Utilities.java b/src/test/java/org/collectionspace/qa/utils/Utilities.java index 634c701..5181b3a 100644 --- a/src/test/java/org/collectionspace/qa/utils/Utilities.java +++ b/src/test/java/org/collectionspace/qa/utils/Utilities.java @@ -491,6 +491,9 @@ record = new AdvancedSearchVocabulary(); case "Citation": record = new Citation(); break; + case "Concept": + record = new Concept(); + break; case "Condition Check": record = new ConditionCheck(); break; diff --git a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/concept.feature b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/concept.feature index 3c2d61d..2cc9421 100644 --- a/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/concept.feature +++ b/src/test/resources/org/collectionspace/qa/cucumber/advanced_search_vocabulary/concept.feature @@ -1,8 +1,71 @@ -# Created by xxx on mo/day/2015 +# Created by Cesar Villalobos on 06/28/2016 @advancedsearchvocab -Feature: #Enter feature name here - # Enter feature description here +Feature: Searching a new concept record + # Enter feature description here - Scenario: # Enter scenario name here - # Enter steps here + Scenario: Record creation and search by Display Name + Given user is on a blank "Associated Concepts" record + And enters "CQA51" in the "Concept" "Display Name" field + And selects "French" from the "Concept" "Language" dropdown + And selects "Accepted" from the "Concept" "Status" dropdown + And enters "CQA51 Term" in the "Concept" "Term" field + And clicks the "Save" button + + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And enters "CQA51" in the "Concept" "Display Name" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + Then close the browser + + Scenario: Search by fields + Given user is on a blank "Associated Concepts" record + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And enters "CQA51" in the "Concept" "Display Name" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And selects "French" from the "Concept" "Language" dropdown + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And selects "Accepted" from the "Concept" "Status" dropdown + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And enters "CQA51 Term" in the "Concept" "Term" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + Then close the browser + + Scenario: Search by today's date and username + Given user is on a blank "Associated Concepts" record + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And enters "admin@core.collectionspace.org" in the "Concept" "Record last modified by" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + + And clicks the "Advanced Search" button + And selects "Concept" from the "AdvancedSearch" "record type" dropdown + And enters today's date in the "Concept" "Earliest Modified Date" field + And clicks the "Advanced Search search" button + Then the search results should contain "CQA51" + Then close the browser + + Scenario: Record Deletion + And navigates to the record with identification number "CQA51" + And clicks on the "Delete" button + Then delete confirmation dialogue should appear + And clicks the confirmation delete button + Then "Concept" deletion should be confirmed in a dialog + And clicks delete confirmation OK button + Then close the browser From 2b3f37695ce8d8704992436193932a2393985670 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 16 Jul 2016 12:26:04 -0700 Subject: [PATCH 11/12] CQA-72: Added mappings for Cataloging tab --- .../qa/records/Cataloging.java | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/Cataloging.java b/src/test/java/org/collectionspace/qa/records/Cataloging.java index 07087d9..26a9a12 100644 --- a/src/test/java/org/collectionspace/qa/records/Cataloging.java +++ b/src/test/java/org/collectionspace/qa/records/Cataloging.java @@ -3,33 +3,6 @@ public class Cataloging extends Record { public Cataloging() { - fieldSelectorByLabel.put("Identification Number", "csc-object-identification-object-number"); - fieldSelectorByLabel.put("Object Name", "csc-object-identification-object-name"); - fieldSelectorByLabel.put("Title", "csc-object-identification-object-title"); - fieldSelectorByLabel.put("Copy Number", "csc-object-description-copy-number"); - fieldSelectorByLabel.put("Edition Number", "csc-object-description-edition-number"); - fieldSelectorByLabel.put("Inscription Method", "csc-object-description-inscription-content-method"); // Textual - fieldSelectorByLabel.put("Inscription Method", "csc-object-description-inscription-description-method"); // Non-Textual - fieldSelectorByLabel.put("Material", "csc-object-description-material"); - fieldSelectorByLabel.put("Style", "csc-object-description-style"); - fieldSelectorByLabel.put("Production Date", "csc-objectProductionDateGroup-objectProductionDate"); // Will have to fix all date fields eventually - fieldSelectorByLabel.put("Production people", "csc-object-production-people"); - fieldSelectorByLabel.put("Production place", "csc-object-production-place"); - fieldSelectorByLabel.put("Technique", "csc-object-production-technique"); - fieldSelectorByLabel.put("Field collection event name", "csc-collection-object-fieldColEventName"); - - - - xpathMap.put("Inscriber Search" ,"//*[@id=\".csc-collection-object-nonTextualInscriptionGroup\"]/div/div[1]/div/div[2]/input[2]"); - xpathMap.put("Inscriber" ,"//*[@id=\".csc-collection-object-nonTextualInscriptionGroup\"]/div[2]/div[2]/div[1]/div[1]/div[2]/input[2]"); // Non-Textual Inscription Inscriber - xpathMap.put("Inscriber" ,"//*[@id=\".csc-collection-object-textualInscriptionGroup\"]/div[2]/div[2]/div[1]/div[1]/div[2]/input[2]"); // Textual Inscription Inscriber - xpathMap.put("Production organization Search" ,"//*[@id=\".csc-collection-object-objectProductionOrganizationGroup\"]/input[2]"); - xpathMap.put("Production organization" ,"//*[@id=\"repeat::-14\"]/td[2]/input[2]"); - xpathMap.put("Production person Search" ,"//*[@id=\".csc-collection-object-objectProductionPersonGroup\"]/input[2]"); - xpathMap.put("Production person" ,"//*[@id=\"repeat::-12\"]/td[2]/input[2]"); - - - dropDownMap.put("Collection" , "csc-object-identification-collection"); dropDownMap.put("Form" , "csc-object-description-form"); dropDownMap.put("Object Component Name" , "csc-object-description-object-component-name"); @@ -40,6 +13,37 @@ public Cataloging() { dropDownMap.put("Sex" , "csc-object-description-sex"); dropDownMap.put("Technical Attribute" , "csc-object-description-technical-attribute"); + fieldSelectorByLabel.put("Brief Description", "csc-object-identification-brief-description"); + fieldSelectorByLabel.put("Copy Number", "csc-object-description-copy-number"); + fieldSelectorByLabel.put("Distinguishing Features", "csc-object-identification-distinguishing-features"); + fieldSelectorByLabel.put("Edition Number", "csc-object-description-edition-number"); + fieldSelectorByLabel.put("Field collection event name", "csc-collection-object-fieldColEventName"); + fieldSelectorByLabel.put("Identification Number", "csc-object-identification-object-number"); + fieldSelectorByLabel.put("Inscription Method Search", "csc-object-description-inscription-description-method"); + fieldSelectorByLabel.put("Material", "csc-object-description-material"); + fieldSelectorByLabel.put("Non-Textual Inscription Method", "csc-object-description-inscription-description-method"); // Non-Textual + fieldSelectorByLabel.put("Object Name", "csc-object-identification-object-name"); + fieldSelectorByLabel.put("Production Date", "csc-objectProductionDateGroup-objectProductionDate"); // Will have to fix all date fields eventually + fieldSelectorByLabel.put("Production people", "csc-object-production-people"); + fieldSelectorByLabel.put("Production place", "csc-object-production-place"); + fieldSelectorByLabel.put("Style", "csc-object-description-style"); + fieldSelectorByLabel.put("Technique", "csc-object-production-technique"); + fieldSelectorByLabel.put("Textual Inscription Method", "csc-object-description-inscription-content-method"); // Textual + fieldSelectorByLabel.put("Title", "csc-object-identification-object-title"); + + xpathMap.put("Earliest/Single Production Date Day", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr/td[4]/input"); + xpathMap.put("Earliest/Single Production Date Month", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr/td[3]/input"); + xpathMap.put("Earliest/Single Production Date Year", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr/td[2]/input"); + xpathMap.put("Inscriber Search", "//*[@id=\".csc-collection-object-nonTextualInscriptionGroup\"]/div/div[1]/div/div[2]/input[2]"); + xpathMap.put("Non-Textual Inscriber", "//*[@id=\".csc-collection-object-nonTextualInscriptionGroup\"]/div[2]/div[2]/div[1]/div[1]/div[2]/input[2]"); // Non-Textual Inscription Inscriber + xpathMap.put("Textual Inscriber", "//*[@id=\".csc-collection-object-textualInscriptionGroup\"]/div[2]/div[2]/div[1]/div[1]/div[2]/input[2]"); // Textual Inscription Inscriber + xpathMap.put("Latest Production Date Day", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr[2]/td[4]/input"); + xpathMap.put("Latest Production Date Month", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr[2]/td[3]/input"); + xpathMap.put("Latest Production Date Year", "//*[@id=\"all-content\"]/div/div/div/div/div/div[2]/div[2]/div/div[3]/div[3]/div[2]/div/div/div/div[2]/div/ul/li/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/input"); + xpathMap.put("Production organization Search", "//*[@id=\".csc-collection-object-objectProductionOrganizationGroup\"]/input[2]"); + xpathMap.put("Production organization", "//*[@id=\"repeat::-14\"]/td[2]/input[2]"); + xpathMap.put("Production person Search", "//*[@id=\".csc-collection-object-objectProductionPersonGroup\"]/input[2]"); + xpathMap.put("Production person", "//*[@id=\"repeat::-12\"]/td[2]/input[2]"); } } From 94a110339eaf1dd13f25604e0af371ce08cbbea0 Mon Sep 17 00:00:00 2001 From: cesarvh Date: Sat, 16 Jul 2016 12:26:56 -0700 Subject: [PATCH 12/12] CQA-57: Added mappings for Storage Location --- .../collectionspace/qa/records/StorageLocation.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/collectionspace/qa/records/StorageLocation.java b/src/test/java/org/collectionspace/qa/records/StorageLocation.java index ff19edc..2924c79 100644 --- a/src/test/java/org/collectionspace/qa/records/StorageLocation.java +++ b/src/test/java/org/collectionspace/qa/records/StorageLocation.java @@ -4,6 +4,12 @@ public class StorageLocation extends Record { public StorageLocation() { + dropDownMap.put("Term Type", "csc-locationAuthority-termType"); + dropDownMap.put("Term Status", "csc-locationAuthority-termStatus"); + dropDownMap.put("Language", "csc-locationAuthority-termLanguage"); + fieldSelectorByLabel.put("Earliest Modified Date", "csc-location-updatedAtStart"); + fieldSelectorByLabel.put("Record last modified by", "csc-location-updatedBy"); + requiredMap.put("csc-locationAuthority-termDisplayName", "A Storage Location among the stars"); // ----- Start of entries generated by an automated script ----- @@ -21,7 +27,6 @@ public StorageLocation() { fieldSelectorByLabel.put("Display Name", "csc-locationAuthority-termDisplayName"); fieldSelectorByLabel.put("Equivalent Context", "csc-hierarchy-equivalentContexts"); fieldSelectorByLabel.put("Formatted Display Name", "csc-locationAuthority-termFormattedDisplayName"); - fieldSelectorByLabel.put("Language", "csc-locationAuthority-termLanguage"); fieldSelectorByLabel.put("Location Term Group(s)", "csc-location-preferredLocation"); fieldSelectorByLabel.put("Name", "csc-locationAuthority-termName"); fieldSelectorByLabel.put("Narrower Context", "csc-hierarchy-narrowerContext"); @@ -37,8 +42,6 @@ public StorageLocation() { fieldSelectorByLabel.put("Storage Location Information", "csc-location-locationTermInformation"); fieldSelectorByLabel.put("Storage Location Record Type", "csc-location-locationType"); fieldSelectorByLabel.put("Term Flag", "csc-locationAuthority-termFlag"); - fieldSelectorByLabel.put("Term Status", "csc-locationAuthority-termStatus"); - fieldSelectorByLabel.put("Term Type", "csc-locationAuthority-termType"); // Entries above with duplicate text labels, to be checked by a human. // @@ -67,6 +70,6 @@ public StorageLocation() { // Not found: text label for message key 'locationAuthority-termInformationLabel' // ----- End of entries generated by an automated script ----- - + } }