-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable saving formula by hitting the enter key (#31)
* Split tests into multiple suites * Enable saving formula by hitting the enter key
- Loading branch information
Showing
5 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* 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" | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* 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"]'); | ||
}, | ||
"Can an equation be inserted": function(browser) { | ||
browser | ||
.useXpath() | ||
.keys(["x", "^", "3", browser.Keys.RETURN]) | ||
.waitForElementVisible('//span[@class="ql-formula"]') | ||
.assert.attributeContains( | ||
'//span[@class="ql-formula"]', | ||
"data-value", | ||
"x^3" | ||
) | ||
.end(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters