home.e2e.js 453 Bytes
Newer Older
1 2
const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;

afc163's avatar
afc163 committed
3
describe('Homepage', () => {
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
4 5 6
  beforeAll(async () => {
    jest.setTimeout(1000000);
  });
afc163's avatar
afc163 committed
7
  it('it should have logo text', async () => {
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
8 9 10 11
    await page.goto(BASE_URL);
    await page.waitForSelector('h1', {
      timeout: 2000,
    });
12 13
    const text = await page.evaluate(() => document.getElementsByTagName('h1')[0].innerText);
    expect(text).toContain('Ant Design Pro');
afc163's avatar
afc163 committed
14 15
  });
});