commit
830357c81c
|
@ -93,8 +93,9 @@ describe("Language select and change", function(){
|
||||||
|
|
||||||
//select arabic
|
//select arabic
|
||||||
$languageoption.attr('selected','selected');
|
$languageoption.attr('selected','selected');
|
||||||
$language.change();
|
$language.val("ar");
|
||||||
|
$languageoption.change();
|
||||||
|
|
||||||
helper.waitFor(function() {
|
helper.waitFor(function() {
|
||||||
return chrome$("html")[0]["dir"] != 'ltr';
|
return chrome$("html")[0]["dir"] != 'ltr';
|
||||||
})
|
})
|
||||||
|
@ -104,5 +105,32 @@ describe("Language select and change", function(){
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("changes direction when picking an ltr lang", function(done) {
|
||||||
|
var inner$ = helper.padInner$;
|
||||||
|
var chrome$ = helper.padChrome$;
|
||||||
|
|
||||||
|
//click on the settings button to make settings visible
|
||||||
|
var $settingsButton = chrome$(".buttonicon-settings");
|
||||||
|
$settingsButton.click();
|
||||||
|
|
||||||
|
//click the language button
|
||||||
|
var $language = chrome$("#languagemenu");
|
||||||
|
var $languageoption = $language.find("[value=en]");
|
||||||
|
|
||||||
|
//select english
|
||||||
|
//select arabic
|
||||||
|
$languageoption.attr('selected','selected');
|
||||||
|
$language.val("en");
|
||||||
|
$languageoption.change();
|
||||||
|
|
||||||
|
helper.waitFor(function() {
|
||||||
|
return chrome$("html")[0]["dir"] != 'rtl';
|
||||||
|
})
|
||||||
|
.done(function(){
|
||||||
|
// check if the document's direction was changed
|
||||||
|
expect(chrome$("html")[0]["dir"]).to.be("ltr");
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue