(browser, id)
| 58 | } |
| 59 | |
| 60 | async function getSrc(browser, id) { |
| 61 | const src = await browser.elementById(id).getAttribute('src') |
| 62 | if (src) { |
| 63 | const url = new URL(src, `http://localhost:${appPort}`) |
| 64 | return url.href.slice(url.origin.length) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | function getRatio(width, height) { |
| 69 | return height / width |
no test coverage detected