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

tmp test e2e tests #771

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
db3f33d
add test to find last import line
denrase Nov 27, 2024
1ccd8cd
add basic wizzard and patch import in main.dart
denrase Nov 27, 2024
fd82fb5
patch pubspec.yaml
denrase Dec 2, 2024
7516db9
Merge branch 'master' into feat/flutter-support
denrase Dec 3, 2024
95a01e6
add sentry dart plugin options and propeties to pubspec file
denrase Dec 3, 2024
8a6839e
patch main with sentry init, fetch sentry_flutter version
denrase Dec 3, 2024
7844198
Merge branch 'master' into feat/flutter-support
denrase Dec 9, 2024
9e8fecd
update template, check already added to pubspec
denrase Dec 9, 2024
b6cd5db
order flutter behind reactNative
denrase Dec 9, 2024
d7e5f4a
cleanup
denrase Dec 9, 2024
cf0c522
update order
denrase Dec 9, 2024
7a10349
add cl entry
denrase Dec 9, 2024
c971115
Merge branch 'master' into feat/flutter-support
denrase Dec 16, 2024
23c3db4
fix typos
denrase Dec 16, 2024
51e0fd4
remove comment
denrase Dec 16, 2024
d3ae482
introduce options in flutter templates
denrase Dec 16, 2024
fce1ddd
options in setup, dont upload sources, upload debug symbols
denrase Dec 16, 2024
c15ca33
setup flutter e2e test
denrase Dec 16, 2024
e8c2f59
add flutter test app
denrase Dec 16, 2024
56b7889
fix Flutter e2e test
denrase Dec 16, 2024
17dcd69
update docs/readme
denrase Dec 17, 2024
1d55981
Merge branch 'master' of https://github.com/denrase/sentry-wizard int…
denrase Dec 17, 2024
4d78e0f
Merge branch 'master' into feat/flutter-support
denrase Dec 30, 2024
8cf3b5a
Disable replay option for now
denrase Dec 30, 2024
2c2c712
run prettier
denrase Jan 7, 2025
941b525
fix tests
denrase Jan 7, 2025
771fd0f
run prettier
denrase Jan 7, 2025
3f575bc
don’t add profiling if ios/macos is not configured
denrase Jan 9, 2025
0560f49
Merge branch 'master' into feat/flutter-support
denrase Jan 9, 2025
7a97d99
run prettier
denrase Jan 13, 2025
ff5a681
update snippet
denrase Jan 15, 2025
faea043
fix telemetey name
denrase Jan 15, 2025
77859e4
return if pubspec.yaml could not be found in project dir
denrase Jan 15, 2025
bae9598
check if main exists
denrase Jan 15, 2025
4e24413
show paste instructions if main could not be found
denrase Jan 15, 2025
9790373
sow snippt for pubspec file
denrase Jan 15, 2025
a136367
use chalk.cyan for file references
denrase Jan 15, 2025
9277dee
wrap file reads in try/catch
denrase Jan 15, 2025
a50ef03
update text
denrase Jan 15, 2025
e262bed
Merge branch 'master' into feat/flutter-support
denrase Jan 15, 2025
9dbe279
update debug flags
denrase Jan 15, 2025
e7fc89d
run prettier
denrase Jan 15, 2025
9531763
run flutter commands in test app dir
denrase Jan 20, 2025
363d945
add SentryWidget
denrase Jan 21, 2025
ddf019e
fix cl
denrase Jan 21, 2025
d6f1886
add sentry widget in sample snippet
denrase Jan 22, 2025
853149e
Merge branch 'master' into feat/flutter-support
denrase Jan 22, 2025
4864d08
Merge branch 'master' into feat/flutter-support
denrase Jan 22, 2025
c9da6d5
change order
Lms24 Jan 28, 2025
c1b9f5e
revert order
Lms24 Jan 28, 2025
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
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,29 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
wizard: [Nuxt-3, Nuxt-4, NextJS, Remix, Sveltekit]
wizard: [Flutter, Nuxt-3, Nuxt-4, NextJS, Remix, Sveltekit]
env:
SENTRY_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_SENTRY_AUTH_TOKEN }}
SENTRY_TEST_ORG: 'sentry-javascript-sdks'
SENTRY_TEST_PROJECT: 'sentry-wizard-e2e-tests'
steps:
- uses: actions/checkout@v3
- name: Set up Node
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 22
cache: 'yarn'
- name: Setup Flutter
if: matrix.wizard == 'Flutter'
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected]
with:
channel: 'stable'
- name: Build Flutter
if: matrix.wizard == 'Flutter'
working-directory: e2e-tests/test-applications/flutter-test-app
run: |
flutter upgrade
flutter pub get
- name: Install dependencies with yarn
run: yarn install --frozen-lockfile
- name: Run End-to-End Tests
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- feat(flutter): Add Flutter support ([#735](https://github.com/getsentry/sentry-wizard/pull/735))

## 3.39.0

- Always send platform query param to auth page ([#757](https://github.com/getsentry/sentry-wizard/pull/757))
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<h1>Sentry Wizard</h1>
<h4>The Sentry Wizard helps you set up your React Native, Cordova, Electron or Next.js projects with Sentry.</h4>
<h4>The Sentry Wizard helps you set up your React Native, Flutter, Cordova, Electron or Next.js projects with Sentry.</h4>

[![npm version](https://img.shields.io/npm/v/@sentry/wizard.svg)](https://www.npmjs.com/package/@sentry/wizard)
[![npm dm](https://img.shields.io/npm/dm/@sentry/wizard.svg)](https://www.npmjs.com/package/@sentry/wizard)
Expand Down Expand Up @@ -49,7 +49,7 @@ yarn sentry-wizard
npx @sentry/wizard
```

At the current moment, the wizard can be used for Next.js, react-native, iOS, Nuxt, Remix, Sveltekit, Android, Electron, Cordova, and for sourcemaps setup. If you have other platforms you would like the wizard to support, please open a [GitHub issue](https://github.com/getsentry/sentry-wizard/issues)!
At the current moment, the wizard can be used for Next.js, react-native, iOS, Flutter, Nuxt, Remix, Sveltekit, Android, Electron, Cordova, and for sourcemaps setup. If you have other platforms you would like the wizard to support, please open a [GitHub issue](https://github.com/getsentry/sentry-wizard/issues)!

# Options

Expand All @@ -63,7 +63,7 @@ The following CLI arguments are available:
| `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
| `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
| `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
| `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "ios", "android", "cordova", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
| `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "flutter", ios", "android", "cordova", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
| `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
| `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
| `--project` | The Sentry project slug to use | string | Select project during setup | | |
Expand Down
6 changes: 5 additions & 1 deletion e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

```
test-applications/
|---- flutter-test-app/
|---- nextjs-test-app/
|---- remix-test-app/
|---- sveltekit-test-app/
tests/
|---- flutter.test.ts
|---- nextjs.test.ts
|---- remix.test.ts
|---- sveltekit.test.ts
Expand Down Expand Up @@ -37,6 +39,8 @@ tests/
- `checkIfRunsOnDevMode` - Checks if the test project runs on dev mode successfully.
- `checkIfRunsOnProdMode` - Checks if the test project runs on prod mode successfully.

- `checkIfFlutterBuilds` - Checks if the Flutter (Web) test project builds successfully.
- `checkSentryProperties` - Checks if the Flutter `sentry.properties` file contains the auth token

#### `WizardTestEnv`

Expand All @@ -52,7 +56,7 @@ Tests can be run locally from the root of the project with:

To run a specific test application

`yarn test:e2e [Remix | NextJS | SvelteKit]`
`yarn test:e2e [Flutter | Remix | NextJS | SvelteKit]`

## Writing Tests

Expand Down
176 changes: 176 additions & 0 deletions e2e-tests/test-applications/flutter-test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release


# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
45 changes: 45 additions & 0 deletions e2e-tests/test-applications/flutter-test-app/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: android
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: ios
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: linux
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: macos
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: web
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: windows
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
16 changes: 16 additions & 0 deletions e2e-tests/test-applications/flutter-test-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# flutter_magic

A new Flutter project.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)

For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
28 changes: 28 additions & 0 deletions e2e-tests/test-applications/flutter-test-app/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
13 changes: 13 additions & 0 deletions e2e-tests/test-applications/flutter-test-app/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
Loading
Loading