topMenu.e2e.js 476 B

123456789101112131415
  1. const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;
  2. describe('Homepage', () => {
  3. it('topmenu should have footer', async () => {
  4. const params = '?navTheme=light&layout=topmenu';
  5. await page.goto(`${BASE_URL}${params}`);
  6. await page.waitForSelector('footer', {
  7. timeout: 2000,
  8. });
  9. const haveFooter = await page.evaluate(
  10. () => document.getElementsByTagName('footer').length > 0,
  11. );
  12. expect(haveFooter).toBeTruthy();
  13. });
  14. });