import {failUnless, gtState, safeNavigate, launch, sleep, cleanup} from './gtlib' jest.setTimeout((2).minutes()) const state = gtState() beforeEach(() => launch(state), (30).seconds()) test('it should display my name in the hero box', async () => { await sleep((1).second()) const page = await safeNavigate(state, 'https://garrettmills.dev') const heroBox = failUnless(await page.$('.hero-box'), 'Unable to find .hero-box') const name = await heroBox.evaluate(x => x.innerHTML.trim().toLowerCase()) failUnless(name.includes('garrett mills'), 'Unable to find name in .hero-box HTML') }) afterAll(() => cleanup(state))