Skip to content

Commit

Permalink
feat(react): Adding test app for React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneK committed Feb 26, 2025
1 parent cd5c27a commit dd37803
Show file tree
Hide file tree
Showing 10 changed files with 10,759 additions and 2 deletions.
14 changes: 14 additions & 0 deletions packages/react/test/apps/react17/src/OutputTarget.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { IonButton } from '@ionic/react';
import { fireEvent, render, screen } from '@testing-library/react';
import React from 'react';

test('should support onDoubleClick bindings', () => {
const mockFn = jest.fn();

render(<IonButton onDoubleClick={mockFn}>Click me</IonButton>);

// Simulate a double click on the button
fireEvent.dblClick(screen.getByText('Click me'));

expect(mockFn).toBeCalled();
});
30 changes: 30 additions & 0 deletions packages/react/test/apps/react19/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Ionic App</title>

<base href="/" />

<meta name="color-scheme" content="light dark" />
<meta
name="viewport"
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />

<link rel="manifest" href="/manifest.json" />

<link rel="shortcut icon" type="image/png" href="/favicon.png" />

<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Ionic App" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit dd37803

Please sign in to comment.