Skip to content

Commit

Permalink
#2478 - Add a prompt pop-up for 'delete-account' button (#2481)
Browse files Browse the repository at this point in the history
* add the prompt dialog

* fix the heisen-bug in group-contribution test
  • Loading branch information
SebinSong authored Dec 24, 2024
1 parent aaaae1f commit b6dc54d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion frontend/views/containers/user-settings/UserProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
tag='button'
type='submit'
data-test='deleteAccount'
@click='handleDeleteAccount'
) Delete account
</template>

Expand All @@ -96,7 +97,7 @@ import BannerScoped from '@components/banners/BannerScoped.vue'
import AvatarUpload from '@components/AvatarUpload.vue'
import ButtonSubmit from '@components/ButtonSubmit.vue'
import CharLengthIndicator from '@components/CharLengthIndicator.vue'
import { L } from '@common/common.js'
import { L, LTags } from '@common/common.js'
import { IDENTITY_BIO_MAX_CHARS, IDENTITY_USERNAME_MAX_CHARS } from '@model/contracts/shared/constants.js'
export default ({
name: 'UserProfile',
Expand Down Expand Up @@ -176,6 +177,13 @@ export default ({
this.$refs.formMsg.danger(e.message)
}
}
},
handleDeleteAccount () {
sbp('gi.ui/prompt', {
heading: L('Coming soon!'),
question: L('Sorry, this feature has not been implemented yet.{br_}Please check back later.', LTags()),
primaryButton: L('Close')
})
}
}
}: Object)
Expand Down
3 changes: 2 additions & 1 deletion test/cypress/integration/group-contributions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ describe('Contributions', () => {

it('user1 edits the non monetary contribution', () => {
cy.getByDT('buttonEditNonMonetaryContribution').click()
cy.getByDT('inputNonMonetaryContribution').type('{selectall}{del}French classes{enter}')
cy.getByDT('inputNonMonetaryContribution').clear()
cy.getByDT('inputNonMonetaryContribution').type('French classes{enter}')
assertNonMonetaryEditableValue('French classes')

cy.getByDT('givingList', 'ul')
Expand Down

0 comments on commit b6dc54d

Please sign in to comment.