mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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"
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user