mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-6572] break dependency on adf-testing (#3594)
* remove Logger dependency * remove BrowserVisibility dependency * remove BrowserActions dependency * remove ViewerPage dependency * remove ApiUtil dependency * remove StringUtil dependency * remove adf-testing dependency * bug fixes
This commit is contained in:
@@ -23,10 +23,10 @@
|
||||
*/
|
||||
|
||||
import { browser, protractor, ElementFinder, ExpectedConditions as EC, by, until, WebElement } from 'protractor';
|
||||
import { BrowserVisibility, Logger } from '@alfresco/adf-testing';
|
||||
import { BROWSER_WAIT_TIMEOUT } from '../configs';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { waitUntilElementIsPresent, waitUntilElementIsVisible } from './browser-visibility';
|
||||
|
||||
const StreamZip = require('node-stream-zip');
|
||||
const crypto = require('crypto');
|
||||
@@ -55,7 +55,7 @@ export async function waitForStaleness(element: ElementFinder, errorMessage?: st
|
||||
|
||||
export const isPresentAndEnabled = async (element: ElementFinder): Promise<boolean> => {
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsPresent(element);
|
||||
await waitUntilElementIsPresent(element);
|
||||
return element.isEnabled();
|
||||
} catch (error) {
|
||||
return false;
|
||||
@@ -64,7 +64,7 @@ export const isPresentAndEnabled = async (element: ElementFinder): Promise<boole
|
||||
|
||||
export const isPresentAndDisplayed = async (element: ElementFinder): Promise<boolean> => {
|
||||
try {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element);
|
||||
await waitUntilElementIsVisible(element);
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
@@ -131,7 +131,7 @@ export class Utils {
|
||||
if (fileExists) {
|
||||
fs.rename(oldFilePath, newFilePath, function (err: any) {
|
||||
if (err) {
|
||||
Logger.error(`==== rename err : failed to rename file from ${oldName} to ${newName} : `, err);
|
||||
console.error(`==== rename err : failed to rename file from ${oldName} to ${newName} : `, err);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -148,7 +148,7 @@ export class Utils {
|
||||
});
|
||||
|
||||
await zip.on('error', (err: any) => {
|
||||
Logger.error(`=== unzip err : failed to unzip ${filename} - ${unzippedName} :`, err);
|
||||
console.error(`=== unzip err : failed to unzip ${filename} - ${unzippedName} :`, err);
|
||||
});
|
||||
|
||||
await zip.on('ready', async () => {
|
||||
|
Reference in New Issue
Block a user