bigbluebutton-Github/bigbluebutton-tests/puppeteer/virtualizedlist/virtualizedlist.obj.js

31 lines
1.0 KiB
JavaScript
Raw Normal View History

const VirtualizedList = require('./virtualize');
const { TEST_DURATION_TIME } = require('../core/constants');
2020-10-09 03:25:35 +08:00
const { toMatchImageSnapshot } = require('jest-image-snapshot');
expect.extend({ toMatchImageSnapshot });
const virtualizedListTest = () => {
test('Virtualized Users List', async () => {
const test = new VirtualizedList();
let response;
2020-10-09 03:25:35 +08:00
let screenshot;
try {
const testName = 'virtualizedUserList';
await test.page1.logger('begin of ', testName);
await test.init(undefined, testName);
await test.page1.startRecording(testName);
response = await test.test();
await test.page1.stopRecording();
2020-10-09 03:25:35 +08:00
screenshot = await test.page1.page.screenshot();
await test.page1.logger('end of ', testName);
2021-08-26 22:13:18 +08:00
} catch (err) {
await test.page1.logger(err);
} finally {
await test.close();
}
expect(response).toBe(true);
await Page.checkRegression(0.05, screenshot);
}, parseInt(TEST_DURATION_TIME));
};
module.exports = exports = virtualizedListTest;