Skip to content

Commit

Permalink
Merge pull request #19 from turb0c0w/sam/stepper
Browse files Browse the repository at this point in the history
Sam/stepper
  • Loading branch information
samIndustrio authored May 13, 2024
2 parents d6ccb62 + 2cd58fa commit 558b5bf
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions strr-web/pages/create-account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ const activeStepIndex: Ref<number> = ref(0)
const activeStep: Ref<FormPageI> = ref(steps[activeStepIndex.value])
const t = useNuxtApp().$i18n.t
const { userFullName } = useBcrosAccount()
if (activeStepIndex.value === 0) {
activeStep.value.sections[0].fields[0].content = userFullName
}
const setActiveStep = (newStep: number) => {
activeStepIndex.value = newStep
Expand Down
18 changes: 18 additions & 0 deletions strr-web/tests/unit/pages/create-account.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { expect, describe, test } from 'vitest'
import { VueWrapper, mount } from '@vue/test-utils'
import { mockedI18n } from '@/tests/unit/utils/mockedi18n'
import createAccount from '@/pages/create-account.vue'

describe('Tests for Account Selection page', () => {
let wrapper: VueWrapper<any>

beforeEach(() => {
wrapper = mount(createAccount, { global: { plugins: [mockedI18n] } })
})
afterEach(() => { wrapper.unmount() })

test('Contains all the expected elements', () => {
expect(wrapper.find('[data-cy="create-account-page"]').exists()).toBe(true)
// TODO: TC - add the existing account list if there are accounts?
})
})
3 changes: 2 additions & 1 deletion strr-web/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default defineVitestConfig({
"enums/*",
"interfaces/*",
"*.d.ts",
".nuxt/*"
".nuxt/*",
"public/"
],
reportsDirectory: 'coverage',
},
Expand Down

0 comments on commit 558b5bf

Please sign in to comment.