wip -- disambiguation works, tests passing
This commit is contained in:
@@ -125,11 +125,7 @@ async function resetEditor() {
|
||||
*/
|
||||
async function typeString(text) {
|
||||
for (const character of text) {
|
||||
if (character == ' ') {
|
||||
await page.keyboard.press('Space');
|
||||
} else {
|
||||
await page.keyboard.insertText(character);
|
||||
}
|
||||
await page.keyboard.insertText(character);
|
||||
await page.waitForTimeout(DELAY);
|
||||
}
|
||||
}
|
||||
@@ -284,11 +280,12 @@ async function runTests() {
|
||||
assert(markdown === '*italic*', `Expected "*italic*", got: "${markdown}"`);
|
||||
});
|
||||
|
||||
await test('***bold-italic*** produces md-bold-italic span', async () => {
|
||||
await test('***bold-italic*** produces md-bold anad md-italic spans', async () => {
|
||||
await resetEditor();
|
||||
await typeString('***both***');
|
||||
const html = await getHTML();
|
||||
assert(html.includes('md-bold-italic'), `Expected md-bold-italic span: ${html}`);
|
||||
assert(html.includes('md-bold'), `Expected md-bold-italic span: ${html}`);
|
||||
assert(html.includes('md-italic'), `Expected md-italic span: ${html}`);
|
||||
const markdown = await getMarkdown();
|
||||
assert(markdown === '***both***', `Expected "***both***", got: "${markdown}"`);
|
||||
});
|
||||
@@ -327,12 +324,14 @@ async function runTests() {
|
||||
await typeString(testCase.markdown);
|
||||
|
||||
const markdown = await getMarkdown();
|
||||
const html = await getHTML();
|
||||
console.log(`MARKDOWN: ${markdown}`);
|
||||
console.log(`HTML: ${html}`);
|
||||
assert(
|
||||
markdown === testCase.markdown,
|
||||
`Round-trip failed.\nExpected: "${testCase.markdown}"\nGot: "${markdown}"`
|
||||
);
|
||||
|
||||
const html = await getHTML();
|
||||
const outerIndex = html.indexOf(testCase.outerClass);
|
||||
const innerIndex = html.indexOf(testCase.innerClass);
|
||||
assert(
|
||||
|
||||
Reference in New Issue
Block a user