select-kit refactoring

* better test helper
* more reliable tests
* more consistent use of data-value/data-name/title/aria-label everywhere: header and rows
This commit is contained in:
Joffrey JAFFEUX
2017-12-22 13:08:12 +01:00
committed by GitHub
parent 364e6fdd53
commit 315b9d796d
60 changed files with 827 additions and 641 deletions

View File

@@ -48,16 +48,13 @@ QUnit.test("Showing and hiding the edit controls", assert => {
});
QUnit.test("Updating the topic title and category", assert => {
const categoryChooser = selectKit('.title-wrapper .category-chooser');
visit("/t/internationalization-localization/280");
click('#topic-title .d-icon-pencil');
fillIn('#edit-title', 'this is the new title');
expandSelectKit('.title-wrapper .category-chooser');
selectKitSelectRow(4, {selector: '.title-wrapper .category-chooser'});
categoryChooser.expand().selectRowByValue(4);
click('#topic-title .submit-edit');
andThen(() => {
@@ -104,7 +101,7 @@ QUnit.test("Reply as new topic", assert => {
"it fills composer with the ring string"
);
assert.equal(
selectKit('.category-chooser').header.name(), "feature",
selectKit('.category-chooser').header().value(), "2",
"it fills category selector with the right category"
);
});