ionic-team / ionic-unit-testing-example

Example of adding unit testing in your Ionic 2.x or greater apps with Karma and Jasmine
Other
374 stars 145 forks source link

Toggle Menu button does nothing #15

Closed Noxxys closed 7 years ago

Noxxys commented 7 years ago

It's not related to unit testing, but the 'Toggle Menu' button does nothing when clicked, both with ionic serve and the Android emulator.

I don't have this problem with the original app, created with ionic start myApp sidemenu --v2 I just did npm install after cloning this repo. Which steps am I missing?

leifwells commented 7 years ago

The menu button that should appear in the upper left is also missing, at least for me.

Why are there so many weird problems with this project?

leifwells commented 7 years ago

Current src/app/app.html:

<ion-nav [root]="rootPage"></ion-nav>

What src/app/app.html looks like in a normal app created using ionic start myApp sidemenu --v2:

<ion-menu [content]="content">
  <ion-header>
    <ion-toolbar>
      <ion-title>Menu</ion-title>
    </ion-toolbar>
  </ion-header>

  <ion-content>
    <ion-list>
      <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
        {{p.title}}
      </button>
    </ion-list>
  </ion-content>

</ion-menu>

<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>

I wonder what happened?

leifwells commented 7 years ago

I've made a pull request: https://github.com/driftyco/ionic-unit-testing-example/pull/18

GeorgeAnagnostopoulos commented 7 years ago

If you add the required markup in app.html as per seed project everything works fine.

leifwells commented 7 years ago

Fixed with https://github.com/driftyco/ionic-unit-testing-example/pull/18