Skip to content

Commit

Permalink
Merge pull request #1999 from sanger/Y24-362
Browse files Browse the repository at this point in the history
Y24-361 Sort By in Pacbio Libraries view, by id, descending by default
  • Loading branch information
harrietc52 authored Oct 17, 2024
2 parents 5d779be + 5c97cbf commit 7282c58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ config required:
VITE_SAMPLEEXTRACTION_BASE_URL=<url>
VITE_LOG=false

Replace `<url>` with relevant URLs

### Setup Steps

Install the require dependencies:
Expand Down
3 changes: 2 additions & 1 deletion src/views/pacbio/PacbioLibraryIndex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/specs/pacbio/pacbio_libraries_view.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand All @@ -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')
Expand All @@ -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
Expand Down

0 comments on commit 7282c58

Please sign in to comment.