home.e2e.js 453 Bytes
Newer Older
sin's avatar
sin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;

describe('Homepage', () => {
  beforeAll(async () => {
    jest.setTimeout(1000000);
  });
  it('it should have logo text', async () => {
    await page.goto(BASE_URL);
    await page.waitForSelector('h1', {
      timeout: 5000,
    });
    const text = await page.evaluate(() => document.getElementsByTagName('h1')[0].innerText);
    expect(text).toContain('Ant Design Pro');
  });
});