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) {
jQuery('#' + id).removeClass('closed').addClass('active');
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 {
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
*
......@@ -428,7 +432,8 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
public static function get_instance_javascript(BlockInstance $bi) {
return array(
array(
'file' => 'js/annotation.js'
'file' => 'js/annotation.js',
'initjs' => " annotationBlockInit(); ",
)
);
}
......@@ -444,27 +449,4 @@ class PluginBlocktypeAnnotation extends MaharaCoreBlocktype {
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) {
}
}
$(function() {
function peerassessmentBlockInit() {
configureAssessmentCancel();
configureModalOpen();
});
};
jQuery(window).on('pageupdated', {}, function() {
configureAssessmentCancel();
......@@ -37,6 +37,9 @@ function configureModalOpen() {
$('.js-peerassessment-modal').on('click', function(e) {
e.stopPropagation();
e.preventDefault();
// needs to initialize the tinyMCE editor when the block is loaded
PieformManager.signal('onload');
var blockid = $(this).data('blockid');
var formname = $('#assessment_feedbackform_' + blockid).find('form')[0].id;
dock.show($('#assessment_feedbackform_' + blockid), false, true);
......
......@@ -142,7 +142,8 @@ class PluginBlocktypePeerassessment extends MaharaCoreBlocktype {
public static function get_instance_javascript(BlockInstance $bi) {
return array(
array(
'file' => 'js/peerassessment.js'
'file' => 'js/peerassessment.js',
'initjs' => " peerassessmentBlockInit(); ",
)
);
}
......
......@@ -198,7 +198,8 @@ class PluginBlocktypeWall extends MaharaCoreBlocktype {
public function wallpost_js() {
$js = <<<EOF
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 temp = jQuery('<div>');
var textareaid = 'wallpost_' + data.block + '_text';
......@@ -215,6 +216,10 @@ function wallpost_success(form, data) {
formSuccess(form, data);
}
}
jQuery( function() {
// needs to initialize the tinyMCE editor when the block is loaded
PieformManager.signal('onload');
});
EOF;
return "<script>$js</script>";
}
......
......@@ -28,13 +28,17 @@ function loadGridTranslate(grid, blocks) {
);
gridElements.push(el);
});
jQuery(document).trigger('blocksloaded');
window.setTimeout(function(){
updateBlockSizes();
updateTranslatedGridRows(blocks);
gridInit();
$.each(gridElements, function(index, el) {
el.on('resizestop', resizeStopBlock);
})
});
initJs();
}, 300);
}
......@@ -49,6 +53,15 @@ function loadGrid(grid, blocks) {
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
if (typeof editViewInit !== "undefined") {
editViewInit();
......@@ -57,11 +70,6 @@ function loadGrid(grid, blocks) {
if (typeof viewmenuInit !== "undefined") {
viewmenuInit();
}
// images need time to load before height can be properly calculated
window.setTimeout(function(){
updateBlockSizes();
}, 300);
}
function updateTranslatedGridRows(blocks) {
......
......@@ -8,3 +8,5 @@ Modifications:
- Moved scss file from src/gridstack.scss to
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) {
// then close the modal
if (jQuery('#feedback-form').length) {
dock.hide();
// update the size of the comment block
updateBlockSizes();
}
}
......
......@@ -449,6 +449,8 @@
x = placeholder.attr('data-gs-x'),
y = placeholder.attr('data-gs-y');
var grid = $('.grid-stack').data('gridstack');
grid.removeWidget(placeholder);
$(placeholder).remove();
$('.grid-stack .blocktype-drag').removeClass('btn btn-primary');
......@@ -556,6 +558,11 @@
list.insertBefore(children[length-1], children[0]);
}
}
else {
if (typeof whereTo === 'string') {
$('html, body').animate({ scrollTop: $(blockinstance).offset().top }, 'slow');
}
}
},
function() {
// On error callback we need to reset the Dock
......
......@@ -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['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['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';
......@@ -318,7 +319,8 @@ $string['nrrows'] = array(
'%s row',
'%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['add'] = 'Add';
$string['addcolumn'] = 'Add column';
......
This diff is collapsed.
......@@ -668,25 +668,18 @@ class Framework {
// Get the title for the option
$title = get_field('framework_standard_element', 'shortname', 'id', $data->option);
// Find out which is the last lefthand 'cell' on the page
$lastrow = get_field('view', 'numrows', 'id', $data->view);
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)
);
$view = new View($data->view);
$blockpositiony = $view->bottomfreeposition();
// Create the block at the end of the 'cell'.
$annotation = new BlockInstance(0, array(
'blocktype' => 'annotation',
'title' => (get_string('Annotation', 'artefact.annotation') . ': ' . $title),
'view' => $data->view,
'row' => $lastrow,
'column' => 1,
'order' => (int)$maxorder + 1,
'positionx' => 0,
'positiony' => (int)$blockpositiony,
'width' => 4,
'height' => 3,
));
$annotation->commit();
$new = true;
......
......@@ -217,7 +217,14 @@ else {
$form = Framework::annotation_feedback_form($params);
}
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);
json_reply(false, (object) array('message' => $message, 'data' => $data));
......
......@@ -11,6 +11,9 @@ body {
@include media-breakpoint-up(md) {
padding-bottom:50px;
}
.grouphomepage {
padding-top: 30px;
}
}
}
......
......@@ -51,7 +51,7 @@ $animation_speed: .3s !default;
right: $horizontal_padding / 2;
bottom: 0;
width: auto;
z-index: 0;
// z-index: 0;
overflow-x: hidden;
overflow-y: auto;
}
......
......@@ -217,7 +217,7 @@ else {
$reorder = ' ';
}
$inlinejs .="
$blocksjs ="
$(function () {
var options = {
verticalMargin: 10,
......@@ -261,7 +261,11 @@ $addform = pieform(array(
'position' => array(
'type' => 'select',
'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(
'type' => 'submitcancel',
......@@ -276,7 +280,7 @@ $placeholderblock = PluginBlockType::get_blocktypes_for_category('shortcut', $vi
$placeholderbutton = '';
if ($placeholderblock) {
// 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';
$smarty = smarty_core();
$smarty->assign('blocktypes', $placeholderblock);
......@@ -336,7 +340,7 @@ $smarty->assign('dashboard', $dashboard);
if (get_config('blockeditormaxwidth')) {
$inlinejs .= 'config.blockeditormaxwidth = true;';
}
$smarty->assign('INLINEJAVASCRIPT', $inlinejs);
$smarty->assign('INLINEJAVASCRIPT', $blocksjs . $inlinejs);
$viewtype = $view->get('type');
$viewtitle = $view->get('title');
$owner = $view->get('owner');
......
......@@ -392,6 +392,7 @@ EOF;
}
}
$blocktype_toolbar = $view->get_all_blocktype_toolbar();
$smarty = smarty(
$javascript,
$headers,
......@@ -537,7 +538,6 @@ if ($collection) {
}
}
$blocktype_toolbar = $view->get_all_blocktype_toolbar();
if (!empty($blocktype_toolbar['toolbarhtml'])) {
$smarty->assign('toolbarhtml', join("\n", $blocktype_toolbar['toolbarhtml']));
}
......
......@@ -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 "Test" and select "Test"
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 click on "Show more"
And I click on "Tagged journal entries" in the "Content types" property
......
......@@ -17,7 +17,7 @@ Scenario: Make Text Block Retractable
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "Text" in the "Content types" property
And I set the field "Block title" to "Text Block 1"
......
......@@ -14,7 +14,7 @@ Scenario: Accessing annotation block (Bug 1443730)
# Checking if annotation block is available by default
And I follow "Page admin_01"
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 click on "Show more"
And I click on "Show more"
......@@ -27,7 +27,7 @@ Scenario: Accessing annotation block (Bug 1443730)
# Editing page to add annotation block
And follow "Page admin_01"
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 set the field "Block title" to "Annotation"
And I click on "Show more"
......
......@@ -18,7 +18,7 @@ Scenario: Add some externalfeed blocks
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Show more"
......@@ -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 press "Save"
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 click on "Show more"
And I click on "Show more"
......
......@@ -80,7 +80,7 @@ Scenario: Installing framework module and activating for an institution
# Add another compentency annotation block
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 click on "Show more"
And I click on "Show more"
......
......@@ -17,7 +17,7 @@ Scenario:
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Show more"
......
......@@ -26,7 +26,7 @@ Scenario:
And I choose "Pages and collections" in "Create" from main menu
And I follow "Collection UserA_01"
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 click on "Show more"
And I click on "Show more"
......
......@@ -19,7 +19,7 @@ Scenario: Open badges block
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Show more"
......
......@@ -63,7 +63,7 @@ Scenario: Create forum and add block to group page
And I log in as "UserC" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Show more"
......
......@@ -64,7 +64,7 @@ Scenario: Add comments block to page
And I click on "Edit" in "Page UserA_01" card menu
And I wait "1" seconds
# 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 click on "Show more"
And I click on "Show more"
......
......@@ -40,7 +40,7 @@ Scenario: Creating and accessing social media buttons (Bug 1448948)
And I press "Save"
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Show more"
......
......@@ -57,7 +57,7 @@ Feature: Mahara users can create their blogs
And I press "Save entry"
And I choose "Pages and collections" in "Create" from main 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 Drag to add a new block" in the "blocktype sidebar" property
And I press "Add"
And I click on "Show more"
And I click on "Tagged journal entries" in the "Content types" property
......
......@@ -19,7 +19,7 @@ Scenario:
And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu
# Configuring the block
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 click on "Show more"
And I click on "PDF" in the "Content types" property
......
......@@ -73,7 +73,7 @@ Background:
And I fill in select2 input "settings_tags" with "Tag" and select "Tag"
And I press "Save"
# Creating a Note with a tag
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 click on "Show more"
And I click on "Show more"
......@@ -85,7 +85,7 @@ Background:
And I fill in select2 input "instconf_tags" with "Tag" and select "Tag"
And I press "Save"
# Creating a Text block with a tag
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 click on "Text" in the "Content types" property
# create a text block with a Unique name (Text Block 101)
......@@ -95,7 +95,7 @@ Background:
And I fill in select2 input "instconf_tags" with "Tag" and select "Tag"
And I press "Save"
# Creating a resume field with a tag
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 click on "Show more"
And I click on "Show more"
......@@ -105,7 +105,7 @@ Background:
And I press "Save"
# Creating an external video block with a tag
# need to do this one last as the loading of video effects takes focus away from the add block modal
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 click on "Show more"
And I click on "Show more"
......
......@@ -114,7 +114,7 @@ Scenario: Newly created user can get a copy of the journal (Bug 1472467)
And I choose "Pages and collections" in "Configure site" from administration menu
And I click on "Edit" in "Page mahara_01" card menu
# Adding journal block to 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 click on "Show more"
And I click on "Journal" in the "Content types" property
......
......@@ -15,7 +15,7 @@ Scenario: Use content from another note (Bug 1710988)
Given I log in as "UserA" with password "Kupuh1pa!"
And I follow "Page UserA_01"
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 click on "Show more"
And I click on "Show more"
......@@ -24,7 +24,7 @@ Scenario: Use content from another note (Bug 1710988)
| Block title | Note block 1 |
| Block content | This is a test |
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 click on "Show more"
And I click on "Show more"
......
......@@ -27,7 +27,7 @@ Scenario: Accessing the popup window in the Copy or page or collection (Bug 1361
# Add a block to the page
When I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page admin_02" 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 click on "Text" in the "Content types" property
And I set the field "Block title" to "Text Block 1"
......
......@@ -24,7 +24,7 @@ Feature: Mahara users can allow their tagged blogs tags to be copied
# Add a taggedblogs block to a page
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Tagged journal entries" in the "Content types" property
......
......@@ -50,18 +50,18 @@ Scenario: Creating a page with content in it (Bug 1426983)
And I should see "Share" in the ".editshare .btn-title" element
And I should see "Return to pages and collections" in the ".returntolocation .btn-title" element
# Adding media block
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 click on "File(s) to download" in the "Content types" property
And I press "Save"
# Adding Journal block
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 click on "Show more"
And I click on "Recent journal entries" in the "Content types" property
And I press "Save"
# Adding profile info block
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 click on "Show more"
And I click on "Show more"
......@@ -69,7 +69,7 @@ Scenario: Creating a page with content in it (Bug 1426983)
And I click on "Profile information" in the "Content types" property
And I press "Save"
# Adding external media block - but remove it instead
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 click on "Show more"
And I click on "Show more"
......
......@@ -24,7 +24,7 @@ Scenario: Enable/disable external resources in mahara pages
And I follow "Edit"
# Add a "Text" block with an image from file area
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 click on "Text" in the "Content types" property
And I set the following fields to these values:
......@@ -37,7 +37,7 @@ Scenario: Enable/disable external resources in mahara pages
And I press "Save"
# Add a "Text" block with an embedded external image
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 click on "Text" in the "Content types" property
And I set the following fields to these values:
......
......@@ -17,7 +17,7 @@ Scenario: Add Files to download block
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main 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 click on "File(s) to download" in the "Content types" property
And I expand "Files" node in the "#instconf_artefactfieldset_container" "css_element"
......
......@@ -56,7 +56,7 @@ Scenario: Creating a Journal, publishing a draft, using tagged entry block
# Display tagged journals in block
And I choose "Pages and collections" in "Create" from main 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 click on "Show more"
And I click on "Tagged journal entries" in the "Content types" property
......
......@@ -18,7 +18,7 @@ I can create a new page from the site default portfolio page
And I click on "Edit" in "Page template" card menu
And I should see "Drag 'Add a new block' onto the page to add one."
# Add a text block
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 click on "Text" in the "Content types" property
And I set the following fields to these values:
......
......@@ -20,7 +20,7 @@ Feature: Site admin includes special blocks for the "Profile" site template and
And I should see "Page template"
When I click on "Edit" in "Dashboard template" card menu
# add "My friends" block and verify it is displayed on 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 click on "Show more"
And I click on "Show more"
......@@ -30,7 +30,7 @@ Feature: Site admin includes special blocks for the "Profile" site template and
And I click on "My friends" in the "Content types" property
Then I should see "My friends" in the "#column-container" "css_element"
# add "My groups" block and verify it is displayed on 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 click on "Show more"
And I click on "Show more"
......@@ -42,7 +42,7 @@ Feature: Site admin includes special blocks for the "Profile" site template and
Given I follow "Return to site pages and collections"
And I click on "Edit" in "Profile template" card menu