import { expect } from "chai" ; import { describe , before , it } from "mocha" ; import { Notification } from "vscode-extension-tester" ; import { delay , openAdvplProject } from "../helper" ; import { FunctionsInspectorPageObject } from "../page-objects/functions-inspector-po" ; import { ObjectsInspectorPageObject } from "../page-objects/objects-inspector-po" ; import { RepositoryLogPageObject } from "../page-objects/repository-log-po" ; import { ServerTreeItemPageObject } from "../page-objects/server-tree-item-po" ; import { ServerViewPageObject } from "../page-objects/server-view-po" ; import { WorkbenchPageObject } from "../page-objects/workbench-po" ; import { ADMIN_USER_DATA , APPSERVER_DATA } from "../scenario" ; describe ( "RPO Operations" , ( ) => { let workbenchPO ; let serverTreePO ; let serverItemPO ; before ( async ( ) => { await openAdvplProject ( ) ; workbenchPO = new WorkbenchPageObject ( ) ; serverTreePO = new ServerViewPageObject ( ) ; await serverTreePO . addNewServer ( APPSERVER_DATA ) ; serverTreePO = new ServerViewPageObject ( ) ; await delay ( ) ; } ) ; after ( function ( ) { } ) ; beforeEach ( async ( ) => { await delay ( ) ; serverItemPO = await serverTreePO . connect ( APPSERVER_DATA . serverName , APPSERVER_DATA . environment , ADMIN_USER_DATA ) ; } ) ; afterEach ( async ( ) => { await delay ( ) ; await serverItemPO . fireDisconnectAction ( ) ; } ) ; it ( "Check Integrity" , async ( ) => { await serverItemPO . fireCheckIntegrity ( ) ; await workbenchPO . waitCheckIntegrity ( ) ; await delay ( ) ; expect ( await workbenchPO . isRpoIntegrity ( ) ) . is . true ; } ) ; it ( "Repository Log" , async ( ) => { await serverItemPO . fireRepositoryLog ( ) ; const repositoryLogPO = new RepositoryLogPageObject ( ) ; expect ( await repositoryLogPO . isOpen ( ) ) . is . true ; await repositoryLogPO . close ( ) ; } ) ; it ( "Objects Inspector" , async ( ) => { await serverItemPO . fireObjectsInspector ( ) ; const objectInspectorPO = new ObjectsInspectorPageObject ( ) ; expect ( await objectInspectorPO . isOpen ( ) ) . is . true ; await objectInspectorPO . close ( ) ; } ) ; it ( "Functions Inspector" , async ( ) => { await serverItemPO . fireFunctionsInspector ( ) ; const functionsInspectorPO = new FunctionsInspectorPageObject ( ) ; expect ( await functionsInspectorPO . isOpen ( ) ) . is . true ; await functionsInspectorPO . close ( ) ; } ) ; } ) ;