Skip to content

Commit

Permalink
Merge pull request #26 from Samuelodan/fix-chord-sheet-prev-version
Browse files Browse the repository at this point in the history
fix: "previous versions" button failing after transpose
  • Loading branch information
stufro authored Aug 20, 2024
2 parents 62763e4 + 1c3b91f commit bcad2dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/chord_sheets/_main.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ turbo-frame[id=dom_id(chord_sheet) data-controller="clipboard chord-diagram moda
span.icon
i.fas.fa-arrow-circle-down

.level-right.align-items-space-between
.level-right.align-items-space-between#level-right[data-turbo-permanent]
.level-item.mt-2 data-chord-diagram-target="wrapper"
= render("chord_diagram_icon")
.hidden#diagram-select data-chord-diagram-target="selectBox"
Expand Down
7 changes: 7 additions & 0 deletions spec/cypress/e2e/chord_sheets.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ describe("Undoing changes", () => {
cy.get("#versions").click()

cy.contains("My amazing song")

cy.get(".modal-close").click()
cy.get("#transpose-up").click() // even after transposing

cy.get("#versions").click()

cy.contains("My amazing song")
})

it("allows the user to restore a previous version", () => {
Expand Down

0 comments on commit bcad2dd

Please sign in to comment.