Skip to content

Commit

Permalink
ppr testing finalized
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds committed Nov 24, 2023
1 parent a058c42 commit 8a6942d
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 196 deletions.
2 changes: 1 addition & 1 deletion ppr-ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'@vue/typescript/recommended'
],
rules: {
'@typescript-eslint/no-explicit-any': ['warn'],
'@typescript-eslint/no-explicit-any': 'off',
'object-curly-spacing': ['error', 'always'],
'standard/computed-property-even-spacing': 'off',
'vue/multi-word-component-names': 'off',
Expand Down
1 change: 1 addition & 0 deletions ppr-ui/src/components/tables/SearchHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
v-else
color="primary"
size="20"
class="px-8"
v-bind="props"
>
mdi-information-outline
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/components/tables/common/TableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
</template>
<v-list
v-if="isDraft(item)"
class="actions__more-actions registration-actions"
class="actions__more-actions registration-actions draft-actions"
>
<v-list-item
@click="deleteDraft(item, TableActions.DELETE)"
Expand Down
6 changes: 3 additions & 3 deletions ppr-ui/src/utils/format-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export function multipleWordsToTitleCase (value: string, excludeWords: boolean):
// Common preopositions and conjunctions to exclude from title case (can easily add more if need be)
const exclusions = ['or', 'to', 'of', 'with', 'under']

const words = value.split(' ')
const words = value?.split(' ')

const titleCaseWords = words.map((word, index) => {
const titleCaseWords = words?.map((word, index) => {
// If excludePrePosAndConj is true, and sentence does not start with a preposition or conjunction
if (excludeWords && exclusions.includes(word.toLowerCase()) &&
!(index === 0 || words[index - 1].endsWith('.'))) {
Expand All @@ -70,7 +70,7 @@ export function multipleWordsToTitleCase (value: string, excludeWords: boolean):
return toTitleCase(word)
})

return titleCaseWords.join(' ')
return titleCaseWords?.join(' ')
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/renew/ConfirmRenewal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>
<v-overlay
v-model="submitting"
overlayContainer
class="overlay-container"
>
<v-progress-circular
color="primary"
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/renew/RenewRegistration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<v-overlay
v-model="loading"
overlayContainer
class="overlay-container"
>
<v-progress-circular
color="primary"
Expand Down
4 changes: 4 additions & 0 deletions ppr-ui/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,9 @@ beforeAll(() => {
})
})

afterEach(() => {
// Restore the mocked functions
vi.restoreAllMocks()
})


Loading

0 comments on commit 8a6942d

Please sign in to comment.