alessandro trinca tornidor
commited on
Commit
·
fae4bda
1
Parent(s):
b5b3e0a
test: add some console.log()
Browse files
static/tests/test-classic-0-lite.koboldai.net.spec.ts
CHANGED
|
@@ -105,7 +105,7 @@ test('test My Ghost Writer/1: READ-ONLY navigation, 1 click, assert thesaurus ri
|
|
| 105 |
})
|
| 106 |
|
| 107 |
test('test My Ghost Writer/2: EDITABLE, like READ-ONLY plus single synonym substitution', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
|
| 108 |
-
|
| 109 |
await fillInputFieldWithString(page, 'look');
|
| 110 |
await page.waitForTimeout(200)
|
| 111 |
const state = "editable"
|
|
@@ -121,10 +121,11 @@ test('test My Ghost Writer/2: EDITABLE, like READ-ONLY plus single synonym subst
|
|
| 121 |
|
| 122 |
await expect(page.getByRole('searchbox', { name: 'synonym mod Input' })).toBeEnabled();
|
| 123 |
await expect(page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' })).toBeEnabled();
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
await
|
| 127 |
-
await
|
|
|
|
| 128 |
await page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' }).click();
|
| 129 |
await page.waitForTimeout(200)
|
| 130 |
|
|
|
|
| 105 |
})
|
| 106 |
|
| 107 |
test('test My Ghost Writer/2: EDITABLE, like READ-ONLY plus single synonym substitution', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
|
| 108 |
+
const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
|
| 109 |
await fillInputFieldWithString(page, 'look');
|
| 110 |
await page.waitForTimeout(200)
|
| 111 |
const state = "editable"
|
|
|
|
| 121 |
|
| 122 |
await expect(page.getByRole('searchbox', { name: 'synonym mod Input' })).toBeEnabled();
|
| 123 |
await expect(page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' })).toBeEnabled();
|
| 124 |
+
const synonymButton000 = page.getByRole('button', { name: 'synonym-button-0-0-0' })
|
| 125 |
+
await expect(synonymButton000).toBeEnabled();
|
| 126 |
+
await synonymButton000.click();
|
| 127 |
+
await page.waitForTimeout(200)
|
| 128 |
+
await expect(synonymButton000).toHaveClass("inflated-synonym-option synonym-selected")
|
| 129 |
await page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' }).click();
|
| 130 |
await page.waitForTimeout(200)
|
| 131 |
|
static/tests/test-helper.ts
CHANGED
|
@@ -182,6 +182,7 @@ export async function expectVisibleTextWithWalker(
|
|
| 182 |
const container = document.getElementById(idElement);
|
| 183 |
if (!!container && !container.textContent?.includes(expected)) {
|
| 184 |
console.error("expectVisibleTextWithWalker::DEBUG:expected:", expected, "#")
|
|
|
|
| 185 |
}
|
| 186 |
return !!container && container.textContent?.includes(expected);
|
| 187 |
},
|
|
|
|
| 182 |
const container = document.getElementById(idElement);
|
| 183 |
if (!!container && !container.textContent?.includes(expected)) {
|
| 184 |
console.error("expectVisibleTextWithWalker::DEBUG:expected:", expected, "#")
|
| 185 |
+
console.error("expectVisibleTextWithWalker::DEBUG:container.textContent:", container.textContent, "#")
|
| 186 |
}
|
| 187 |
return !!container && container.textContent?.includes(expected);
|
| 188 |
},
|