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

#2478 - Add a prompt pop-up for 'delete-account' button #2481

Merged
merged 2 commits into from
Dec 24, 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
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}')
Copy link
Collaborator Author

@SebinSong SebinSong Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for a heisen-bug I've seen a few times before (e.g. here). type({selectall}{del}) is converted back to clear() here. Also, Cypress doc warns that it's unsafe to chain something onto clear(). So breaking it into two lines here.

assertNonMonetaryEditableValue('French classes')

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