add tests for importing multiple records, fix other confirmation tests

This commit is contained in:
2024-08-21 18:43:28 -06:00
parent 67b0122d5a
commit 7309ba1436
9 changed files with 135 additions and 48 deletions

View File

@@ -1,5 +1,7 @@
<template>
<QuickNav selected="Contacts"></QuickNav>
<QuickNav selected="Contacts" />
<TopMessage />
<section id="Content" class="p-6 pb-24 max-w-3xl mx-auto">
<!-- Heading -->
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
@@ -41,7 +43,7 @@
</button>
</div>
<div class="flex justify-between">
<div class="flex justify-between" v-if="contacts.length > 0">
<div class="w-full text-left">
<input
type="checkbox"
@@ -53,6 +55,7 @@
: (contactsSelected = contacts.map((contact) => contact.did))
"
class="align-middle ml-2 h-6 w-6"
data-testId="contactCheckAllTop"
/>
<button
href=""
@@ -64,8 +67,9 @@
"
@click="copySelectedContacts()"
v-if="!showGiveNumbers"
data-testId="copySelectedContactsButtonTop"
>
Copy Selected Contacts
Copy Selections
</button>
</div>
@@ -117,6 +121,7 @@
class="border-b border-slate-300 pt-1 pb-1"
v-for="contact in filteredContacts()"
:key="contact.did"
data-testId="contactListItem"
>
<div class="grow overflow-hidden">
<div class="flex items-center">
@@ -140,6 +145,7 @@
: contactsSelected.push(contact.did)
"
class="ml-2 h-6 w-6"
data-testId="contactCheckOne"
/>
<h2 class="text-base font-semibold ml-2">
@@ -226,7 +232,7 @@
</ul>
<p v-else>There are no contacts.</p>
<div class="mt-2 w-full text-left">
<div class="mt-2 w-full text-left" v-if="contacts.length > 0">
<input
type="checkbox"
v-if="!showGiveNumbers"
@@ -237,6 +243,7 @@
: (contactsSelected = contacts.map((contact) => contact.did))
"
class="align-middle ml-2 h-6 w-6"
data-testId="contactCheckAllBottom"
/>
<button
href=""
@@ -249,7 +256,7 @@
@click="copySelectedContacts()"
v-if="!showGiveNumbers"
>
Copy Selected Contacts
Copy Selections
</button>
</div>
@@ -300,9 +307,10 @@ import QuickNav from "@/components/QuickNav.vue";
import EntityIcon from "@/components/EntityIcon.vue";
import GiftedDialog from "@/components/GiftedDialog.vue";
import OfferDialog from "@/components/OfferDialog.vue";
import TopMessage from "@/components/TopMessage.vue";
@Component({
components: { GiftedDialog, EntityIcon, OfferDialog, QuickNav },
components: {TopMessage, GiftedDialog, EntityIcon, OfferDialog, QuickNav },
})
export default class ContactsView extends Vue {
$notify!: (notification: NotificationIface, timeout?: number) => void;