Renamed e2e testing file function or variable

This commit is contained in:
Rajnikant Lodhi 2022-07-21 16:32:09 +05:30
parent 7a79835a8d
commit 4b0499e373
10 changed files with 24 additions and 24 deletions

View File

@ -28,7 +28,7 @@ export class ControllersPage {
return browser.driver.findElements(by.css('mat-cell'));
}
async navigateToServerProjects() {
async navigateToControllerProjects() {
this.helper.sleep(2000);
let hyperlinks = await browser.driver.findElements(by.css('a.table-link'));
let controllerLink;

View File

@ -18,7 +18,7 @@ describe('Project map page', () => {
controllersPage.maximizeWindow();
await controllersPage.navigateToControllersPage();
await controllersPage.clickAddController();
await controllersPage.navigateToServerProjects();
await controllersPage.navigateToControllerProjects();
await projectsPage.openAddProjectDialog();
helper.sleep(2000);
await projectsPage.createProject();

View File

@ -1,6 +1,6 @@
import { TestHelper } from './helpers/common.po';
import { ProjectsPage } from './helpers/project.po';
import { ControllersPage } from './helpers/server.po';
import { ControllersPage } from './helpers/controller.po';
describe('Projects page', () => {
let controllersPage: ControllersPage;
@ -18,7 +18,7 @@ describe('Projects page', () => {
controllersPage.maximizeWindow();
await controllersPage.navigateToControllersPage();
await controllersPage.clickAddController();
await controllersPage.navigateToServerProjects();
await controllersPage.navigateToControllerProjects();
helper.sleep(2000);
//act

View File

@ -1,7 +1,7 @@
import { TestHelper } from './helpers/common.po';
import { ControllersPage } from './helpers/server.po';
import { ControllersPage } from './helpers/controller.po';
describe('Servers page', () => {
describe('Controllers page', () => {
let page: ControllersPage;
let helper: TestHelper;
@ -30,14 +30,14 @@ describe('Servers page', () => {
helper.sleep(1000);
// act
let firstRowOfServersTable = await page.checkControllersTable();
let serverData = [];
await helper.asyncForEach(firstRowOfServersTable, async (element) => {
serverData.push(await element.getText());
let firstRowOfControllersTable = await page.checkControllersTable();
let controllerData = [];
await helper.asyncForEach(firstRowOfControllersTable, async (element) => {
controllerData.push(await element.getText());
});
// assert
expect(serverData).toContain('127.0.0.1');
expect(serverData).toContain('3080');
expect(controllerData).toContain('127.0.0.1');
expect(controllerData).toContain('3080');
});
});

View File

@ -26,7 +26,7 @@ exports.startLocalController = async (controller) => {
});
}
exports.stopLocalServer = async (controller) => {
exports.stopLocalController = async (controller) => {
return await stop(controller.name);
}
@ -129,10 +129,10 @@ async function stopAll() {
async function stop(controllerName) {
let pid = undefined;
const runningServer = runningControllers[controllerName];
const runningController = runningControllers[controllerName];
if(runningServer !== undefined && runningServer.process) {
pid = runningServer.process.pid;
if(runningController !== undefined && runningController.process) {
pid = runningController.process.pid;
}
console.log(`Stopping '${controllerName}' with PID='${pid}'`);

View File

@ -93,7 +93,7 @@
</div>
<div class="buttons-bar">
<button *ngIf="isElectronApp" mat-raised-button class="button" (click)="startLocalServer()">
<button *ngIf="isElectronApp" mat-raised-button class="button" (click)="startLocalController()">
Start local controller
</button>
<button mat-raised-button class="button" color="primary" (click)="createModal()">Add Controller</button>

View File

@ -104,7 +104,7 @@ export class ControllersComponent implements OnInit, OnDestroy {
this.serverStatusSubscription.unsubscribe();
}
startLocalServer() {
startLocalController() {
const controller = this.serverDatabase.data.find((n) => n.location === 'bundled' || 'local');
this.startServer(controller);
}

View File

@ -29,10 +29,10 @@ describe('ControllerManagementService', () => {
remote: {
require: (file) => {
return {
startLocalServer: (serv) => {
startLocalController: (serv) => {
controller = serv;
},
stopLocalServer: (serv) => {
stopLocalController: (serv) => {
controller = serv;
},
};

View File

@ -32,11 +32,11 @@ export class ControllerManagementService implements OnDestroy {
message: '',
};
this.controllerStatusChanged.next(startingEvent);
return await this.electronService.remote.require('./local-server.js').startLocalServer(controller);
return await this.electronService.remote.require('./local-server.js').startLocalController(controller);
}
async stop(controller:Controller ) {
return await this.electronService.remote.require('./local-server.js').stopLocalServer(controller);
return await this.electronService.remote.require('./local-server.js').stopLocalController(controller);
}
async stopAll() {

View File

@ -33,8 +33,8 @@ export class VirtualBoxConfigurationService {
'PCnet-PCI II (Am79C970A)',
'PCNet-FAST III (Am79C973)',
'Intel PRO/1000 MT Desktop (82540EM)',
'Intel PRO/1000 TController (82543GC)',
'Intel PRO/1000 MTController (82545EM)',
'Intel PRO/1000 T Server (82543GC)',
'Intel PRO/1000 MT Server (82545EM)',
'Paravirtualized Network (virtio-net)',
];