mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Sonarcloud issues fixes (#3499)
* Sonarcloud issues fixes * Code smell fixes * Refactoring to remove new code duplications * Sonarcloud code smell fixes part I * Sonarcloud code smell fixes part II * Missing code smell fix * Add new ESLint rules to cover fixed SonarCloud issues * Add missing command * Add missing is existing check
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { Page, expect } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
export class MatMenuComponent extends BaseComponent {
|
||||
private static rootElement = '.mat-menu-content';
|
||||
|
@@ -22,11 +22,10 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { Page, expect } from '@playwright/test';
|
||||
import { BaseComponent } from './base.component';
|
||||
import { AcaHeader } from './aca-header.component';
|
||||
import { timeouts } from '../../utils';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
export class ViewerComponent extends BaseComponent {
|
||||
private static rootElement = 'adf-viewer';
|
||||
|
@@ -69,20 +69,17 @@ export abstract class BasePage extends PlaywrightBase {
|
||||
await this.page.goto(actualOptions.remoteUrl, {
|
||||
waitUntil: actualOptions.waitUntil
|
||||
});
|
||||
} else if (this.urlRequest && actualOptions.waitForRequest) {
|
||||
await Promise.all([
|
||||
this.page.goto(`./#/${this.pageUrl}${actualOptions.query}`, { waitUntil: 'load' }),
|
||||
this.page.waitForResponse(this.urlRequest)
|
||||
]);
|
||||
} else {
|
||||
if (this.urlRequest && actualOptions.waitForRequest) {
|
||||
await Promise.all([
|
||||
this.page.goto(`./#/${this.pageUrl}${actualOptions.query}`, { waitUntil: 'load' }),
|
||||
this.page.waitForResponse(this.urlRequest)
|
||||
]);
|
||||
} else {
|
||||
await this.page.goto(`./#/${this.pageUrl}${actualOptions.query}`, {
|
||||
waitUntil: actualOptions.waitUntil,
|
||||
timeout: 60000
|
||||
});
|
||||
}
|
||||
await this.page.goto(`./#/${this.pageUrl}${actualOptions.query}`, {
|
||||
waitUntil: actualOptions.waitUntil,
|
||||
timeout: 60000
|
||||
});
|
||||
}
|
||||
|
||||
await this.spinner.waitForReload();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user