add Hide/Restore presentation test
This commit is contained in:
parent
d8ffd698ef
commit
ff338c0198
@ -54,6 +54,7 @@ const PresentationOptionsContainer = ({
|
|||||||
<Button
|
<Button
|
||||||
className={cx(styles.button, !isLayoutSwapped || styles.btn)}
|
className={cx(styles.button, !isLayoutSwapped || styles.btn)}
|
||||||
icon={`${buttonType}${isLayoutSwapped ? '_off' : ''}`}
|
icon={`${buttonType}${isLayoutSwapped ? '_off' : ''}`}
|
||||||
|
data-test="restorePresentationButton"
|
||||||
label={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationLabel : intlMessages.minimizePresentationLabel)}
|
label={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationLabel : intlMessages.minimizePresentationLabel)}
|
||||||
aria-label={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationLabel : intlMessages.minimizePresentationLabel)}
|
aria-label={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationLabel : intlMessages.minimizePresentationLabel)}
|
||||||
aria-describedby={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationDesc : intlMessages.minimizePresentationDesc)}
|
aria-describedby={intl.formatMessage(isLayoutSwapped ? intlMessages.restorePresentationDesc : intlMessages.minimizePresentationDesc)}
|
||||||
|
@ -174,6 +174,7 @@ exports.confirmManagePresentation = 'button[data-test="confirmManagePresentation
|
|||||||
exports.allowPresentationDownload = 'button[data-test="allowPresentationDownload"]';
|
exports.allowPresentationDownload = 'button[data-test="allowPresentationDownload"]';
|
||||||
exports.disallowPresentationDownload = 'button[data-test="disallowPresentationDownload"]';
|
exports.disallowPresentationDownload = 'button[data-test="disallowPresentationDownload"]';
|
||||||
exports.uploadPresentationFileName = 'uploadTest.png';
|
exports.uploadPresentationFileName = 'uploadTest.png';
|
||||||
|
exports.presentationContainer = 'div[class^="presentationContainer--"]';
|
||||||
|
|
||||||
// User
|
// User
|
||||||
exports.firstUser = '[data-test="userListItemCurrent"]';
|
exports.firstUser = '[data-test="userListItemCurrent"]';
|
||||||
|
@ -129,6 +129,25 @@ class Presentation {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async hideAndRestorePresentation(testName) {
|
||||||
|
try {
|
||||||
|
await this.modPage.waitForSelector(e.whiteboard);
|
||||||
|
await this.modPage.screenshot(testName, '01-after-close-audio-modal');
|
||||||
|
await this.modPage.waitAndClick(e.minimizePresentation);
|
||||||
|
const presentationWasRemoved = await this.modPage.wasRemoved(e.presentationContainer);
|
||||||
|
await this.modPage.screenshot(testName, '02-minimize-presentation');
|
||||||
|
|
||||||
|
await this.modPage.waitAndClick(e.restorePresentation);
|
||||||
|
const presentationWasRestored = await this.modPage.hasElement(e.presentationContainer);
|
||||||
|
await this.modPage.screenshot(testName, '03-restore-presentation');
|
||||||
|
|
||||||
|
return presentationWasRemoved && presentationWasRestored;
|
||||||
|
} catch (err) {
|
||||||
|
await this.modPage.logger(err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = exports = Presentation;
|
module.exports = exports = Presentation;
|
@ -98,5 +98,27 @@ const presentationTest = () => {
|
|||||||
expect(response).toBe(true);
|
expect(response).toBe(true);
|
||||||
Page.checkRegression(24.62, screenshot);
|
Page.checkRegression(24.62, screenshot);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Hide/Restore presentation', async () => {
|
||||||
|
const test = new Presentation();
|
||||||
|
let response;
|
||||||
|
let screenshot;
|
||||||
|
try {
|
||||||
|
const testName = 'hideAndRestorePresentation';
|
||||||
|
await test.modPage.logger('begin of ', testName);
|
||||||
|
await test.initModPage(testName);
|
||||||
|
await test.modPage.startRecording(testName);
|
||||||
|
response = await test.hideAndRestorePresentation(testName);
|
||||||
|
await test.modPage.stopRecording();
|
||||||
|
screenshot = await test.modPage.page.screenshot();
|
||||||
|
await test.modPage.logger('end of ', testName);
|
||||||
|
} catch (e) {
|
||||||
|
await test.modPage.logger(e);
|
||||||
|
} finally {
|
||||||
|
await test.modPage.close();
|
||||||
|
}
|
||||||
|
expect(response).toBe(true);
|
||||||
|
Page.checkRegression(24.62, screenshot);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
module.exports = exports = presentationTest;
|
module.exports = exports = presentationTest;
|
||||||
|
Loading…
Reference in New Issue
Block a user