Commit 8b385239 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review
Browse files

Merge "Bug 1788509 When doing self import the locked fields will only show...

Merge "Bug 1788509 When doing self import the locked fields will only show 'ignore' radio button option"
parents 0e154cee bc331ef8
......@@ -9,61 +9,65 @@
//OR
//'Groups dropdown' => array("//li[@class='managegroups']", "xpath_element"),
define ("LOCATOR_CONSTANTS", json_encode(array(
'Admin home sub-menu' => array(".adminhome", "css_element"),
'Arrow-bar nav' => array(".arrow-bar", "css_element"),
'My portfolios' => array(".bt-myviews", "css_element"),
'Latest changes I can view' => array(".bt-newviews", "css_element"),
'Resume field block' => array(".bt-resumefield", "css_element"),
'Watched pages' => array(".bt-watchlist", "css_element"),
'Select' => array(".btn[title='Select']", "css_element"),
'Comment preview' => array(".commentreplyview", "css_element"),
'Comment text' => array(".comment-text", "css_element"),
'Extensions sub-menu' => array(".configextensions ul", "css_element"),
'Configure site sub-menu' => array(".configsite", "css_element"),
'Users sub-menu' => array(".configusers", "css_element"),
'Content sub-menu' => array(".content", "css_element"),
'Comment feedbacktable' => array(".feedbacktable", "css_element"),
'File download heading 1' => array(".filedownload-item:nth-of-type(1)>h4", "css_element"),
'File download heading 2' => array(".filedownload-item:nth-of-type(2)>h4", "css_element"),
'Filelist table' => array(".filelist", "css_element"),
'Footer' => array(".footer", "css_element"),
'Pages and Collections boxes' => array(".grouppageswrap", "css_element"),
'Groups sub-menu' => array(".groups", "css_element"),
'Admin Groups sub-menu' => array(".managegroups ul", "css_element"),
'Institutions sub-menu' => array(".manageinstitutions ul", "css_element"),
'Options dialog' => array(".modal-header", "css_element"),
'Portfolio sub-menu' => array(".myportfolio", "css_element"),
'Web services sub-menu' => array(".webservices", "css_element"),
'H1 heading' => array("h1", "css_element"),
'Collections text-box' => array(".select2-selection__rendered", "css_element"),
'Videojs time remaining' => array(".vjs-remaining-time-display", "css_element"),
'Annotation' => array("#activate_blocktype_annotation", "css_element"),
'Smartevidence' => array("#activate_module_framework", "css_element"),
'Make comment public status' => array("#add_feedback_form_ispublic_container", "css_element"),
'Submissions to this group' => array("#allsubmissionlist", "css_element"),
'Blocktype sidebar' => array("#content-editor-foldable", "css_element"),
'Tags section' => array("#edit_tags_container", "css_element"),
'My tags list' => array(".mytags", "css_element"),
'Upload dialog' => array("#editgoalsandskills_filebrowser_upload_browse", "css_element"),
'Filter by first name' => array("#firstnamelist", "css_element"),
'Find people results' => array("#friendslist_pagination", "css_element"),
'My groups box' => array("#groups", "css_element"),
'Group portfolios' => array("#groupviewlist", "css_element"),
'Main menu' => array("#main-nav", "css_element"),
'Administration menu' => array("#main-nav-admin", "css_element"),
'Admin home sub-menu' => array(".adminhome", "css_element"),
'Arrow-bar nav' => array(".arrow-bar", "css_element"),
'My portfolios' => array(".bt-myviews", "css_element"),
'Latest changes I can view' => array(".bt-newviews", "css_element"),
'Resume field block' => array(".bt-resumefield", "css_element"),
'Watched pages' => array(".bt-watchlist", "css_element"),
'Select' => array(".btn[title='Select']", "css_element"),
'Comment preview' => array(".commentreplyview", "css_element"),
'Comment text' => array(".comment-text", "css_element"),
'Extensions sub-menu' => array(".configextensions ul", "css_element"),
'Configure site sub-menu' => array(".configsite", "css_element"),
'Users sub-menu' => array(".configusers", "css_element"),
'Content sub-menu' => array(".content", "css_element"),
'Comment feedbacktable' => array(".feedbacktable", "css_element"),
'File download heading 1' => array(".filedownload-item:nth-of-type(1)>h4", "css_element"),
'File download heading 2' => array(".filedownload-item:nth-of-type(2)>h4", "css_element"),
'Filelist table' => array(".filelist", "css_element"),
'Footer' => array(".footer", "css_element"),
'Pages and Collections boxes' => array(".grouppageswrap", "css_element"),
'Groups sub-menu' => array(".groups", "css_element"),
'Admin Groups sub-menu' => array(".managegroups ul", "css_element"),
'Institutions sub-menu' => array(".manageinstitutions ul", "css_element"),
'Options dialog' => array(".modal-header", "css_element"),
'Portfolio sub-menu' => array(".myportfolio", "css_element"),
'Web services sub-menu' => array(".webservices", "css_element"),
'H1 heading' => array("h1", "css_element"),
'Collections text-box' => array(".select2-selection__rendered", "css_element"),
'Videojs time remaining' => array(".vjs-remaining-time-display", "css_element"),
'Annotation' => array("#activate_blocktype_annotation", "css_element"),
'Smartevidence' => array("#activate_module_framework", "css_element"),
'Make comment public status' => array("#add_feedback_form_ispublic_container", "css_element"),
'Submissions to this group' => array("#allsubmissionlist", "css_element"),
'Blocktype sidebar' => array("#content-editor-foldable", "css_element"),
'Tags section' => array("#edit_tags_container", "css_element"),
'My tags list' => array(".mytags", "css_element"),
'Upload dialog' => array("#editgoalsandskills_filebrowser_upload_browse", "css_element"),
'Filter by first name' => array("#firstnamelist", "css_element"),
'Find people results' => array("#friendslist_pagination", "css_element"),
'My groups box' => array("#groups", "css_element"),
'Group portfolios' => array("#groupviewlist", "css_element"),
'Main menu' => array("#main-nav", "css_element"),
'Administration menu' => array("#main-nav-admin", "css_element"),
'Import First name' => array("#profilefield-profile #profile-profile:nth-of-type(1)", "css_element"),
'Import Last name' => array("#profilefield-profile #profile-profile:nth-of-type(2)", "css_element"),
'Import Student ID' => array("#profilefield-profile #profile-profile:nth-of-type(3)", "css_element"),
'Import Email address' => array("#profilefield-contact #profile-contact:nth-of-type(1)", "css_element"),
'Members without a submission to the group' => array("#nosubmissionslist", "css_element"),
'Collections shared with this group' => array("#sharedcollectionlist", "css_element"),
'Pages shared with this group'=> array("#sharedviewlist", "css_element"),
'Shared with this group report'=> array("#sharedviewsreport", "css_element"),
'Matrix table' => array("#tablematrix", "css_element"),
'Toolbar buttons' => array("#toolbar-buttons", "css_element"),
'User menu' => array(".icon-chevron-down.collapsed", "css_element"),
'Settings sub-menu' => array("//span[@innertext='Settings']", "xpath_element"),
'Settings' => array("//ul[#'userchildmenu-8']/?/?/a[@innertext='Settings']", "xpath_element"),
'Legal' => array("//ul[#'userchildmenu-8']/?/?/a[@innertext='Legal']", "xpath_element"),
'Collections shared with this group' => array("#sharedcollectionlist", "css_element"),
'Pages shared with this group' => array("#sharedviewlist", "css_element"),
'Shared with this group report' => array("#sharedviewsreport", "css_element"),
'Matrix table' => array("#tablematrix", "css_element"),
'Toolbar buttons' => array("#toolbar-buttons", "css_element"),
'User menu' => array(".icon-chevron-down.collapsed", "css_element"),
'Settings sub-menu' => array("//span[@innertext='Settings']", "xpath_element"),
'Settings' => array("//ul[#'userchildmenu-8']/?/?/a[@innertext='Settings']", "xpath_element"),
'Legal' => array("//ul[#'userchildmenu-8']/?/?/a[@innertext='Legal']", "xpath_element"),
#xpath_elements
'Secret urls - table row 1' => array("//table/tbody/tr[1]/td[4]/a", "xpath_element"),
'File Size' => array("//table[@id='files_filebrowser_filelist']/tbody/tr[1]/td[4]", "xpath_element"),
'File Size' => array("//table[@id='files_filebrowser_filelist']/tbody/tr[1]/td[4]", "xpath_element"),
'Multirecipientnotification' => array("//li[@id='module.multirecipientnotification']", "xpath_element"),
// xpath related to participation report
'Group views report tr1 tc1' => array("//*[@id='groupviewsreport']/tbody/tr[1]/td[1]", "xpath_element"),
......
......@@ -5,9 +5,14 @@ Feature: Mahara users can export collections with bulk option
So that I can have the same options of exporting as I when exporting pages.
Background:
Given the following "users" exist:
Given the following "institutions" exist:
| name | displayname | registerallowed | registerconfirm |
| instone | Institution One | ON | OFF |
And the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | instone | internal | Admin |
| UserB | Kupuh1pa! | UserB@example.org | Bob | User | instone | internal | member |
And the following "pages" exist:
| title | description | ownertype | ownername |
......@@ -62,3 +67,32 @@ Scenario: Export collections in bulk as Leap2A
And the "Collection UserA_03" checkbox should be checked
When I click on "Generate export"
Then I should see "Please wait while your export is being generated..."
Scenario: Institution One admin locks First name, Last name fields
I want to lock fields
So that institution fields will not change when users upload Leap2a portfolios
# Admin sets Institution lock fields (First name, Last name)
Given I log in as "admin" with password "Kupuh1pa!"
When I choose "Settings" in "Institutions" from administration menu
And I click on "Edit" in "Institution One" row
And I expand the section "Locked fields"
And I enable the switch "First name"
And I enable the switch "Last name"
And I enable the switch "Email address"
And I press "Submit"
Then I log out
Given I log in as "UserB" with password "Kupuh1pa!"
When I choose "Import" in "Portfolio" from main menu
# Upload the file "UserA.xml" Leap2A file
And I attach the file "leap2a.xml" to "import_leap2afile"
And I press "Import"
Then I should see "Choose the way to import your portfolio items"
When I expand "About me" node
# user should see ignore for all of the Locked fields for inst
And I should see "Ignore" in the "Import First name" property
And I should see "Ignore" in the "Import Last name" property
# Student ID field was not locked so user should see additional option of "Add new"
And I should see "Ignore" in the "Import Student ID" property
And I should see "Add new" in the "Import Student ID" property
When I expand "Contact information" node
Then I should see "Ignore" in the "Import Email address" property
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment