Commit 2dd8937b authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Added inputmodeswitcher tests

parent bca4d433
......@@ -87,4 +87,37 @@ test.describe('Typeahead', function () {
)
)
});
test.it("should switch to readonly when clicking the button-enclosed element", function (done) {
driver.get(URL)
.then(
() => driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing some text')
.then(
driver.findElement(By.css('#input1 + div > button span'))
.then(
(button) => button.click()
)
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => textinput.sendKeys('typing in readonly field')
)
).then(
driver.findElement(By.id('input1'))
.then(
(textinput) => (textinput.getAttribute('value'))
.then(
text => {
should(text).be.exactly('typing some text');
done();
}
)
)
)
)
});
});
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment