Commit ccc2446d authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon

Bug 1813987: Blocks display fixes

- assessment block: tinymce and the asseesment js
need to be initialized after the block is loaded
- signoff block: sing-off modal is showing now
- embedded media init functions need to be loaded after
the blocks are added to the grid
- wall post block initializes the tinyMCE after it's loaded
and refreshes the content of the block after a new post is made
- comment block: update block size when adding a comment
- scrolling to the block when a new one is added
- modified the text for button to add a new block to the page
  'Drag to add a new block' for normal mode
  'Click to add a new block' for accessibility mode
- add a block to the bottom of the page by default so it won't
break the layout
- add SE annotation to the bottom of the page
- added 'Add block' button event handlers after trnaslating a view
- annotation feedback loads the tinyMCE

behatnotneeded

Change-Id: I7642cacde729a2a85b497e077452de792ec72eb7
parent 25082988
...@@ -115,3 +115,23 @@ function addAnnotationFeedbackError(form, data) { ...@@ -115,3 +115,23 @@ function addAnnotationFeedbackError(form, data) {
jQuery('#' + id).removeClass('closed').addClass('active'); jQuery('#' + id).removeClass('closed').addClass('active');
formError(form, data); formError(form, data);
} }
function show_se_desc(id) {
$("#instconf_smartevidencedesc_container div:not(.description)").addClass('d-none');
$("#option_" + id).removeClass('d-none');
}
function annotationBlockInit() {
if ($("#instconf_smartevidence").length) {
// block title will be overwritten with framework choice so make it disabled
$("#instconf_title").attr('disabled', true);
// Set up evidence choices and show/hide related descriptions
$("#instconf_smartevidence").select2();
show_se_desc($("#instconf_smartevidence").val());
$("#instconf_smartevidence").on('change', function() {
show_se_desc($(this).val());
});
}
};
...@@ -45,6 +45,10 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -45,6 +45,10 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
return $view->get('group') == null; return $view->get('group') == null;
} }
public static function has_static_content() {
return false;
}
/** /**
* defines if the title should be shown if there is no content in the block * defines if the title should be shown if there is no content in the block
* *
...@@ -428,7 +432,8 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -428,7 +432,8 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
public static function get_instance_javascript(BlockInstance $bi) { public static function get_instance_javascript(BlockInstance $bi) {
return array( return array(
array( array(
'file' => 'js/annotation.js' 'file' => 'js/annotation.js',
'initjs' => " annotationBlockInit(); ",
) )
); );
} }
...@@ -444,27 +449,4 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype { ...@@ -444,27 +449,4 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
set_field('blocktype_installed', 'active', 0, 'artefactplugin', 'annotation'); set_field('blocktype_installed', 'active', 0, 'artefactplugin', 'annotation');
} }
} }
public static function get_instance_config_javascript(BlockInstance $instance) {
return <<<EOF
jQuery(function($) {
function show_se_desc(id) {
$("#instconf_smartevidencedesc_container div:not(.description)").addClass('d-none');
$("#option_" + id).removeClass('d-none');
}
if ($("#instconf_smartevidence").length) {
// block title will be overwritten with framework choice so make it disabled
$("#instconf_title").attr('disabled', true);
// Set up evidence choices and show/hide related descriptions
$("#instconf_smartevidence").select2();
show_se_desc($("#instconf_smartevidence").val());
$("#instconf_smartevidence").on('change', function() {
show_se_desc($(this).val());
});
}
});
EOF;
}
} }
...@@ -22,10 +22,10 @@ function initTinyMCE(formname) { ...@@ -22,10 +22,10 @@ function initTinyMCE(formname) {
} }
} }
$(function() { function peerassessmentBlockInit() {
configureAssessmentCancel(); configureAssessmentCancel();
configureModalOpen(); configureModalOpen();
}); };
jQuery(window).on('pageupdated', {}, function() { jQuery(window).on('pageupdated', {}, function() {
configureAssessmentCancel(); configureAssessmentCancel();
...@@ -37,6 +37,9 @@ function configureModalOpen() { ...@@ -37,6 +37,9 @@ function configureModalOpen() {
$('.js-peerassessment-modal').on('click', function(e) { $('.js-peerassessment-modal').on('click', function(e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
// needs to initialize the tinyMCE editor when the block is loaded
PieformManager.signal('onload');
var blockid = $(this).data('blockid'); var blockid = $(this).data('blockid');
var formname = $('#assessment_feedbackform_' + blockid).find('form')[0].id; var formname = $('#assessment_feedbackform_' + blockid).find('form')[0].id;
dock.show($('#assessment_feedbackform_' + blockid), false, true); dock.show($('#assessment_feedbackform_' + blockid), false, true);
......
...@@ -142,7 +142,8 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype { ...@@ -142,7 +142,8 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype {
public static function get_instance_javascript(BlockInstance $bi) { public static function get_instance_javascript(BlockInstance $bi) {
return array( return array(
array( array(
'file' => 'js/peerassessment.js' 'file' => 'js/peerassessment.js',
'initjs' => " peerassessmentBlockInit(); ",
) )
); );
} }
......
...@@ -198,7 +198,8 @@ class PluginBlocktypeWall extends MaharaCoreBlocktype { ...@@ -198,7 +198,8 @@ class PluginBlocktypeWall extends MaharaCoreBlocktype {
public function wallpost_js() { public function wallpost_js() {
$js = <<<EOF $js = <<<EOF
function wallpost_success(form, data) { function wallpost_success(form, data) {
if (jQuery('#wall').length && data.posts && data.block) { var wall = jQuery('#wall');
if (wall.length && data.posts && data.block) {
var wall = jQuery('#blockinstance_' + data.block + ' div.wall').first(); var wall = jQuery('#blockinstance_' + data.block + ' div.wall').first();
var temp = jQuery('<div>'); var temp = jQuery('<div>');
var textareaid = 'wallpost_' + data.block + '_text'; var textareaid = 'wallpost_' + data.block + '_text';
...@@ -215,6 +216,10 @@ function wallpost_success(form, data) { ...@@ -215,6 +216,10 @@ function wallpost_success(form, data) {
formSuccess(form, data); formSuccess(form, data);
} }
} }
jQuery( function() {
// needs to initialize the tinyMCE editor when the block is loaded
PieformManager.signal('onload');
});
EOF; EOF;
return "<script>$js</script>"; return "<script>$js</script>";
} }
......
...@@ -28,13 +28,17 @@ function loadGridTranslate(grid, blocks) { ...@@ -28,13 +28,17 @@ function loadGridTranslate(grid, blocks) {
); );
gridElements.push(el); gridElements.push(el);
}); });
jQuery(document).trigger('blocksloaded');
window.setTimeout(function(){ window.setTimeout(function(){
updateBlockSizes(); updateBlockSizes();
updateTranslatedGridRows(blocks); updateTranslatedGridRows(blocks);
gridInit(); gridInit();
$.each(gridElements, function(index, el) { $.each(gridElements, function(index, el) {
el.on('resizestop', resizeStopBlock); el.on('resizestop', resizeStopBlock);
}) });
initJs();
}, 300); }, 300);
} }
...@@ -49,6 +53,15 @@ function loadGrid(grid, blocks) { ...@@ -49,6 +53,15 @@ function loadGrid(grid, blocks) {
jQuery(document).trigger('blocksloaded'); jQuery(document).trigger('blocksloaded');
initJs();
// images need time to load before height can be properly calculated
window.setTimeout(function(){
updateBlockSizes();
}, 300);
}
function initJs() {
// initialize js function for edit view // initialize js function for edit view
if (typeof editViewInit !== "undefined") { if (typeof editViewInit !== "undefined") {
editViewInit(); editViewInit();
...@@ -57,11 +70,6 @@ function loadGrid(grid, blocks) { ...@@ -57,11 +70,6 @@ function loadGrid(grid, blocks) {
if (typeof viewmenuInit !== "undefined") { if (typeof viewmenuInit !== "undefined") {
viewmenuInit(); viewmenuInit();
} }
// images need time to load before height can be properly calculated
window.setTimeout(function(){
updateBlockSizes();
}, 300);
} }
function updateTranslatedGridRows(blocks) { function updateTranslatedGridRows(blocks) {
......
...@@ -8,3 +8,5 @@ Modifications: ...@@ -8,3 +8,5 @@ Modifications:
- Moved scss file from src/gridstack.scss to - Moved scss file from src/gridstack.scss to
theme/raw/sass/lib/_gridstack.scss theme/raw/sass/lib/_gridstack.scss
- removed z-index:0 from grid-stack-content class css because it breaks
the sign-off block modal
...@@ -105,6 +105,8 @@ function addFeedbackSuccess(form, data) { ...@@ -105,6 +105,8 @@ function addFeedbackSuccess(form, data) {
// then close the modal // then close the modal
if (jQuery('#feedback-form').length) { if (jQuery('#feedback-form').length) {
dock.hide(); dock.hide();
// update the size of the comment block
updateBlockSizes();
} }
} }
......
...@@ -449,6 +449,8 @@ ...@@ -449,6 +449,8 @@
x = placeholder.attr('data-gs-x'), x = placeholder.attr('data-gs-x'),
y = placeholder.attr('data-gs-y'); y = placeholder.attr('data-gs-y');
var grid = $('.grid-stack').data('gridstack');
grid.removeWidget(placeholder);
$(placeholder).remove(); $(placeholder).remove();
$('.grid-stack .blocktype-drag').removeClass('btn btn-primary'); $('.grid-stack .blocktype-drag').removeClass('btn btn-primary');
...@@ -556,6 +558,11 @@ ...@@ -556,6 +558,11 @@
list.insertBefore(children[length-1], children[0]); list.insertBefore(children[length-1], children[0]);
} }
} }
else {
if (typeof whereTo === 'string') {
$('html, body').animate({ scrollTop: $(blockinstance).offset().top }, 'slow');
}
}
}, },
function() { function() {
// On error callback we need to reset the Dock // On error callback we need to reset the Dock
......
...@@ -269,6 +269,7 @@ $string['cantversionvieweditpermissions'] = 'You do not permission to edit this ...@@ -269,6 +269,7 @@ $string['cantversionvieweditpermissions'] = 'You do not permission to edit this
$string['cantversionviewsubmitted'] = 'You cannot edit this page because it has been submitted for assessment. You will have to wait until it is released.'; $string['cantversionviewsubmitted'] = 'You cannot edit this page because it has been submitted for assessment. You will have to wait until it is released.';
$string['cantversionviewgroupeditwindow'] = 'You cannot edit this page. It is outside of the group editable date window.'; $string['cantversionviewgroupeditwindow'] = 'You cannot edit this page. It is outside of the group editable date window.';
$string['cantversionoldlayout'] = 'You cannot save a timeline version of a view with an old layout. You need to convert it to the new grid layout. To do this simply edit the page and the layout will be converted.'; $string['cantversionoldlayout'] = 'You cannot save a timeline version of a view with an old layout. You need to convert it to the new grid layout. To do this simply edit the page and the layout will be converted.';
$string['cantaddannotationinoldlayout'] = 'You cannot add an annotation to this page. Please translate the page layout by editing the view first.';
$string['invalidcolumn'] = 'Column %s out of range'; $string['invalidcolumn'] = 'Column %s out of range';
...@@ -318,7 +319,8 @@ $string['nrrows'] = array( ...@@ -318,7 +319,8 @@ $string['nrrows'] = array(
'%s row', '%s row',
'%s rows', '%s rows',
); );
$string['addnewblock'] = 'Add a new block'; $string['addnewblock'] = 'Drag to add a new block';
$string['addnewblockaccessibility'] = 'Click to add a new block';
$string['addnewblockhere'] = 'Add new block here'; $string['addnewblockhere'] = 'Add new block here';
$string['add'] = 'Add'; $string['add'] = 'Add';
$string['addcolumn'] = 'Add column'; $string['addcolumn'] = 'Add column';
......
This diff is collapsed.
...@@ -668,25 +668,18 @@ class Framework { ...@@ -668,25 +668,18 @@ class Framework {
// Get the title for the option // Get the title for the option
$title = get_field('framework_standard_element', 'shortname', 'id', $data->option); $title = get_field('framework_standard_element', 'shortname', 'id', $data->option);
// Find out which is the last lefthand 'cell' on the page $view = new View($data->view);
$lastrow = get_field('view', 'numrows', 'id', $data->view); $blockpositiony = $view->bottomfreeposition();
if ($lastrow === false) {
throw new MaharaException('An error occurred. A valid view should not have an empty "numrows" column');
}
// Find out how many blocks already exist for this 'cell'.
$maxorder = get_field_sql(
'SELECT MAX("order") FROM {block_instance} WHERE "view"=? AND "row"=? AND "column"=?',
array($data->view, $lastrow, 1)
);
// Create the block at the end of the 'cell'. // Create the block at the end of the 'cell'.
$annotation = new BlockInstance(0, array( $annotation = new BlockInstance(0, array(
'blocktype' => 'annotation', 'blocktype' => 'annotation',
'title' => (get_string('Annotation', 'artefact.annotation') . ': ' . $title), 'title' => (get_string('Annotation', 'artefact.annotation') . ': ' . $title),
'view' => $data->view, 'view' => $data->view,
'row' => $lastrow, 'positionx' => 0,
'column' => 1, 'positiony' => (int)$blockpositiony,
'order' => (int)$maxorder + 1, 'width' => 4,
'height' => 3,
)); ));
$annotation->commit(); $annotation->commit();
$new = true; $new = true;
......
...@@ -217,7 +217,14 @@ else { ...@@ -217,7 +217,14 @@ else {
$form = Framework::annotation_feedback_form($params); $form = Framework::annotation_feedback_form($params);
} }
else { else {
$form = Framework::annotation_config_form($params); $view = new View($viewid);
if ($view->uses_new_layout()) {
$form = Framework::annotation_config_form($params);
}
else {
json_reply(true, get_string('cantaddannotationinoldlayout', 'view'));
exit;
}
} }
$data = (object) array('form' => $form); $data = (object) array('form' => $form);
json_reply(false, (object) array('message' => $message, 'data' => $data)); json_reply(false, (object) array('message' => $message, 'data' => $data));
......
...@@ -11,6 +11,9 @@ body { ...@@ -11,6 +11,9 @@ body {
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
padding-bottom:50px; padding-bottom:50px;
} }
.grouphomepage {
padding-top: 30px;
}
} }
} }
......
...@@ -51,7 +51,7 @@ $animation_speed: .3s !default; ...@@ -51,7 +51,7 @@ $animation_speed: .3s !default;
right: $horizontal_padding / 2; right: $horizontal_padding / 2;
bottom: 0; bottom: 0;
width: auto; width: auto;
z-index: 0; // z-index: 0;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
} }
......
...@@ -217,7 +217,7 @@ else { ...@@ -217,7 +217,7 @@ else {
$reorder = ' '; $reorder = ' ';
} }
$inlinejs .=" $blocksjs ="
$(function () { $(function () {
var options = { var options = {
verticalMargin: 10, verticalMargin: 10,
...@@ -261,7 +261,11 @@ $addform = pieform(array( ...@@ -261,7 +261,11 @@ $addform = pieform(array(
'position' => array( 'position' => array(
'type' => 'select', 'type' => 'select',
'title' => get_string('blockorder', 'view'), 'title' => get_string('blockorder', 'view'),
'options' => array(get_string('top', 'view'), get_string('bottom', 'view')), 'defaultvalue' => 'bottom',
'options' => array(
'top' => get_string('top', 'view'),
'bottom' => get_string('bottom', 'view')
),
), ),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
...@@ -276,7 +280,7 @@ $placeholderblock = PluginBlockType::get_blocktypes_for_category('shortcut', $vi ...@@ -276,7 +280,7 @@ $placeholderblock = PluginBlockType::get_blocktypes_for_category('shortcut', $vi
$placeholderbutton = ''; $placeholderbutton = '';
if ($placeholderblock) { if ($placeholderblock) {
// it's active so make the button with different display title // it's active so make the button with different display title
$placeholderblock[0]['title'] = get_string('addnewblock', 'view'); $placeholderblock[0]['title'] = $view->get('accessible') ? get_string('addnewblockaccessibility', 'view') : get_string('addnewblock', 'view');
$placeholderblock[0]['cssicon'] = 'plus'; $placeholderblock[0]['cssicon'] = 'plus';
$smarty = smarty_core(); $smarty = smarty_core();
$smarty->assign('blocktypes', $placeholderblock); $smarty->assign('blocktypes', $placeholderblock);
...@@ -336,7 +340,7 @@ $smarty->assign('dashboard', $dashboard); ...@@ -336,7 +340,7 @@ $smarty->assign('dashboard', $dashboard);
if (get_config('blockeditormaxwidth')) { if (get_config('blockeditormaxwidth')) {
$inlinejs .= 'config.blockeditormaxwidth = true;'; $inlinejs .= 'config.blockeditormaxwidth = true;';
} }
$smarty->assign('INLINEJAVASCRIPT', $inlinejs); $smarty->assign('INLINEJAVASCRIPT', $blocksjs . $inlinejs);
$viewtype = $view->get('type'); $viewtype = $view->get('type');
$viewtitle = $view->get('title'); $viewtitle = $view->get('title');
$owner = $view->get('owner'); $owner = $view->get('owner');
......
...@@ -392,6 +392,7 @@ EOF; ...@@ -392,6 +392,7 @@ EOF;
} }
} }
$blocktype_toolbar = $view->get_all_blocktype_toolbar();
$smarty = smarty( $smarty = smarty(
$javascript, $javascript,
$headers, $headers,
...@@ -537,7 +538,6 @@ if ($collection) { ...@@ -537,7 +538,6 @@ if ($collection) {
} }
} }
$blocktype_toolbar = $view->get_all_blocktype_toolbar();
if (!empty($blocktype_toolbar['toolbarhtml'])) { if (!empty($blocktype_toolbar['toolbarhtml'])) {
$smarty->assign('toolbarhtml', join("\n", $blocktype_toolbar['toolbarhtml'])); $smarty->assign('toolbarhtml', join("\n", $blocktype_toolbar['toolbarhtml']));
} }
......
...@@ -55,7 +55,7 @@ Scenario: Creating institution tags ...@@ -55,7 +55,7 @@ Scenario: Creating institution tags
And I fill in select2 input "settings_tags" with "One tag" and select "Institution One: One tag (1)" And I fill in select2 input "settings_tags" with "One tag" and select "Institution One: One tag (1)"
And I fill in select2 input "settings_tags" with "Test" and select "Test" And I fill in select2 input "settings_tags" with "Test" and select "Test"
And I press "Save" And I press "Save"
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Tagged journal entries" in the "Content types" property And I click on "Tagged journal entries" in the "Content types" property
......
...@@ -17,7 +17,7 @@ Scenario: Make Text Block Retractable ...@@ -17,7 +17,7 @@ Scenario: Make Text Block Retractable
Given I log in as "UserA" with password "Kupuh1pa!" Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Text" in the "Content types" property And I click on "Text" in the "Content types" property
And I set the field "Block title" to "Text Block 1" And I set the field "Block title" to "Text Block 1"
......
...@@ -14,7 +14,7 @@ Scenario: Accessing annotation block (Bug 1443730) ...@@ -14,7 +14,7 @@ Scenario: Accessing annotation block (Bug 1443730)
# Checking if annotation block is available by default # Checking if annotation block is available by default
And I follow "Page admin_01" And I follow "Page admin_01"
And I follow "Edit" And I follow "Edit"
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
...@@ -27,7 +27,7 @@ Scenario: Accessing annotation block (Bug 1443730) ...@@ -27,7 +27,7 @@ Scenario: Accessing annotation block (Bug 1443730)
# Editing page to add annotation block # Editing page to add annotation block
And follow "Page admin_01" And follow "Page admin_01"
And I follow "Edit" And I follow "Edit"
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I set the field "Block title" to "Annotation" And I set the field "Block title" to "Annotation"
And I click on "Show more" And I click on "Show more"
......
...@@ -18,7 +18,7 @@ Scenario: Add some externalfeed blocks ...@@ -18,7 +18,7 @@ Scenario: Add some externalfeed blocks
Given I log in as "UserA" with password "Kupuh1pa!" Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
...@@ -28,7 +28,7 @@ Scenario: Add some externalfeed blocks ...@@ -28,7 +28,7 @@ Scenario: Add some externalfeed blocks
And I fill in "Feed location" with "http://www.apple.com/main/rss/hotnews/hotnews.rss" And I fill in "Feed location" with "http://www.apple.com/main/rss/hotnews/hotnews.rss"
And I press "Save" And I press "Save"
Then I should see "provided by Apple." Then I should see "provided by Apple."
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -80,7 +80,7 @@ Scenario: Installing framework module and activating for an institution ...@@ -80,7 +80,7 @@ Scenario: Installing framework module and activating for an institution
# Add another compentency annotation block # Add another compentency annotation block
And I follow "Edit" And I follow "Edit"
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -17,7 +17,7 @@ Scenario: ...@@ -17,7 +17,7 @@ Scenario:
Given I log in as "UserA" with password "Kupuh1pa!" Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -26,7 +26,7 @@ Scenario: ...@@ -26,7 +26,7 @@ Scenario:
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I follow "Collection UserA_01" And I follow "Collection UserA_01"
And I follow "Edit" And I follow "Edit"
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -19,7 +19,7 @@ Scenario: Open badges block ...@@ -19,7 +19,7 @@ Scenario: Open badges block
Given I log in as "UserA" with password "Kupuh1pa!" Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -63,7 +63,7 @@ Scenario: Create forum and add block to group page ...@@ -63,7 +63,7 @@ Scenario: Create forum and add block to group page
And I log in as "UserC" with password "Kupuh1pa!" And I log in as "UserC" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserC_01" card menu And I click on "Edit" in "Page UserC_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -64,7 +64,7 @@ Scenario: Add comments block to page ...@@ -64,7 +64,7 @@ Scenario: Add comments block to page
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
And I wait "1" seconds And I wait "1" seconds
# Add a comments block so that comments will now be at the top of the page # Add a comments block so that comments will now be at the top of the page
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......
...@@ -40,7 +40,7 @@ Scenario: Creating and accessing social media buttons (Bug 1448948) ...@@ -40,7 +40,7 @@ Scenario: Creating and accessing social media buttons (Bug 1448948)
And I press "Save" And I press "Save"
And I choose "Pages and collections" in "Create" from main menu And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu And I click on "Edit" in "Page UserA_01" card menu
When I follow "Add a new block" in the "blocktype sidebar" property When I follow "Drag to add a new block" in the "blocktype sidebar" property
And I press "Add" And I press "Add"
And I click on "Show more" And I click on "Show more"
And I click on "Show more" And I click on "Show more"
......