Skip to content

Commit

Permalink
Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denishov committed Nov 23, 2023
1 parent a746c46 commit f219d79
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions test/integration/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

// require('../browser');
const fs = require('fs');
const puppeteer = require('puppeteer');

const chai = require('chai');
const { assert } = chai;
const chaiHttp = require('chai-http');
const puppeteer = require('puppeteer');

chai.use(chaiHttp);
const U = require('../utils.js');

Expand Down Expand Up @@ -75,7 +77,7 @@ describe('TESTING CLIENT-SIDE RENDERING', function () {
await page.goto(U.serverURL + '/mri?url=' + U.localBertURL);
const pane = await page.waitForSelector('#annotations tbody tr', { timeout: 10000 });
assert.equal(1, await page.evaluate(() => document.querySelectorAll('#annotations tbody tr').length));
assert.equal('Foreground', await pane.$eval('select', (node) => node.value));
assert.equal('Foreground', await pane.$eval('.annotation-label', (node) => node.innerText));

}).timeout(U.noTimeout);

Expand Down
12 changes: 8 additions & 4 deletions view/brainbox/src/components/MRIPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</tbody>
</table>
<h2>Volume annotations</h2>
<Table>
<Table id="annotations">
<thead>
<tr>
<th>Name</th>
Expand All @@ -56,7 +56,9 @@
@click="selectVolumeAnnotation(index)"
>
<td>{{ atlas.name }}</td>
<td>{{ labelsName[atlas.labels] }}</td>
<td class="annotation-label">
{{ labelsName[atlas.labels] }}
</td>
<td>
<a :href="`/project/${atlas.project}`">{{ atlas.project }}</a>
</td>
Expand Down Expand Up @@ -144,7 +146,7 @@
</Wrapper>
</template>
<script setup>
import { ref, onMounted, watch, computed } from 'vue';
import { keyBy, mapValues, flatten, map } from 'lodash';
import get from 'lodash/get';
import {
Wrapper,
Expand All @@ -155,8 +157,10 @@ import {
OntologySelector,
AdjustSettings
} from 'nwl-components/dist/nwl-components.umd.js';
import { keyBy, mapValues, flatten, map } from 'lodash';
import { ref, onMounted, watch, computed } from 'vue';
import useVisualization from '../store/visualization';
import Tools from './Tools.vue';
const {
Expand Down

0 comments on commit f219d79

Please sign in to comment.