ep_font_size 0.4.104 → 0.4.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "Apply sizes to fonts",
3
3
  "name": "ep_font_size",
4
- "version": "0.4.104",
4
+ "version": "0.4.105",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
7
7
  "name": "John McLear",
@@ -64,8 +64,14 @@ test.describe('ep_font_size', () => {
64
64
  // Index 22 → font-size:60 (largest published option in the legacy spec).
65
65
  await setFontSizeIndex(page, '22');
66
66
 
67
- const heightOf = () => page.evaluate(() => {
68
- const f = document.querySelector<HTMLIFrameElement>('iframe[name="ace_inner"]')!;
67
+ // The ace_inner iframe lives inside the ace_outer iframe, so a top-level
68
+ // page.evaluate() can't see it (document.querySelector returns null and
69
+ // getComputedStyle then throws "parameter 1 is not of type 'Element'").
70
+ // Run the lookup in the ace_outer frame's document instead.
71
+ const outerFrame = page.frame('ace_outer')!;
72
+ const heightOf = () => outerFrame.evaluate(() => {
73
+ const f = document.querySelector<HTMLIFrameElement>('iframe[name="ace_inner"]');
74
+ if (!f) return 0;
69
75
  return parseInt(window.getComputedStyle(f).height || '0', 10);
70
76
  });
71
77
  await expect.poll(heightOf, {timeout: 10_000}).toBeGreaterThan(2000);