mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 21:03:19 +03:00
Fix browser name change test not actually changing name
This commit is contained in:
parent
4d998ac589
commit
a14f174183
2 changed files with 24 additions and 17 deletions
|
@ -23,24 +23,25 @@ const desktop = {
|
||||||
const devices = [desktop, phone, tablet, tabletLandscape];
|
const devices = [desktop, phone, tablet, tabletLandscape];
|
||||||
|
|
||||||
describe('Frontend web page', () => {
|
describe('Frontend web page', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
listenForErrors(browser, page);
|
listenForErrors(browser, page);
|
||||||
await page.goto('http://localhost:5309');
|
await page.goto('http://localhost:5309');
|
||||||
await page.waitForTimeout(3000);
|
await page.waitForTimeout(3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
devices.forEach(async function (device) {
|
devices.forEach(async function (device) {
|
||||||
const newName = 'frontend-browser-test-name-change-'+device.name;
|
const newName = 'frontend-browser-test-name-change-' + device.name;
|
||||||
const fakeMessage =
|
const fakeMessage =
|
||||||
'this is a test chat message sent via the automated browser tests on the main web frontend from ' + device.name;
|
'this is a test chat message sent via the automated browser tests on the main web frontend from ' +
|
||||||
|
device.name;
|
||||||
interactiveChatTest(browser, page, newName, fakeMessage, device.name);
|
|
||||||
videoTest(browser, page);
|
interactiveChatTest(browser, page, newName, fakeMessage, device.name);
|
||||||
|
videoTest(browser, page);
|
||||||
await page.waitForTimeout(2000);
|
|
||||||
await page.screenshot({
|
await page.waitForTimeout(2000);
|
||||||
path: 'screenshots/screenshot_main-' + device.name + '.png',
|
await page.screenshot({
|
||||||
fullPage: true,
|
path: 'screenshots/screenshot_main-' + device.name + '.png',
|
||||||
});
|
fullPage: true,
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,11 +32,17 @@ async function interactiveChatTest(
|
||||||
await page.evaluate(() =>
|
await page.evaluate(() =>
|
||||||
document.querySelector('#username-change-input').click()
|
document.querySelector('#username-change-input').click()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await page.type('#username-change-input', newName);
|
||||||
|
|
||||||
await page.waitForSelector('#button-update-username');
|
await page.waitForSelector('#button-update-username');
|
||||||
|
|
||||||
await page.evaluate(() =>
|
await page.evaluate(() =>
|
||||||
document.querySelector('#button-update-username').click()
|
document.querySelector('#button-update-username').click()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// page.keyboard.press('Enter');
|
||||||
|
await page.waitForTimeout(3000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should allow typing a chat message', async () => {
|
it('should allow typing a chat message', async () => {
|
||||||
|
|
Loading…
Reference in a new issue