UNPKG

@theia-extension-tester/tests

Version:

Tests for theia-extension-tester package.

57 lines 2.58 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('ViewContent', function () { this.timeout(40000); let workbench; let view; let control; let content; const title = 'Search'; 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(); content = view.getContent(); }); }); after(function () { return __awaiter(this, void 0, void 0, function* () { yield control.closeView(); }); }); it.skip('hasProgress', function () { return __awaiter(this, void 0, void 0, function* () { }); }); it('getSection', function () { return __awaiter(this, void 0, void 0, function* () { control = (yield workbench.getActivityBar().getViewControl('Debug')); view = yield control.openView(); content = view.getContent(); const section = yield content.getSection('Variables'); chai_1.expect(section).not.to.be.undefined; chai_1.expect(yield section.getTitle(), 'Variables'); }); }); it('getSections', function () { return __awaiter(this, void 0, void 0, function* () { yield content.getSection('Variables'); const sections = yield content.getSections(); const titles = yield Promise.all(sections.map((section) => section.getTitle())); chai_1.expect(titles).to.include.members(['Threads', 'Call Stack', 'Variables', 'Watch', 'Breakpoints']); }); }); }); //# sourceMappingURL=ViewContent.test.js.map