-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-picked changesets: 5ed002c marker dao ® - TextEditor: Replace destructuring 631d26b Shpileva Yuliya - Accordion: fix title render in react if template is used (T1166943) (#24824)
- Loading branch information
Showing
4 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import ko from 'knockout'; | ||
import TextBox from 'ui/text_box'; | ||
|
||
import 'integration/knockout'; | ||
|
||
const PLACEHOLDER_CLASS = 'dx-placeholder'; | ||
|
||
if(QUnit.urlParams['nojquery']) { | ||
QUnit.module('textBox'); | ||
} else { | ||
QUnit.module.skip('textBox'); | ||
} | ||
|
||
QUnit.testStart(function() { | ||
const textBoxContainer = document.createElement('div'); | ||
|
||
textBoxContainer.setAttribute('id', 'text-box'); | ||
|
||
document.getElementById('qunit-fixture').appendChild(textBoxContainer); | ||
}); | ||
|
||
QUnit.test('text box placeholder must have a string value', function(assert) { | ||
const $textBox = document.getElementById('text-box'); | ||
|
||
new TextBox($textBox, { placeholder: ko.computed(_ => 'CUSTOM') }); | ||
|
||
const $placeholder = document.getElementsByClassName(PLACEHOLDER_CLASS)[0]; | ||
|
||
assert.strictEqual($placeholder.getAttribute('data-dx_placeholder'), 'CUSTOM'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters