Commit db3eb815 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge changes I92d2d20b,I43fcafba

* changes:
  Bug 1688452: Fixing the behat tests
  Bug 1688452: Changing 'Make public' lang string for comments
parents 977f08cf 1ea505f3
......@@ -70,7 +70,7 @@ else {
}
$elements['ispublic'] = array(
'type' => 'switchbox',
'title' => get_string('makepublic', 'artefact.comment'),
'title' => get_string('makecommentpublic', 'artefact.comment'),
'defaultvalue' => !$comment->get('private'),
);
if (get_config('licensemetadata')) {
......
......@@ -48,7 +48,7 @@ $string['commentsubmittedprivateanon'] = 'Private comment submitted';
$string['forcepubliccomment'] = 'Public';
$string['forceprivatecomment'] = 'Private: This reply will only be visible to you and the author of the preceeding comment.';
$string['lastcomment'] = 'Last comment';
$string['makepublic'] = 'Make public';
$string['makecommentpublic'] = 'Make comment public';
$string['makepublicnotallowed'] = 'You are not allowed to make this comment public';
$string['makepublicrequestsubject'] = 'Request to change private comment to public';
$string['makepublicrequestbyauthormessage'] = '%s has requested that you make their comment public.';
......
......@@ -948,7 +948,7 @@ class ArtefactTypeComment extends ArtefactType {
}
$form['elements']['ispublic'] = array(
'type' => 'switchbox',
'title' => get_string('makepublic', 'artefact.comment'),
'title' => get_string('makecommentpublic', 'artefact.comment'),
'defaultvalue' => !$defaultprivate,
);
if (get_config('licensemetadata')) {
......@@ -1003,7 +1003,7 @@ class ArtefactTypeComment extends ArtefactType {
'usebuttontag' => true,
'class' => 'btn-link btn-xs',
'name' => 'make_public_submit',
'value' => '<span class="icon icon-lock text-default left" role="presentation" aria-hidden="true"></span>' . get_string('makepublic', 'artefact.comment'),
'value' => '<span class="icon icon-lock text-default left" role="presentation" aria-hidden="true"></span>' . get_string('makecommentpublic', 'artefact.comment'),
),
),
);
......
......@@ -22,7 +22,7 @@ Scenario: Adding and deleting public comments
And I fill in "Name" with "Joe Anonymous"
# No TinyMCE editor for anonymous users
And I fill in "Comment" with "Public comment by anonymous user"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
And I log in as "pageowner" with password "password"
And I go to portfolio page "page1"
......@@ -72,7 +72,7 @@ Scenario: Comments update the page's mtime
# Private comment updates page last updated
And I go to portfolio page "page2"
And I fill in "Private comment" in editor "Comment"
And I disable the switch "Make public"
And I disable the switch "Make comment public"
And I press "Comment"
And I choose "Dashboard" from main menu
Then I should see "page2" in the ".bt-newviews" element
......
......@@ -25,7 +25,7 @@ Scenario: Moderating a group comment when approve comments is turned on
Given I log in as "userC" with password "Kupuhipa1"
And I go to portfolio page "Page1"
And I set the field "Comment" to "This is a comment from userC"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
Then I should see "You have requested that this comment be made public." in the ".feedbacktable" "css_element"
And I log out
......@@ -40,4 +40,4 @@ Scenario: Moderating a group comment when approve comments is turned on
Given I log in as "userA" with password "Kupuhipa1"
And I go to portfolio page "Page1"
Then I should see "This is a comment from userC"
And I press "Make public"
And I press "Make comment public"
......@@ -24,7 +24,7 @@ Scenario: Public comment by page owner, public reply by third party
Given I log in as "pageowner" with password "password"
And I go to portfolio page "page1"
And I fill in "Public comment by pageowner" in editor "Comment"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
And I log out
And I log in as "pagecommenter" with password "password"
......@@ -41,13 +41,13 @@ Scenario: Public comment by non-owner, owner can private reply, another non-owne
Given I log in as "pagecommenter" with password "password"
And I go to portfolio page "page1"
And I fill in "Public comment by pagecommenter" in editor "Comment"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
And I log out
And I log in as "pageowner" with password "password"
And I go to portfolio page "page1"
And I click on "Reply" in "Public comment by pagecommenter" row
And I disable the switch "Make public"
And I disable the switch "Make comment public"
And I fill in "Private reply by pageowner" in editor "Comment"
And I press "Comment"
And I log out
......@@ -66,7 +66,7 @@ Scenario: Private comment by commenter, private reply by page owner, private cou
Given I log in as "pagecommenter" with password "password"
And I go to portfolio page "page1"
And I fill in "Private comment by pagecommenter" in editor "Comment"
And I disable the switch "Make public"
And I disable the switch "Make comment public"
And I press "Comment"
And I press "More..."
And I follow "Remove page from watchlist"
......@@ -100,7 +100,7 @@ Scenario: No private replies to anonymous comments
And I fill in "Name" with "Anonymous User"
# No WYSIWYG editor for anonymous users
And I fill in "Comment" with "Public comment by anonymous user"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
When I log in as "pagecommenter" with password "password"
And I go to portfolio page "page1"
......@@ -116,7 +116,7 @@ Scenario: No replies to deleted comments
Given I log in as "pageowner" with password "password"
And I go to portfolio page "page1"
And I fill in "I will delete this comment" in editor "Comment"
And I enable the switch "Make public"
And I enable the switch "Make comment public"
When I press "Comment"
And I should see "I will delete this comment"
And I delete the "I will delete this comment" row
......
......@@ -33,7 +33,7 @@ Scenario: As a user leaving a public comment on a group page (Bug 1509129)
And I follow "Display page"
And I fill in "Adding a comment to this field. Student = Awesome!" in editor "Comment"
# Checking that the make public is on
And I enable the switch "Make public"
And I enable the switch "Make comment public"
And I press "Comment"
# Verifying that it saves
Then I should see "Comment submitted"
......
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