Skip to content

Commit

Permalink
tests: update tests to check for hidden stale results
Browse files Browse the repository at this point in the history
Previous tests look for stale results to be detached, now they are hidden to prevent layout jumps
  • Loading branch information
mgreminger committed Apr 28, 2024
1 parent e4a62de commit 7f2daa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_basic.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,9 +1288,9 @@ test('Check parsing error handling impact on displayed results', async () => {
content = await page.textContent('#result-value-1');
expect(parseLatexFloat(content)).toBeCloseTo(5.11, precision);

// leave cell, result should dissapear
// leave cell, result should be made hidden
await page.keyboard.press('Escape');
await page.locator('#result-value-1').waitFor({state: "detached", timeout: 500});
await page.locator('#cell-1 >> math-field:not(.editable)').waitFor({state: "hidden", timeout: 500});

});

Expand Down
2 changes: 1 addition & 1 deletion tests/test_file_save_open.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ test('Test clearing results on valid input after page initial load form file', a
await page.setLatex(0, '1=');

// ensure that result is not displayed even though it is in file
await page.locator('#result-value-0').waitFor({state: "detached", timeout: 1000});
await page.locator('#cell-0 >> math-field:not(.editable)').waitFor({state: "hidden", timeout: 1000});

});

Expand Down

0 comments on commit 7f2daa6

Please sign in to comment.