browser example

This commit is contained in:
Pavel Murygin
2022-02-15 23:15:09 +03:00
parent f36f92297a
commit 679d2e7c7c
8 changed files with 41573 additions and 46701 deletions

View File

@ -0,0 +1,20 @@
describe('smoke test', () => {
it('should work', async () => {
console.log('going to the page in browser...');
await page.goto('http://localhost:3000/');
console.log('waiting for fluence to connect...');
await page.waitForTimeout(1000);
console.log('clicking button...');
await page.click('#btn');
console.log('waiting for relay time to appear...');
const elem = await page.waitForSelector('#relayTime');
console.log('getting the content of relay time div...');
const content = await elem?.evaluate((x) => x.textContent);
expect(content?.length).toBeGreaterThan(10);
}, 10000);
});