Add Alert E2E tests (#55958)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55958

Add name fields to 2 Alert examples in AlertExample.js and create 2 corresponding E2E interaction tests covering default-button and three-buttons variants. Tests verify the alert trigger buttons are visible and clickable. Note: native alert dialogs may not be captured by the screenshot mechanism, so these tests focus on verifying the trigger interaction works.

Reviewed By: cortinico

Differential Revision: D95311165

fbshipit-source-id: 44bc1b8efea451a8122e826632418cbd1311cc51
This commit is contained in:
Nick Gerleman authored and meta-codesync[bot] committed 2026-03-05 18:12:08 -08:00
1 parent 58d570bdef
commit 87802841e7
1 file changed
+2
@@ -379,6 +379,7 @@ const styles = StyleSheet.create({
export const examples = [
{
title: 'Alert with default Button',
name: 'default-button',
description:
"It can be used to show some information to user that doesn't require an action.",
render(): React.Node {
@@ -394,6 +395,7 @@ export const examples = [
},
{
title: 'Alert with three Buttons',
name: 'three-buttons',
description: 'It can be used when there are three possible actions',
render(): React.Node {
return <AlertWithThreeButtons />;