Skip to content

feat(action-sheet, alert): add id to AlertButton and ActionSheetButton #18992

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

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

devinshoemaker
Copy link
Contributor

@devinshoemaker devinshoemaker commented Aug 4, 2019

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

There is currently no way to add an ID to an AlertButton, which would be particularly useful for writing automated tests.

Issue Number: resolves #22959

What is the new behavior?

  • The AlertButton interface now has an optional id property that will be added to the HTML button when rendered.

Does this introduce a breaking change?

  • Yes
  • No

@ionitron-bot ionitron-bot bot added the package: core @ionic/core package label Aug 4, 2019
@devinshoemaker
Copy link
Contributor Author

It looks like this PR failed on a couple of tests, and I would like some insight into why so that I can get this PR updated if need be. test-angular-e2e failed on E/launcher - session not created: Chrome version must be between 71 and 75 which appears to be an issue with the CircleCI environment. test-core-clean-build appears to have failed for there being a diff on the readme that I updated without any insight into why.

@devinshoemaker
Copy link
Contributor Author

Hey Ionic team, I just wanted to check back in to see if I could get some eyes on this. I think that this is a pretty obvious feature and seems to compliment the surrounding code that is already in place. This would also help me and likely many others in e2e testing and such.

@DanielFroehlich
Copy link

+1 I would love to have this, too!

@SalahAdDin
Copy link

@devinshoemaker What happened about this?

I was thinking about opening a new feat request to enable custom properties on AlertButton, but I saw yours and I think it is enough.

We required this in order to ease the automation test: right now we are getting buttons by classes but it makes things hard to handle, to making this easier we are applying the Cypress best practices, but we can't put data-cy property to AlertButtons.

We think your feat can help us to solve this problem.

@liamdebeasi liamdebeasi changed the title feat(alert): add id to AlertButton feat(alert): add id to AlertButton Feb 23, 2021
@brandyscarney brandyscarney added this to the 5.7.0 milestone Mar 18, 2021
@liamdebeasi liamdebeasi modified the milestones: 5.7.0, 6.0.0 Jun 14, 2021
@liamdebeasi liamdebeasi changed the base branch from master to next June 29, 2021 17:23
@liamdebeasi liamdebeasi changed the title feat(alert): add id to AlertButton feat(action-sheet, alert): add id to AlertButton and ActionSheetButton Jun 29, 2021
@liamdebeasi liamdebeasi merged commit 9e24a0b into ionic-team:next Jun 29, 2021
@liamdebeasi
Copy link
Contributor

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: AcionSheet/ActionAlert custom properties
5 participants