Skip to content

Commit

Permalink
adjust behat tests now that adding elements action flow is different
Browse files Browse the repository at this point in the history
Recent changes to the way that blocks are created and inserted into
an elemental area mean that the granularity of the behat tests was
causing them to fail. Changes here are still reasonably granular,
but a step in simplifying to BDD
  • Loading branch information
Dylan Wagstaff committed Oct 16, 2018
1 parent 93f9b31 commit a280eca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/src/components/ElementEditor/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Header extends Component {
ElementActionsComponent,
} = this.props;

const noTitle = i18n.inject(i18n._t('ElementHeader.NOTITLE', 'Untitled {type} element'), { type: elementType });
const noTitle = i18n.inject(i18n._t('ElementHeader.NOTITLE', 'Untitled {type} block'), { type: elementType });
const titleClasses = classNames({
'element-editor-header__title': true,
'element-editor-header__title--none': !title,
Expand Down
8 changes: 2 additions & 6 deletions tests/Behat/features/add-block-element.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ Feature: Add elements in the CMS
Then I press the "Add block" button
Then I press the "Content" button in the add block popover
And I wait 1 second
And I fill in "Eve's Block" for "Title"
# Note: using un-namespaced fields in PHP GridField
And I fill in "<p>Some content III</p>" for the "HTML" HTML field
And I press the "Create" button
Then I should see a "Saved content block" message
Then I should see "Untitled Content block" as the title for block 1

When I go to "/admin/pages/edit/show/6"
And I see a list of blocks
Then I wait 1 second
And I should see "Eve's Block"
And I should see "Untitled Content block"

0 comments on commit a280eca

Please sign in to comment.