@datagrok/api-tests
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -16,2 +16,3 @@ { | ||
"rules": { | ||
"no-trailing-spaces": "off", | ||
"indent": [ | ||
@@ -18,0 +19,0 @@ "error", |
var apitests; | ||
/******/ (() => { // webpackBootstrap | ||
/******/ "use strict"; | ||
/******/ // The require scope | ||
/******/ var __webpack_require__ = {}; | ||
/******/ var __webpack_modules__ = ({ | ||
/***/ "./src/viewers/test-viewer-for-properties.ts": | ||
/*!***************************************************!*\ | ||
!*** ./src/viewers/test-viewer-for-properties.ts ***! | ||
\***************************************************/ | ||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony export */ __webpack_require__.d(__webpack_exports__, { | ||
/* harmony export */ "TestViewerForProperties": () => (/* binding */ TestViewerForProperties) | ||
/* harmony export */ }); | ||
/* harmony import */ var datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! datagrok-api/dg */ "datagrok-api/dg"); | ||
/* harmony import */ var datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__); | ||
class TestViewerForProperties extends datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__.JsViewer { | ||
constructor() { | ||
super(); | ||
this.field = 'field value'; | ||
this.testPropertyString = this.string('testPropertyString', ''); | ||
this.testPropertyInt = this.int('testPropertyInt', -1); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC12aWV3ZXItZm9yLXByb3BlcnRpZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0LXZpZXdlci1mb3ItcHJvcGVydGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBR3RDLE1BQU0sT0FBTyx1QkFBd0IsU0FBUSxFQUFFLENBQUMsUUFBUTtJQU10RDtRQUNFLEtBQUssRUFBRSxDQUFDO1FBTEgsVUFBSyxHQUFHLGFBQWEsQ0FBQztRQU0zQixJQUFJLENBQUMsa0JBQWtCLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxvQkFBb0IsRUFBRSxFQUFFLENBQUMsQ0FBQztRQUNoRSxJQUFJLENBQUMsZUFBZSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsaUJBQWlCLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBncm9rIGZyb20gJ2RhdGFncm9rLWFwaS9ncm9rJztcbmltcG9ydCAqIGFzIERHIGZyb20gJ2RhdGFncm9rLWFwaS9kZyc7XG5cblxuZXhwb3J0IGNsYXNzIFRlc3RWaWV3ZXJGb3JQcm9wZXJ0aWVzIGV4dGVuZHMgREcuSnNWaWV3ZXIge1xuXG4gIHB1YmxpYyBmaWVsZCA9ICdmaWVsZCB2YWx1ZSc7XG4gIHB1YmxpYyB0ZXN0UHJvcGVydHlTdHJpbmc6IHN0cmluZztcbiAgcHVibGljIHRlc3RQcm9wZXJ0eUludDogbnVtYmVyO1xuXG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHN1cGVyKCk7XG4gICAgdGhpcy50ZXN0UHJvcGVydHlTdHJpbmcgPSB0aGlzLnN0cmluZygndGVzdFByb3BlcnR5U3RyaW5nJywgJycpO1xuICAgIHRoaXMudGVzdFByb3BlcnR5SW50ID0gdGhpcy5pbnQoJ3Rlc3RQcm9wZXJ0eUludCcsIC0xKTtcbiAgfVxufSJdfQ== | ||
/***/ }), | ||
/***/ "datagrok-api/dg": | ||
/*!*********************!*\ | ||
!*** external "DG" ***! | ||
\*********************/ | ||
/***/ ((module) => { | ||
module.exports = DG; | ||
/***/ }) | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | ||
/******/ if (cachedModule !== undefined) { | ||
/******/ return cachedModule.exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/compat get default export */ | ||
/******/ (() => { | ||
/******/ // getDefaultExport function for compatibility with non-harmony modules | ||
/******/ __webpack_require__.n = (module) => { | ||
/******/ var getter = module && module.__esModule ? | ||
/******/ () => (module['default']) : | ||
/******/ () => (module); | ||
/******/ __webpack_require__.d(getter, { a: getter }); | ||
/******/ return getter; | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ (() => { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = (exports, definition) => { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ (() => { | ||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
@@ -21,2 +110,4 @@ /******/ (() => { | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
(() => { | ||
/*!************************!*\ | ||
@@ -26,7 +117,20 @@ !*** ./src/package.ts ***! | ||
__webpack_require__.r(__webpack_exports__); | ||
/* harmony export */ __webpack_require__.d(__webpack_exports__, { | ||
/* harmony export */ "testViewerForProperties": () => (/* binding */ testViewerForProperties) | ||
/* harmony export */ }); | ||
/* harmony import */ var _viewers_test_viewer_for_properties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./viewers/test-viewer-for-properties */ "./src/viewers/test-viewer-for-properties.ts"); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInBhY2thZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qIERvIG5vdCBjaGFuZ2UgdGhlc2UgaW1wb3J0IGxpbmVzLiBEYXRhZ3JvayB3aWxsIGltcG9ydCBBUEkgbGlicmFyeSBpbiBleGFjdGx5IHRoZSBzYW1lIG1hbm5lciAqL1xuaW1wb3J0ICogYXMgZ3JvayBmcm9tICdkYXRhZ3Jvay1hcGkvZ3Jvayc7XG5pbXBvcnQgKiBhcyB1aSBmcm9tICdkYXRhZ3Jvay1hcGkvdWknO1xuaW1wb3J0ICogYXMgREcgZnJvbSAnZGF0YWdyb2stYXBpL2RnJztcbiJdfQ== | ||
//name: TestViewerForProperties | ||
//description: Viewer to test properties and others | ||
//tags: viewer, panel | ||
//output: viewer result | ||
function testViewerForProperties() { | ||
return new _viewers_test_viewer_for_properties__WEBPACK_IMPORTED_MODULE_0__.TestViewerForProperties(); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZS5qcyIsInNvdXJjZVJ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dGNHOXlkQ0JCVUVrZ2JHbGljbUZ5ZVNCcGJpQmxlR0ZqZEd4NUlIUm9aU0J6WVcxbElHMWhibTVsY2lBcUwxeHVhVzF3YjNKMElDb2dZWE1nWjNKdmF5Qm1jbTl0SUNka1lYUmhaM0p2YXkxaGNHa3ZaM0p2YXljN1hHNXBiWEJ2Y25RZ0tpQmhjeUIxYVNCbWNtOXRJQ2RrWVhSaFozSnZheTFoY0drdmRXa25PMXh1YVcxd2IzSjBJQ29nWVhNZ1JFY2dabkp2YlNBblpHRjBZV2R5YjJzdFlYQnBMMlJuSnp0Y2JtbHRjRzl5ZENCN1ZHVnpkRlpwWlhkbGNrWnZjbEJ5YjNCbGNuUnBaWE45SUdaeWIyMGdKeTR2ZG1sbGQyVnljeTkwWlhOMExYWnBaWGRsY2kxbWIzSXRjSEp2Y0dWeWRHbGxjeWM3WEc1Y2JpOHZibUZ0WlRvZ1ZHVnpkRlpwWlhkbGNrWnZjbEJ5YjNCbGNuUnBaWE5jYmk4dlpHVnpZM0pwY0hScGIyNDZJRlpwWlhkbGNpQjBieUIwWlhOMElIQnliM0JsY25ScFpYTWdZVzVrSUc5MGFHVnljMXh1THk5MFlXZHpPaUIyYVdWM1pYSXNJSEJoYm1Wc1hHNHZMMjkxZEhCMWREb2dkbWxsZDJWeUlISmxjM1ZzZEZ4dVpYaHdiM0owSUdaMWJtTjBhVzl1SUhSbGMzUldhV1YzWlhKR2IzSlFjbTl3WlhKMGFXVnpLQ2tnZTF4dUlDQnlaWFIxY200Z2JtVjNJRlJsYzNSV2FXVjNaWEpHYjNKUWNtOXdaWEowYVdWektDazdYRzU5SWwxOSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ== |
{ | ||
"name": "@datagrok/api-tests", | ||
"friendlyName": "API Tests", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"author": { | ||
"name": "Alexander Paramonov", | ||
"email": "aparamomov@datagrok.ai" | ||
"email": "aparamonov@datagrok.ai" | ||
}, | ||
@@ -16,5 +16,5 @@ "description": "js-api-tests is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform.", | ||
"dependencies": { | ||
"@datagrok-libraries/utils": "^1.6.1", | ||
"@datagrok-libraries/utils": "^1.8.1", | ||
"cash-dom": "^8.1.1", | ||
"datagrok-api": "^1.6.0", | ||
"datagrok-api": "^1.6.12", | ||
"dayjs": "latest", | ||
@@ -21,0 +21,0 @@ "rxjs": "^6.6.7", |
@@ -45,6 +45,7 @@ /** | ||
(<any>window).grok.functions.eval(targetPackage + ':test()').then((df: any) => { | ||
let cStatus = df.columns.byName('success'); | ||
let cMessage = df.columns.byName('result'); | ||
let cCat = df.columns.byName('category'); | ||
let cName = df.columns.byName('name'); | ||
const cStatus = df.columns.byName('success'); | ||
const cMessage = df.columns.byName('result'); | ||
const cCat = df.columns.byName('category'); | ||
const cName = df.columns.byName('name'); | ||
const cTime = df.columns.byName('ms'); | ||
let failed = false; | ||
@@ -55,6 +56,6 @@ let passReport = ''; | ||
if (cStatus.get(i)) { | ||
passReport += `Test result : Success : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
passReport += `Test result : Success : ${cTime.get(i)} : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
} else { | ||
failed = true; | ||
failReport += `Test result : Failed : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
failReport += `Test result : Failed : ${cTime.get(i)} : ${targetPackage}.${cCat.get(i)}.${cName.get(i)} : ${cMessage.get(i)}\n`; | ||
} | ||
@@ -61,0 +62,0 @@ } |
@@ -28,5 +28,5 @@ import * as path from 'path'; | ||
const urls: Indexable = {}; | ||
for (const server in conf.servers) | ||
for (const server in conf.servers) { | ||
urls[conf['servers'][server]['url']] = conf['servers'][server]; | ||
} | ||
return urls; | ||
@@ -79,3 +79,3 @@ } | ||
try { | ||
await page.waitForSelector('.grok-preloader', { timeout: 1800000 }); | ||
// await page.waitForSelector('.grok-preloader', { timeout: 1800000 }); | ||
await page.waitForFunction(() => document.querySelector('.grok-preloader') == null, {timeout: 7200000}); | ||
@@ -82,0 +82,0 @@ } catch (error) { |
@@ -22,2 +22,9 @@ import * as DG from 'datagrok-api/dg'; | ||
test('byte array', async () => { | ||
const t = grok.data.testData('demog'); | ||
const data = t.toByteArray(); | ||
const t2 = DG.DataFrame.fromByteArray(data); | ||
expect(t.toCsv(), t2.toCsv()); | ||
}); | ||
test('create from arrays', async () => { | ||
@@ -24,0 +31,0 @@ DG.DataFrame.fromColumns([ |
@@ -7,1 +7,15 @@ import './date-functions'; | ||
import './stats-functions'; | ||
import {category, test, expect} from '@datagrok-libraries/utils/src/test'; | ||
import * as grok from 'datagrok-api/grok'; | ||
import * as DG from 'datagrok-api/dg'; | ||
category('Functions: General', () => { | ||
test('Eval', async () => { | ||
let dfList: DG.DataFrame[] = await grok.functions.eval('OpenServerFile("System:AppData/ApiTests/datasets/demog.csv")'); | ||
expect(dfList[0].columns instanceof DG.ColumnList, true); | ||
}); | ||
test('Call', async () => { | ||
let dfList: DG.DataFrame[] = await grok.functions.call('OpenServerFile', {'fullPath': 'System:AppData/ApiTests/datasets/demog.csv'}); | ||
expect(dfList[0].columns instanceof DG.ColumnList, true); | ||
}); | ||
}); |
@@ -27,4 +27,4 @@ import {after, before, category, delay, expect, test} from '@datagrok-libraries/utils/src/test'; | ||
let pecilIcon = document.getElementsByClassName('grok-icon fal fa-pencil')[0] as HTMLElement; | ||
pecilIcon!.click(); await delay(200); | ||
let pencilIcon = document.getElementsByClassName('grok-icon fal fa-pencil')[0] as HTMLElement; | ||
pencilIcon!.click(); await delay(200); | ||
@@ -31,0 +31,0 @@ let contours = document.getElementsByClassName('d4-accordion-pane-content ui-div d4-pane-gasteiger_partial_charges')[0].getElementsByClassName('ui-input-editor')[0] as HTMLInputElement; |
@@ -24,62 +24,62 @@ import {after, before, category, delay, expect, test} from '@datagrok-libraries/utils/src/test'; | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'log-normal'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'log-normal'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'binomial'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'binomial'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'poisson'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'poisson'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(1000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'uniform'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(3000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
setDialogInputValue('Random Data', 'Distribution', 'uniform'); await delay(500); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(3000); | ||
isColumnPresent(demog.columns, 'normal'); | ||
isColumnPresent(demog.columns, 'binomial'); | ||
isColumnPresent(demog.columns, 'poisson'); | ||
isColumnPresent(demog.columns, 'uniform'); | ||
isColumnPresent(demog.columns, 'log-normal'); | ||
isColumnPresent(demog.columns, 'normal'); | ||
isColumnPresent(demog.columns, 'binomial'); | ||
isColumnPresent(demog.columns, 'poisson'); | ||
isColumnPresent(demog.columns, 'uniform'); | ||
isColumnPresent(demog.columns, 'log-normal'); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
returnDialog('Random Data')!.input('Show histogram').input.click(); await delay(3000); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
returnDialog('Random Data')!.input('Show histogram').input.click(); await delay(3000); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
let cancelButton:HTMLElement; | ||
let button; | ||
for (let i=0; i<document.getElementsByClassName('ui-btn ui-btn-ok').length; i++) { | ||
button = document.getElementsByClassName('ui-btn ui-btn-ok')[i] as HTMLElement; | ||
if (button.innerText == 'CANCEL') { | ||
cancelButton = document.getElementsByClassName('ui-btn ui-btn-ok')[i] as HTMLElement; | ||
cancelButton.click(); | ||
} | ||
} | ||
let cancelButton:HTMLElement; | ||
let button; | ||
for (let i=0; i<document.getElementsByClassName('ui-btn ui-btn-ok').length; i++) { | ||
button = document.getElementsByClassName('ui-btn ui-btn-ok')[i] as HTMLElement; | ||
if (button.innerText == 'CANCEL') { | ||
cancelButton = document.getElementsByClassName('ui-btn ui-btn-ok')[i] as HTMLElement; | ||
cancelButton.click(); | ||
} | ||
} | ||
await delay(1000); | ||
await delay(1000); | ||
for (let i:number = 0; i < Array.from(v.viewers).length; i++) { | ||
if (Array.from(v.viewers)[i].type == 'Histogram') | ||
throw 'Histogram did not disappear after clicking on the "Cancel" button'; | ||
} | ||
for (let i:number = 0; i < Array.from(v.viewers).length; i++) { | ||
if (Array.from(v.viewers)[i].type == 'Histogram') | ||
throw 'Histogram did not disappear after clicking on the "Cancel" button'; | ||
} | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
returnDialog('Random Data')!.input('Show histogram').input.click(); await delay(3000); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(3000); | ||
grok.shell.topMenu.find('Tools').find('Data Science').find('Random Data...').click(); await delay(1000); | ||
isDialogPresent('Random Data'); | ||
returnDialog('Random Data')!.input('Show histogram').input.click(); await delay(3000); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
okButton = document.getElementsByClassName('ui-btn ui-btn-ok enabled')[0] as HTMLElement; | ||
okButton!.click(); await delay(3000); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
isViewerPresent(Array.from(v.viewers), 'Histogram'); | ||
}); | ||
@@ -86,0 +86,0 @@ |
@@ -46,2 +46,3 @@ import * as DG from 'datagrok-api/dg'; | ||
import './connections/queries-test'; | ||
import './scripts/scripts-params'; | ||
@@ -48,0 +49,0 @@ import {runTests, tests} from '@datagrok-libraries/utils/src/test'; |
@@ -5,1 +5,10 @@ /* Do not change these import lines. Datagrok will import API library in exactly the same manner */ | ||
import * as DG from 'datagrok-api/dg'; | ||
import {TestViewerForProperties} from './viewers/test-viewer-for-properties'; | ||
//name: TestViewerForProperties | ||
//description: Viewer to test properties and others | ||
//tags: viewer, panel | ||
//output: viewer result | ||
export function testViewerForProperties() { | ||
return new TestViewerForProperties(); | ||
} |
import * as grok from 'datagrok-api/grok'; | ||
import * as DG from 'datagrok-api/dg'; | ||
import {after, before, category, expect, test, delay} from '@datagrok-libraries/utils/src/test'; | ||
import {TestViewerForProperties} from './test-viewer-for-properties'; | ||
category('Viewers', () => { | ||
@@ -10,2 +13,4 @@ let df: DG.DataFrame; | ||
let viewerList: DG.JsViewer[]; | ||
before(async () => { | ||
@@ -20,2 +25,4 @@ coreViewerTypes = Object.values(DG.VIEWER).filter((v) => | ||
tv = grok.shell.addTableView(df); | ||
viewerList = []; | ||
}); | ||
@@ -30,3 +37,3 @@ | ||
throw `TableView.addViewer('${viewerType}') should add a Viewer instance`; | ||
await delay(100); | ||
await delay(200); | ||
@@ -46,3 +53,3 @@ viewer.removeFromView(); | ||
const viewer = await addViewerAndWait(tv, DG.Viewer.fromType(viewerType, df)); | ||
await delay(100); | ||
await delay(200); | ||
viewer.removeFromView(); | ||
@@ -101,5 +108,64 @@ console.log(`Removed ${viewerType}`); | ||
test('setPropertyStringWithNumber', async () => { | ||
// const v: TestViewerForProperties = tv.addViewer('TestViewerForProperties', {}) as TestViewerForProperties; | ||
const dfTemp = DG.DataFrame.fromCsv('id'); | ||
const viewer: TestViewerForProperties = ( | ||
await dfTemp.plot.fromType('TestViewerForProperties')) as TestViewerForProperties; | ||
viewerList.push(viewer); | ||
let exCaught: boolean = false; | ||
try { | ||
viewer.setOptions({'testPropertyString': 1}); | ||
} catch { | ||
// There should be an exception caught while | ||
// assigning number value to string option of JsViewer | ||
exCaught = true; | ||
} | ||
const propValueFromProps = viewer.props.get('testPropertyString'); | ||
const propValueFromObject = viewer.testPropertyString; | ||
// Silent type cast or exception expected | ||
if ((typeof propValueFromObject !== typeof 'str' || typeof propValueFromProps !== typeof 'str') && !exCaught) | ||
throw new Error('JsViewer string property assigned with number value ' + | ||
`become value of type '${typeof propValueFromObject}' without an exception or type conversion.`); | ||
}); | ||
test('setPropertyIntWithString', async () => { | ||
// const v: TestViewerForProperties = tv.addViewer('TestViewerForProperties', {}) as TestViewerForProperties; | ||
const dfTemp = DG.DataFrame.fromCsv('id'); | ||
const viewer: TestViewerForProperties = ( | ||
await dfTemp.plot.fromType('TestViewerForProperties')) as TestViewerForProperties; | ||
viewerList.push(viewer); | ||
let exCaught: boolean = false; | ||
try { | ||
viewer.setOptions({'testPropertyInt': '1'}); // silent parse to int available | ||
} catch { | ||
// There should be an exception caught while | ||
// assigning string value to int option of JsViewer | ||
exCaught = true; | ||
} | ||
const propValueFromProps = viewer.props.get('testPropertyInt'); | ||
const propValueFromObject = viewer.testPropertyInt; | ||
// Silent type cast or exception expected | ||
if ((typeof propValueFromObject !== typeof 1 || typeof propValueFromProps !== typeof 1) && !exCaught) | ||
throw new Error('JsViewer int property assigned with string value ' + | ||
`become value of type '${typeof propValueFromObject}' without an exception or type conversion.`); | ||
}); | ||
after(async () => { | ||
tv.close(); | ||
grok.shell.closeTable(df); | ||
for (const viewer of viewerList) { | ||
try { | ||
// viewer.removeFromView(); | ||
viewer.close(); | ||
} catch (err: any) { | ||
console.warn(`Closing viewer error: ${err.toString()}`); | ||
} // ignore everything on closing viewers | ||
} | ||
viewerList = []; | ||
}); | ||
@@ -106,0 +172,0 @@ }); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2895136
144
18048
Updateddatagrok-api@^1.6.12