github.com/siglens/siglens@v0.0.0-20240328180423-f7ce9ae441ed/ui-test/specs/search/search.js (about) 1 /* 2 Copyright 2023. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 /** 18 * siglens 19 * (c) 2022 - All rights reserved. 20 */ 21 22 'use strict'; 23 24 describe('search', () => { 25 let page; 26 27 before(async () => { 28 page = await browser.newPage(); 29 30 page.on('error', (err) => { 31 console.error('error happen at the page: ', err); 32 }); 33 34 page.on('pageerror', (pageerr) => { 35 console.error('pageerror occurred: ', pageerr); 36 }); 37 38 page.on('requestfailed', (err) => { 39 console.log(err); 40 }); 41 42 await page.goto(`file://${__dirname}/search.html`); 43 // await page.waitForNavigation(); 44 45 page.on('conosle', (msg) => { 46 console.log('PAGE LOG:', msg.text()); 47 }); 48 }); 49 50 it('should have the correct page title', async () => { 51 expect(await page.title()).to.eql('SigLens - Search'); 52 }); 53 54 });