[ACS-6563] cleanup protractor configs and e2e for extensibility (#3591)

* cleanup extensibility configs and protractor e2e

* cleanup

* cleanup
This commit is contained in:
Denys Vuika
2024-01-10 09:09:11 -05:00
committed by GitHub
parent 58070d9666
commit 09aba59b06
45 changed files with 36 additions and 12837 deletions

View File

@@ -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}`);