UNPKG

@theia-extension-tester/tests

Version:

Tests for theia-extension-tester package.

48 lines 2.2 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); const chai_1 = require("chai"); const page_objects_1 = require("@theia-extension-tester/page-objects"); describe('SideBarView', function () { this.timeout(40000); let workbench; let view; let control; const title = 'Explorer'; before(function () { return __awaiter(this, void 0, void 0, function* () { workbench = new page_objects_1.Workbench(); control = (yield workbench.getActivityBar().getViewControl(title)); view = yield control.openView(); }); }); after(function () { return __awaiter(this, void 0, void 0, function* () { yield control.closeView(); }); }); it('getTitlePart', function () { return __awaiter(this, void 0, void 0, function* () { const titlePart = view.getTitlePart(); chai_1.expect(titlePart).not.to.be.undefined; chai_1.expect((yield titlePart.getTitle()).startsWith(title), `Expected title to start with "${title}"`).to.be.ok; chai_1.expect(yield titlePart.isDisplayed()).to.be.true; }); }); it('getContent', function () { return __awaiter(this, void 0, void 0, function* () { const content = view.getContent(); chai_1.expect(content).not.to.be.undefined; chai_1.expect(yield content.isDisplayed()).to.be.true; }); }); }); //# sourceMappingURL=SideBarView.test.js.map