From f2045bec547dea6c8cbf6c6bc613032415051ca0 Mon Sep 17 00:00:00 2001 From: Harriet Craven Date: Tue, 15 Oct 2024 16:46:30 +0100 Subject: [PATCH 1/2] Sort By in Pacbio Libraries view, by id, descending by default --- README.md | 2 ++ src/views/pacbio/PacbioLibraryIndex.vue | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 14139befe..2050179fc 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ config required: VITE_SAMPLEEXTRACTION_BASE_URL= VITE_LOG=false +Replace `` with relevant URLs + ### Setup Steps Install the require dependencies: diff --git a/src/views/pacbio/PacbioLibraryIndex.vue b/src/views/pacbio/PacbioLibraryIndex.vue index ff63ddb62..8d4cfb1b0 100644 --- a/src/views/pacbio/PacbioLibraryIndex.vue +++ b/src/views/pacbio/PacbioLibraryIndex.vue @@ -173,7 +173,8 @@ const state = reactive({ }) //Define refs -const sortBy = ref('created_at') +// Sort By id descending by default +const sortBy = ref('id') //Composables const { showAlert } = useAlert() From 5c97cbfa06075e3578eba042e5a4a298687662ff Mon Sep 17 00:00:00 2001 From: Harriet Craven Date: Wed, 16 Oct 2024 12:07:35 +0100 Subject: [PATCH 2/2] Fix e2e test --- tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js b/tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js index 0cebcea07..df714aa80 100644 --- a/tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js +++ b/tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js @@ -43,8 +43,8 @@ describe('Pacbio Libraries view', () => { cy.get('#insert_size').should('have.length.greaterThan', 0) cy.get('button').filter(':contains("Edit")').should('have.length.greaterThan', 0) }) - it('allows editng a library and updates the library values', () => { - cy.intercept('PATCH', '/v1/pacbio/libraries/1', { + it('allows editing a library and updates the library values', () => { + cy.intercept('PATCH', '/v1/pacbio/libraries/18', { statusCode: 200, body: { data: {}, @@ -53,7 +53,7 @@ describe('Pacbio Libraries view', () => { cy.visit('#/pacbio/libraries') //When clicking on edit again on a librray with no tag cy.get('#show_details').within(() => { - cy.get('#edit-btn-1').click() + cy.get('#edit-btn-18').click() }) //It should show the form to edit the library with the values with an empty tag cy.get('#libraryForm').should('be.visible') @@ -75,7 +75,7 @@ describe('Pacbio Libraries view', () => { cy.get('#tag-input').select(pacbioTagSetFactory.storeData.selected.tag.group_id) }) cy.get('#update-btn').click() - cy.contains('Updated library with barcode TRAC-2-1465') + cy.contains('Updated library with barcode TRAC-2-24') cy.get('#libraryForm').should('not.exist') //It should display updated values in table