ionic-team / ionic-team/ionic-framework

bug: Karma UI doesn't fully work in an Ionic Angular application

Ouverte
#29,963 4 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
triage
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Jasmine part of the Karma UI doesn't show. This screenshot is from a newly created Ionic application using the CLI.
![ionic-karma-problem](https://github.com/user-attachments/assets/fcc22390-fd7c-46d5-b2ba-466cfea17965)

### Expected Behavior

Jasmine part of the Karma UI should show. This screenshot is from a newly created Angular application (without Ionic) using the CLI.
![ionic-karma-expected](https://github.com/user-attachments/assets/fb8ce635-74f1-4248-bc41-422c1a44b0dd)

### Steps to Reproduce

1. npm install -g @ionic/cli@latest
2. ionic start my-app blank --type=angular-standalone
3. cd my-app/
4. npm run test

Note: didn't provide a reproduction URL, as the problem is shown in a newly generated Ionic application.

### Code Reproduction URL

https://github.com

### Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module
'@capacitor/ios/package.json'

Require stack:
-
/home/vagrant/.npm-global/lib/node_modules/@ionic/cli/lib/project/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/lib/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/bin/ionic
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module
'@capacitor/android/package.json'

Require stack:
-
/home/vagrant/.npm-global/lib/node_modules/@ionic/cli/lib/project/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/lib/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/index.js
- /home/vagrant/.npm-global/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

Ionic CLI : 7.2.0 (/home/vagrant/.npm-global/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.3.3
@angular-devkit/build-angular : 18.2.9
@angular-devkit/schematics : 18.2.9
@angular/cli : 18.2.9
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.1.2
@capacitor/android : not installed
@capacitor/core : 6.1.2
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.17.0 (/usr/bin/node)
npm : 10.8.3
OS : Linux 5.15

### Additional Information

_No response_

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduce the problem with the listed Ionic CLI commands and inspect the generated Angular standalone test setup and Karma UI configuration. Compare the generated Ionic application with a newly generated Angular application, then verify that the Jasmine section appears when running npm run test.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend, testing
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.