Skip to content

Commit

Permalink
🪲 correctly remove adventure from adventrues table (#5505)
Browse files Browse the repository at this point in the history
Related to #5383

Removing an adventure from the adventures table isn't working correctly (check alpha/beta)

**How to test?**
- go to for-teachers
- remove an adventure,
- the table should still be visible and the adventure removed
  • Loading branch information
hasan-sh committed May 7, 2024
1 parent d890450 commit b9e7122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/htmx-adventures-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ <h2 class="m-0 justify-left"> {{_('my_adventures')}} </h2>
hx-confirm="{{_('delete_adventure_prompt')}}"
hx-trigger="click"
hx-delete="/for-teachers/customize-adventure/{{adventure.id}}"
hx-target="#adventures_table">
hx-target="#adventures_table"
hx-swap="outerHTML">
<span class="fas fa-trash block mb-1 text-red-700"></span>
<span class="text-red-700">{{_('remove')}}</span>
</button>
Expand Down
2 changes: 2 additions & 0 deletions tests/cypress/e2e/tools/adventures/adventure.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export function deleteAdventure(name) {
}
})
cy.get('[data-cy="modal_yes_button"]').should('be.enabled').click();
cy.get("#adventures_table")
.should("be.visible");
}

export default {createAdventure};

0 comments on commit b9e7122

Please sign in to comment.