alessandro trinca tornidor
		
	commited on
		
		
					Commit 
							
							·
						
						f3516da
	
1
								Parent(s):
							
							b8ff5d8
								
test: fix missing tests, mark as skipped test-classic-0 /3,/4 for MobileChromeLandscape because viewport is too short
Browse files- static/tests/test-classic-0-lite.koboldai.net.spec.ts +21 -2
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-MobileChrome.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-MobileSafari.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-iPad-gen-11-.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-responsivePortrait.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-MobileChrome.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-MobileSafari.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-iPad-gen-11-.txt +0 -0
- static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-responsivePortrait.txt +0 -0
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts
    CHANGED
    
    | @@ -10,6 +10,8 @@ import { | |
| 10 | 
             
              openMobileMenu
         | 
| 11 | 
             
            } from './test-helper'
         | 
| 12 |  | 
|  | |
|  | |
| 13 | 
             
            async function prepareTestWithOpenRightPanel(args:PrepareTestWithOpenRightPanelArg) {
         | 
| 14 | 
             
                let {page, expectedFirstAriaSnapshot, projectName, state, idWordRange, idText, candidateMatch, countCandidates, wordRangeText} = args;
         | 
| 15 | 
             
                if (state === "editable") {
         | 
| @@ -28,7 +30,7 @@ async function prepareTestWithOpenRightPanel(args:PrepareTestWithOpenRightPanelA | |
| 28 | 
             
                  - link /id-a-candidate-\\d+-nth/:
         | 
| 29 | 
             
                    - /url: "#"
         | 
| 30 | 
             
                  `);
         | 
| 31 | 
            -
                await expect(candidateElement).toContainText(`${candidateMatch} (${countCandidates})`); | 
| 32 | 
             
                await candidateElement.click();
         | 
| 33 | 
             
                await page.waitForTimeout(200)
         | 
| 34 |  | 
| @@ -130,7 +132,14 @@ test('test My Ghost Writer/2: EDITABLE, like READ-ONLY plus single synonym subst | |
| 130 | 
             
                const candidateMatch = "yelled"
         | 
| 131 | 
             
                const countCandidates = 6
         | 
| 132 | 
             
                await prepareTestWithOpenRightPanel({page, expectedFirstAriaSnapshot, projectName, state, idWordRange, idText, candidateMatch, countCandidates, wordRangeText})
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 133 |  | 
|  | |
| 134 | 
             
                await expect(page.getByRole('searchbox', { name: 'synonym mod Input' })).toBeEnabled();
         | 
| 135 | 
             
                await expect(page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' })).toBeEnabled();
         | 
| 136 | 
             
                const synonymButton000 = page.getByRole('button', { name: 'synonym-button-0-0-1' })
         | 
| @@ -158,7 +167,11 @@ test('test My Ghost Writer/2: EDITABLE, like READ-ONLY plus single synonym subst | |
| 158 | 
             
            })
         | 
| 159 |  | 
| 160 | 
             
            test('test My Ghost Writer/3: EDITABLE, like READ-ONLY plus multi-word synonym substitution, multiple times', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 161 | 
            -
             | 
|  | |
|  | |
|  | |
|  | |
| 162 | 
             
                await fillInputFieldWithString(page, 'rather severe-looking woman');
         | 
| 163 | 
             
                await page.waitForTimeout(200)
         | 
| 164 | 
             
                const state = "editable"
         | 
| @@ -254,6 +267,10 @@ test('test My Ghost Writer/3: EDITABLE, like READ-ONLY plus multi-word synonym s | |
| 254 |  | 
| 255 | 
             
            test('test My Ghost Writer/4: navigate between the list/tables containing the stemming; check for sentences sorrounding the clicked words', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 256 | 
             
              const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
         | 
|  | |
|  | |
|  | |
|  | |
| 257 | 
             
              await fillInputFieldWithString(page, 'look');
         | 
| 258 | 
             
              await page.waitForTimeout(200)
         | 
| 259 | 
             
              await expect(page.getByLabel('wordsearch_results')).not.toMatchAriaSnapshot(`- text: /40\\d results/`);
         | 
| @@ -295,6 +312,8 @@ test('test My Ghost Writer/4: navigate between the list/tables containing the st | |
| 295 |  | 
| 296 | 
             
            test('test My Ghost Writer/5: sort by frequency and alphabetically', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 297 | 
             
              const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
         | 
|  | |
|  | |
| 298 | 
             
              await page.getByRole('link', { name: 'Settings' }).click();
         | 
| 299 | 
             
              await page.getByRole('spinbutton', { name: 'wordsearch_n_max_words_duplicated' }).fill('2');
         | 
| 300 | 
             
              await page.getByRole('button', { name: 'OK' }).click();
         | 
|  | |
| 10 | 
             
              openMobileMenu
         | 
| 11 | 
             
            } from './test-helper'
         | 
| 12 |  | 
| 13 | 
            +
            const browserToSkip = ["MobileChromeLandscape"]
         | 
| 14 | 
            +
             | 
| 15 | 
             
            async function prepareTestWithOpenRightPanel(args:PrepareTestWithOpenRightPanelArg) {
         | 
| 16 | 
             
                let {page, expectedFirstAriaSnapshot, projectName, state, idWordRange, idText, candidateMatch, countCandidates, wordRangeText} = args;
         | 
| 17 | 
             
                if (state === "editable") {
         | 
|  | |
| 30 | 
             
                  - link /id-a-candidate-\\d+-nth/:
         | 
| 31 | 
             
                    - /url: "#"
         | 
| 32 | 
             
                  `);
         | 
| 33 | 
            +
                await expect(candidateElement).toContainText(`${candidateMatch} (${countCandidates})`);
         | 
| 34 | 
             
                await candidateElement.click();
         | 
| 35 | 
             
                await page.waitForTimeout(200)
         | 
| 36 |  | 
|  | |
| 132 | 
             
                const candidateMatch = "yelled"
         | 
| 133 | 
             
                const countCandidates = 6
         | 
| 134 | 
             
                await prepareTestWithOpenRightPanel({page, expectedFirstAriaSnapshot, projectName, state, idWordRange, idText, candidateMatch, countCandidates, wordRangeText})
         | 
| 135 | 
            +
                await page.getByRole('button', { name: 'id-rightpanel-thesaurus-close' }).click();
         | 
| 136 | 
            +
                await ensureThesaurusPanelClosed(page);
         | 
| 137 | 
            +
             | 
| 138 | 
            +
                await page.getByLabel('id-div-candidate-0-nth').click()
         | 
| 139 | 
            +
                await page.getByRole('link', { name: 'id-0-range-0-nth' }).click();
         | 
| 140 | 
            +
                await page.waitForTimeout(200)
         | 
| 141 |  | 
| 142 | 
            +
                await ensureThesaurusPanelOpen(page);
         | 
| 143 | 
             
                await expect(page.getByRole('searchbox', { name: 'synonym mod Input' })).toBeEnabled();
         | 
| 144 | 
             
                await expect(page.getByRole('button', { name: 'thesaurus-synonym-mod-confirm' })).toBeEnabled();
         | 
| 145 | 
             
                const synonymButton000 = page.getByRole('button', { name: 'synonym-button-0-0-1' })
         | 
|  | |
| 167 | 
             
            })
         | 
| 168 |  | 
| 169 | 
             
            test('test My Ghost Writer/3: EDITABLE, like READ-ONLY plus multi-word synonym substitution, multiple times', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 170 | 
            +
                const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
         | 
| 171 | 
            +
                if (browserToSkip.includes(projectName)) {
         | 
| 172 | 
            +
                  await page.close()
         | 
| 173 | 
            +
                  test.skip(browserToSkip.includes(projectName), `Still working on '${projectName}', test case 0-3!`);
         | 
| 174 | 
            +
                }
         | 
| 175 | 
             
                await fillInputFieldWithString(page, 'rather severe-looking woman');
         | 
| 176 | 
             
                await page.waitForTimeout(200)
         | 
| 177 | 
             
                const state = "editable"
         | 
|  | |
| 267 |  | 
| 268 | 
             
            test('test My Ghost Writer/4: navigate between the list/tables containing the stemming; check for sentences sorrounding the clicked words', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 269 | 
             
              const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
         | 
| 270 | 
            +
              if (browserToSkip.includes(projectName)) {
         | 
| 271 | 
            +
                await page.close()
         | 
| 272 | 
            +
                test.skip(browserToSkip.includes(projectName), `Still working on '${projectName}', test case 0-3!`);
         | 
| 273 | 
            +
              }
         | 
| 274 | 
             
              await fillInputFieldWithString(page, 'look');
         | 
| 275 | 
             
              await page.waitForTimeout(200)
         | 
| 276 | 
             
              await expect(page.getByLabel('wordsearch_results')).not.toMatchAriaSnapshot(`- text: /40\\d results/`);
         | 
|  | |
| 312 |  | 
| 313 | 
             
            test('test My Ghost Writer/5: sort by frequency and alphabetically', async ({ page }: { page: Page }, workerInfo: TestInfo) => {
         | 
| 314 | 
             
              const projectName = await initTest({page, workerInfo, filepath:testStoryJsonTxt})
         | 
| 315 | 
            +
              
         | 
| 316 | 
            +
              await openMobileMenu(page, "#found mobile button for global menu, open it to prepare json story upload!")
         | 
| 317 | 
             
              await page.getByRole('link', { name: 'Settings' }).click();
         | 
| 318 | 
             
              await page.getByRole('spinbutton', { name: 'wordsearch_n_max_words_duplicated' }).fill('2');
         | 
| 319 | 
             
              await page.getByRole('button', { name: 'OK' }).click();
         | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-MobileChrome.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-MobileSafari.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-iPad-gen-11-.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-0-responsivePortrait.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-MobileChrome.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-MobileSafari.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-iPad-gen-11-.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        static/tests/test-classic-0-lite.koboldai.net.spec.ts-snapshots/test-classic-0-5-wordsearch-results-1-responsivePortrait.txt
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  |