Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRD - UI: Unit tests #21

Merged
merged 7 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions business-registry-dashboard/app/components/Sbc/Alert.vue

This file was deleted.

136 changes: 0 additions & 136 deletions business-registry-dashboard/app/components/Sbc/DatePicker.vue

This file was deleted.

18 changes: 10 additions & 8 deletions business-registry-dashboard/app/composables/useBrdModals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,27 @@ export const useBrdModals = () => {
function openBusinessAddError () {
modal.open(ModalBase, {
error: {
title: 'Error Adding Existing Business', // TODO: add translations
description: 'An error occurred adding your business. Please try again.'
title: t('error.businessAdd.title'),
description: t('error.businessAdd.description')
},
actions: [{ label: t('btn.close'), handler: () => close() }]
})
}

function openBusinessUnavailableError (action: string) { // TODO: add translations
let description = 'You are not authorized to access the business'
function openBusinessUnavailableError (action: string) {
let title: string
let description: string
if (action === 'change name') {
description += ' to change its name'
title = t('error.businessUnavailable.changeName.title')
description = t('error.businessUnavailable.changeName.description')
} else {
description += ' you wish to ' + action
title = t('error.businessUnavailable.generic.title')
description = t('error.businessUnavailable.generic.description', { action })
}
description += '. Please add this business to your table to continue.'

modal.open(ModalBase, {
error: {
title: 'Business Unavailable',
title,
description,
showContactInfo: true
},
Expand Down
20 changes: 20 additions & 0 deletions business-registry-dashboard/app/locales/en-CA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ export default {
generic: {
title: 'Something Went Wrong',
description: 'An error occurred, please try again. If this error persists, please contact us.'
},
businessAdd: {
title: 'Error Adding Existing Business',
description: 'An error occurred adding your business. Please try again.'
},
businessUnavailable: {
changeName: {
title: 'Business Unavailable',
description: 'You are not authorized to access the business to change its name. Please add this business to your table to continue.'
},
generic: {
title: 'Business Unavailable',
description: 'You are not authorized to access the business you wish to {action}. Please add this business to your table to continue.'
}
}
},
entityAlertTypes: {
Expand Down Expand Up @@ -521,5 +535,11 @@ export default {
error: 'Error retrieving search results, please try again later.',
resultListLabel: 'Search Results',
noResults: 'No results found'
},
test: {
i18nBold: {
strong: 'This should have {boldStart} bold {boldEnd} text',
strongWithProps: 'This should have {boldStart} bold {boldEnd} text and allow a {prop}'
}
}
}
4 changes: 4 additions & 0 deletions business-registry-dashboard/app/locales/fr-CA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ export default {
generic: {
title: "Quelque Chose S'est Mal Passé",
description: "Une erreur s'est produite, veuillez réessayer. Si cette erreur persiste, veuillez nous contacter."
},
businessAdd: {
title: "Error lors de l'ajout de l'Entreprise Existante",
description: "Une erreur s'est produite lors de l'ajout de votre entreprise. Veuillez réessayer."
}
},
entityAlertTypes: {
Expand Down
5 changes: 0 additions & 5 deletions business-registry-dashboard/app/plugins/launchDarkly.ts

This file was deleted.

7 changes: 6 additions & 1 deletion business-registry-dashboard/app/stores/affiliations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const useAffiliationsStore = defineStore('brd-affiliations-store', () =>
function setColumns () {
visibleColumns.value = [
nameColumn,
...optionalColumns.filter(col => selectedColumns.value.includes(col)),
...optionalColumns.filter(col => selectedColumns.value.some(sel => sel.key === col.key)),
actionColumn
]
}
Expand Down Expand Up @@ -290,6 +290,7 @@ export const useAffiliationsStore = defineStore('brd-affiliations-store', () =>
visibleColumns,
optionalColumns,
selectedColumns,
isStaffOrSbcStaff,
setColumns,
filteredResults,
statusOptions,
Expand All @@ -299,6 +300,10 @@ export const useAffiliationsStore = defineStore('brd-affiliations-store', () =>
createNRAffiliation,
handleManageBusinessOrNameRequest,
removeBusiness,
removeAffiliation,
getFilings,
deleteBusinessFiling,
addNameRequestForStaffSilently,
$reset
}
}
Expand Down
24 changes: 0 additions & 24 deletions business-registry-dashboard/app/stores/alert.ts

This file was deleted.

67 changes: 0 additions & 67 deletions business-registry-dashboard/app/stores/launchdarkly.ts

This file was deleted.

Loading
Loading