mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-6563] cleanup protractor configs and e2e for extensibility (#3591)
* cleanup extensibility configs and protractor e2e * cleanup * cleanup
This commit is contained in:
@@ -86,13 +86,6 @@ export class Utils {
|
||||
return crypto.getRandomValues(new Uint32Array(1))[0].toString(36).substring(0, 5).toLowerCase();
|
||||
}
|
||||
|
||||
static async setSessionStorageFromConfig(configFileName: string): Promise<void> {
|
||||
const configFile = `${browser.params.e2eRootPath}/resources/extensibility-configs/${configFileName}`;
|
||||
const fileContent = JSON.stringify(fs.readFileSync(configFile, { encoding: 'utf8' }));
|
||||
|
||||
await browser.executeScript(`window.sessionStorage.setItem('app.extension.config', ${fileContent});`);
|
||||
}
|
||||
|
||||
static retryCall(fn: () => Promise<any>, retry: number = 30, delay: number = 1500): Promise<any> {
|
||||
const pause = (duration: number) => new Promise((res) => setTimeout(res, duration));
|
||||
|
||||
@@ -184,10 +177,6 @@ export class Utils {
|
||||
await browser.actions().sendKeys(protractor.Key.NULL).perform();
|
||||
}
|
||||
|
||||
static formatDate(date: string): string {
|
||||
return new Date(date).toLocaleDateString('en-US');
|
||||
}
|
||||
|
||||
static async uploadFileNewVersion(fileFromOS: string): Promise<void> {
|
||||
const el = browser.element(by.id('app-upload-file-version'));
|
||||
await el.sendKeys(`${browser.params.e2eRootPath}/resources/test-files/${fileFromOS}`);
|
||||
|
Reference in New Issue
Block a user