Rename deletion modal titles and fixing cypress tests

This commit is contained in:
Andrew Kingston 2020-10-28 16:05:19 +00:00
parent 1a8da28c09
commit 1e41461a90
10 changed files with 11 additions and 10 deletions

View File

@ -34,7 +34,8 @@ context("Create a Table", () => {
}) })
it("edits a row", () => { it("edits a row", () => {
cy.get("button").contains("Edit").click() cy.contains("button", "Edit").click({ force: true })
cy.wait(1000)
cy.get(".modal input").type("Updated") cy.get(".modal input").type("Updated")
cy.contains("Save").click() cy.contains("Save").click()
cy.contains("RoverUpdated").should("have.text", "RoverUpdated") cy.contains("RoverUpdated").should("have.text", "RoverUpdated")

View File

@ -43,7 +43,7 @@
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
okText="Delete Automation" okText="Delete Automation"
onOk={deleteAutomation} onOk={deleteAutomation}
title="Confirm Delete"> title="Confirm Deletion">
Are you sure you wish to delete the automation Are you sure you wish to delete the automation
<i>{automation.name}?</i> <i>{automation.name}?</i>
This action cannot be undone. This action cannot be undone.

View File

@ -25,7 +25,7 @@
bind:this={modal} bind:this={modal}
okText="Delete" okText="Delete"
onOk={confirmDeletion} onOk={confirmDeletion}
title="Confirm Delete"> title="Confirm Deletion">
Are you sure you want to delete Are you sure you want to delete
{selectedRows.length} {selectedRows.length}
row{selectedRows.length > 1 ? 's' : ''}? row{selectedRows.length > 1 ? 's' : ''}?

View File

@ -170,7 +170,7 @@
okText="Delete Column" okText="Delete Column"
onOk={deleteColumn} onOk={deleteColumn}
onCancel={hideDeleteDialog} onCancel={hideDeleteDialog}
title="Confirm Delete" /> title="Confirm Deletion" />
<style> <style>
.actions { .actions {

View File

@ -25,7 +25,7 @@
body={`Are you sure you wish to delete this row? Your data will be deleted and this action cannot be undone.`} body={`Are you sure you wish to delete this row? Your data will be deleted and this action cannot be undone.`}
okText="Delete Row" okText="Delete Row"
onOk={deleteRow} onOk={deleteRow}
title="Confirm Delete" /> title="Confirm Deletion" />
<style> <style>
.ri-delete-bin-line:hover { .ri-delete-bin-line:hover {

View File

@ -12,7 +12,7 @@
} }
</script> </script>
<Button translucent small on:click={showModal}>Edit</Button> <Button data-cy="edit-row" translucent small on:click={showModal}>Edit</Button>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<CreateEditRowModal {row} /> <CreateEditRowModal {row} />
</Modal> </Modal>

View File

@ -103,7 +103,7 @@
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
okText="Delete Table" okText="Delete Table"
onOk={deleteTable} onOk={deleteTable}
title="Confirm Delete"> title="Confirm Deletion">
Are you sure you wish to delete the table Are you sure you wish to delete the table
<i>{table.name}?</i> <i>{table.name}?</i>
The following will also be deleted: The following will also be deleted:

View File

@ -81,7 +81,7 @@
body={`Are you sure you wish to delete the view '${view.name}'? Your data will be deleted and this action cannot be undone.`} body={`Are you sure you wish to delete the view '${view.name}'? Your data will be deleted and this action cannot be undone.`}
okText="Delete View" okText="Delete View"
onOk={deleteView} onOk={deleteView}
title="Confirm Delete" /> title="Confirm Deletion" />
<style> <style>
div.icon { div.icon {

View File

@ -147,7 +147,7 @@
</div> </div>
<ConfirmDialog <ConfirmDialog
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
title="Confirm Delete" title="Confirm Deletion"
body={`Are you sure you wish to delete this '${lastPartOfName(component)}' component?`} body={`Are you sure you wish to delete this '${lastPartOfName(component)}' component?`}
okText="Delete Component" okText="Delete Component"
onOk={deleteComponent} /> onOk={deleteComponent} />

View File

@ -39,7 +39,7 @@
</div> </div>
<ConfirmDialog <ConfirmDialog
bind:this={confirmDeleteDialog} bind:this={confirmDeleteDialog}
title="Confirm Delete" title="Confirm Deletion"
body={`Are you sure you wish to delete the screen '${screen.props._instanceName}' ?`} body={`Are you sure you wish to delete the screen '${screen.props._instanceName}' ?`}
okText="Delete Screen" okText="Delete Screen"
onOk={deleteScreen} /> onOk={deleteScreen} />