forked from c-w/mathquill4quill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.js
34 lines (33 loc) · 916 Bytes
/
tests.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* eslint-env node */
module.exports = {
"Is the formula editor visible": function(browser) {
browser
.useXpath()
.url("http://localhost:8000")
.waitForElementVisible('//*[@id="editor"]')
.click('//button[@class="ql-formula"]')
.waitForElementVisible('//div[@data-mode="formula"]');
},
"Is the formula editor using mathquill": function(browser) {
browser
.useXpath()
.assert.attributeContains(
'//div[@data-mode="formula"]/span',
"class",
"mq-editable-field mq-math-mode"
);
},
"Can an equation be inserted": function(browser) {
browser
.useXpath()
.keys(["x", "^", "2"])
.click('//a[@class="ql-action"]')
.waitForElementVisible('//span[@class="ql-formula"]')
.assert.attributeContains(
'//span[@class="ql-formula"]',
"data-value",
"x^2"
)
.end();
}
};