Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.17.6
v16.19.0
19 changes: 4 additions & 15 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
export default defineNuxtConfig({
/*
** Headers of the page
*/
Expand Down Expand Up @@ -46,23 +46,12 @@ export default {
/*
** Plugins to load before mounting the App
*/
plugins: [{ src: '~/plugins/vue-pluralize.js' }],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
'@nuxtjs/eslint-module',
'@nuxtjs/dotenv',
],
plugins: [],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://bootstrap-vue.js.org
'bootstrap-vue/nuxt',
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'bootstrap-vue-3/nuxt',
],
/*
** Axios module configuration
Expand Down Expand Up @@ -106,4 +95,4 @@ export default {
uatActions: process.env.FEATURE_FLAG_UAT_ACTIONS,
bioseroCherrypick: process.env.FEATURE_FLAG_BIOSERO_CHERRYPICK,
},
}
})
21,700 changes: 9,244 additions & 12,456 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,29 @@
"yarn": "NO LONGER USED - Please use npm"
},
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"dev": "nuxi dev",
"build": "nuxi build",
"start": "nuxi start",
"generate": "nuxi generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ",
"test": "jest",
"cypress:open": "cypress open"
},
"dependencies": {
"@nuxtjs/axios": "^5.13.1",
"axios": "^0.27.2",
"bootstrap": "^4.6.2",
"bootstrap-vue": "^2.23.1",
"bootstrap-vue-3": "^0.4.15",
"dotenv": "^16.0.3",
"jquery": "^3.6.2",
"nuxt": "^2.15.2",
"nuxt": "^3.0.0",
"popper.js": "^1.16.1",
"vue-pluralize": "^0.0.2",
"sass": "^1.56.2",
"vue-template-compiler": "^2.6.12"
},
"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-env": "^7.20.2",
"@nuxtjs/dotenv": "^1.4.1",
"@nuxtjs/eslint-config": "^6.0.0",
"@nuxtjs/eslint-module": "^3.1.0",
"@testing-library/cypress": "^9.0.0",
Expand Down
20 changes: 7 additions & 13 deletions pages/box_buster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,28 @@
<b-col>
<strong>Box summary:</strong>
<ul>
<li>Total of {{ total }} {{ 'plate' | pluralize(total) }} in the box</li>
<li>Total of {{ total }} plates in the box</li>
<li>
{{ total_with_maps }} {{ 'plate' | pluralize(total_with_maps) }} with plate
{{ 'map' | pluralize(total_with_maps) }}
{{ total_with_maps }} plates with plate maps
</li>
<li>
{{ total_without_maps }} {{ 'plate' | pluralize(total_without_maps) }} without plate
{{ 'map' | pluralize(total_without_maps) }}
{{ total_without_maps }} plates without plate maps
</li>
</ul>
</b-col>
<b-col>
<strong>Sample summary:</strong>
<ul>
<li>
Total of {{ total_fit_to_pick }} fit to pick
{{ 'sample' | pluralize(total_fit_to_pick) }}
Total of {{ total_fit_to_pick }} fit to pick samples
</li>
<li style="color: green">
{{ total_must_sequence }} {{ 'plate' | pluralize(total_must_sequence) }} with
{{ total_must_sequence }} plates with
samples that must be sequenced
</li>
<li style="color: DarkOrange">
{{ total_preferentially_sequence }}
{{ 'plate' | pluralize(total_preferentially_sequence) }} with samples that should
plates with samples that should
preferentially be sequenced
</li>
</ul>
Expand Down Expand Up @@ -299,10 +296,7 @@ export default {
this.lighthouseResponse = defaultResponse
},
async findPlatesInLighthouse(labwhereResponse) {
this.currentState = `Checking ${this.$pluralize(
'plate',
labwhereResponse.length
)} in the Lighthouse service`
this.currentState = 'Checking plates in the Lighthouse service'

const response = await lighthouse.findPlatesFromBarcodes(labwhereResponse)

Expand Down
7 changes: 0 additions & 7 deletions plugins/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions plugins/vue-pluralize.js

This file was deleted.

7 changes: 3 additions & 4 deletions test/pages/biosero_plate_state.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createLocalVue, mount } from '@vue/test-utils'
import { BootstrapVue } from 'bootstrap-vue'
import lighthouseBiosero from '@/modules/lighthouse_service_biosero'
import BioseroPlateState from '@/pages/biosero_plate_state.vue'
import '@/plugins/vue-pluralize'
import { sourcePlate, destinationPlate } from '@/test/data/biosero_plates'

jest.mock('@/modules/lighthouse_service_biosero')
Expand Down Expand Up @@ -248,7 +247,7 @@ describe('BioseroPlateState', () => {
const sourcePlateItems = wrapper.vm.sourcePlateItems()

expect(sourcePlateItems[0]).toEqual(
{
{
"2": sourcePlate.samples[0].source_barcode,
"4": sourcePlate.samples[1].source_barcode,
"6": sourcePlate.samples[2].source_barcode,
Expand All @@ -274,7 +273,7 @@ describe('BioseroPlateState', () => {

// For the picked wells
expect(destinationPlateItems[0]).toEqual(
{
{
"1": destinationPlate.wells[0].rna_id,
"2": destinationPlate.wells[1].rna_id,
"3": destinationPlate.wells[2].rna_id,
Expand All @@ -290,7 +289,7 @@ describe('BioseroPlateState', () => {
)
// For the control well
expect(destinationPlateItems[3]).toEqual(
{
{
"2": destinationPlate.wells[4].rna_id,
"_cellVariants": {
"2": "secondary",
Expand Down
1 change: 0 additions & 1 deletion test/pages/box_buster.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import flushPromises from 'flush-promises'
import labwhere from '@/modules/labwhere'
import lighthouse from '@/modules/lighthouse_service'
import BoxBuster from '@/pages/box_buster.vue'
import '@/plugins/vue-pluralize'
import { plateA, plateB, plateC, plateD, plateE, plateF } from '@/test/data/lighthouse_plates'

// Mock the whole module. Returning jest.fn() allows you to mock methods here
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}