mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-25 07:31:04 +00:00
Renamed e2e testing file function or variable
This commit is contained in:
parent
7a79835a8d
commit
4b0499e373
@ -28,7 +28,7 @@ export class ControllersPage {
|
|||||||
return browser.driver.findElements(by.css('mat-cell'));
|
return browser.driver.findElements(by.css('mat-cell'));
|
||||||
}
|
}
|
||||||
|
|
||||||
async navigateToServerProjects() {
|
async navigateToControllerProjects() {
|
||||||
this.helper.sleep(2000);
|
this.helper.sleep(2000);
|
||||||
let hyperlinks = await browser.driver.findElements(by.css('a.table-link'));
|
let hyperlinks = await browser.driver.findElements(by.css('a.table-link'));
|
||||||
let controllerLink;
|
let controllerLink;
|
||||||
|
@ -18,7 +18,7 @@ describe('Project map page', () => {
|
|||||||
controllersPage.maximizeWindow();
|
controllersPage.maximizeWindow();
|
||||||
await controllersPage.navigateToControllersPage();
|
await controllersPage.navigateToControllersPage();
|
||||||
await controllersPage.clickAddController();
|
await controllersPage.clickAddController();
|
||||||
await controllersPage.navigateToServerProjects();
|
await controllersPage.navigateToControllerProjects();
|
||||||
await projectsPage.openAddProjectDialog();
|
await projectsPage.openAddProjectDialog();
|
||||||
helper.sleep(2000);
|
helper.sleep(2000);
|
||||||
await projectsPage.createProject();
|
await projectsPage.createProject();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { TestHelper } from './helpers/common.po';
|
import { TestHelper } from './helpers/common.po';
|
||||||
import { ProjectsPage } from './helpers/project.po';
|
import { ProjectsPage } from './helpers/project.po';
|
||||||
import { ControllersPage } from './helpers/server.po';
|
import { ControllersPage } from './helpers/controller.po';
|
||||||
|
|
||||||
describe('Projects page', () => {
|
describe('Projects page', () => {
|
||||||
let controllersPage: ControllersPage;
|
let controllersPage: ControllersPage;
|
||||||
@ -18,7 +18,7 @@ describe('Projects page', () => {
|
|||||||
controllersPage.maximizeWindow();
|
controllersPage.maximizeWindow();
|
||||||
await controllersPage.navigateToControllersPage();
|
await controllersPage.navigateToControllersPage();
|
||||||
await controllersPage.clickAddController();
|
await controllersPage.clickAddController();
|
||||||
await controllersPage.navigateToServerProjects();
|
await controllersPage.navigateToControllerProjects();
|
||||||
helper.sleep(2000);
|
helper.sleep(2000);
|
||||||
|
|
||||||
//act
|
//act
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { TestHelper } from './helpers/common.po';
|
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 page: ControllersPage;
|
||||||
let helper: TestHelper;
|
let helper: TestHelper;
|
||||||
|
|
||||||
@ -30,14 +30,14 @@ describe('Servers page', () => {
|
|||||||
helper.sleep(1000);
|
helper.sleep(1000);
|
||||||
|
|
||||||
// act
|
// act
|
||||||
let firstRowOfServersTable = await page.checkControllersTable();
|
let firstRowOfControllersTable = await page.checkControllersTable();
|
||||||
let serverData = [];
|
let controllerData = [];
|
||||||
await helper.asyncForEach(firstRowOfServersTable, async (element) => {
|
await helper.asyncForEach(firstRowOfControllersTable, async (element) => {
|
||||||
serverData.push(await element.getText());
|
controllerData.push(await element.getText());
|
||||||
});
|
});
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(serverData).toContain('127.0.0.1');
|
expect(controllerData).toContain('127.0.0.1');
|
||||||
expect(serverData).toContain('3080');
|
expect(controllerData).toContain('3080');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@ exports.startLocalController = async (controller) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.stopLocalServer = async (controller) => {
|
exports.stopLocalController = async (controller) => {
|
||||||
return await stop(controller.name);
|
return await stop(controller.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,10 +129,10 @@ async function stopAll() {
|
|||||||
async function stop(controllerName) {
|
async function stop(controllerName) {
|
||||||
let pid = undefined;
|
let pid = undefined;
|
||||||
|
|
||||||
const runningServer = runningControllers[controllerName];
|
const runningController = runningControllers[controllerName];
|
||||||
|
|
||||||
if(runningServer !== undefined && runningServer.process) {
|
if(runningController !== undefined && runningController.process) {
|
||||||
pid = runningServer.process.pid;
|
pid = runningController.process.pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Stopping '${controllerName}' with PID='${pid}'`);
|
console.log(`Stopping '${controllerName}' with PID='${pid}'`);
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons-bar">
|
<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
|
Start local controller
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button class="button" color="primary" (click)="createModal()">Add Controller</button>
|
<button mat-raised-button class="button" color="primary" (click)="createModal()">Add Controller</button>
|
||||||
|
@ -104,7 +104,7 @@ export class ControllersComponent implements OnInit, OnDestroy {
|
|||||||
this.serverStatusSubscription.unsubscribe();
|
this.serverStatusSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
startLocalServer() {
|
startLocalController() {
|
||||||
const controller = this.serverDatabase.data.find((n) => n.location === 'bundled' || 'local');
|
const controller = this.serverDatabase.data.find((n) => n.location === 'bundled' || 'local');
|
||||||
this.startServer(controller);
|
this.startServer(controller);
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,10 @@ describe('ControllerManagementService', () => {
|
|||||||
remote: {
|
remote: {
|
||||||
require: (file) => {
|
require: (file) => {
|
||||||
return {
|
return {
|
||||||
startLocalServer: (serv) => {
|
startLocalController: (serv) => {
|
||||||
controller = serv;
|
controller = serv;
|
||||||
},
|
},
|
||||||
stopLocalServer: (serv) => {
|
stopLocalController: (serv) => {
|
||||||
controller = serv;
|
controller = serv;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -32,11 +32,11 @@ export class ControllerManagementService implements OnDestroy {
|
|||||||
message: '',
|
message: '',
|
||||||
};
|
};
|
||||||
this.controllerStatusChanged.next(startingEvent);
|
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 ) {
|
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() {
|
async stopAll() {
|
||||||
|
@ -33,8 +33,8 @@ export class VirtualBoxConfigurationService {
|
|||||||
'PCnet-PCI II (Am79C970A)',
|
'PCnet-PCI II (Am79C970A)',
|
||||||
'PCNet-FAST III (Am79C973)',
|
'PCNet-FAST III (Am79C973)',
|
||||||
'Intel PRO/1000 MT Desktop (82540EM)',
|
'Intel PRO/1000 MT Desktop (82540EM)',
|
||||||
'Intel PRO/1000 TController (82543GC)',
|
'Intel PRO/1000 T Server (82543GC)',
|
||||||
'Intel PRO/1000 MTController (82545EM)',
|
'Intel PRO/1000 MT Server (82545EM)',
|
||||||
'Paravirtualized Network (virtio-net)',
|
'Paravirtualized Network (virtio-net)',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user