Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/behat/wordcount.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Feature: Atto wordcount button
And I click on "HTML" "button"
And I set the field "Description" to "<p></p>"
When I click on "HTML" "button"
Then I should see "Words: 0"
Then I should see "Words:"
And I should see "0"

@javascript
Scenario: Count words on atto is Words only
Expand All @@ -48,7 +49,8 @@ Feature: Atto wordcount button
<p></p>
"""
When I click on "HTML" "button"
Then I should see "Words: 428"
Then I should see "Words:"
And I should see "428"

@javascript
Scenario: Count words on atto is Words With Multimedia
Expand Down Expand Up @@ -99,4 +101,5 @@ Feature: Atto wordcount button
And I set the field "Muted" to "1"
And I set the field "Loop" to "1"
When I click on "Insert media" "button"
Then I should see "Words: 430"
Then I should see "Words:"
And I should see "430"
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Y.namespace('M.atto_wordcount').Button = Y.Base.create('button', Y.M.editor_atto
wrapper.appendChild(
Y.Node.create('<div class="' + this.toolbar.getAttribute('class') + ' editor_atto_toolbar_bottom p-0 d-flex">' +
'<div class="d-inline-flex p-0"><strong>'
+ M.util.get_string('words', 'atto_wordcount') + ': ' +
+ M.util.get_string('words', 'atto_wordcount') + ':&#160;' +
'</strong><span id="' + this.counterid + '">0</span>' +
'</div></div>'));
this._count(host.get('editor'));
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Y.namespace('M.atto_wordcount').Button = Y.Base.create('button', Y.M.editor_atto
wrapper.appendChild(
Y.Node.create('<div class="' + this.toolbar.getAttribute('class') + ' editor_atto_toolbar_bottom p-0 d-flex">' +
'<div class="d-inline-flex p-0"><strong>'
+ M.util.get_string('words', 'atto_wordcount') + ': ' +
+ M.util.get_string('words', 'atto_wordcount') + ':&#160;' +
'</strong><span id="' + this.counterid + '">0</span>' +
'</div></div>'));
this._count(host.get('editor'));
Expand Down
2 changes: 1 addition & 1 deletion yui/src/button/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Y.namespace('M.atto_wordcount').Button = Y.Base.create('button', Y.M.editor_atto
wrapper.appendChild(
Y.Node.create('<div class="' + this.toolbar.getAttribute('class') + ' editor_atto_toolbar_bottom p-0 d-flex">' +
'<div class="d-inline-flex p-0"><strong>'
+ M.util.get_string('words', 'atto_wordcount') + ': ' +
+ M.util.get_string('words', 'atto_wordcount') + ':&#160;' +
'</strong><span id="' + this.counterid + '">0</span>' +
'</div></div>'));
this._count(host.get('editor'));
Expand Down