私は localhost:3000/apps という URL を持っています。これは、listApps と createApps の 2 つのパーシャルで構成されています。以下は、これら 2 つのパーシャルを挿入する私の app.html コードです。あるパーシャルから別のパーシャルに切り替えて、各パーシャルをテストする方法を知りたいです。私の主な問題は、タブをアクティブに設定してその部分をテストする方法、またはこれをテストするのに何が最善だと思うかです。ありがとう
<div ng-include="'components/navbar/navbar.html'"></div>
<div class="container main-content" ng-controller="AppsCtrl">
<alert ng-repeat="alert in alerts" type="{{ alert.type }}" close="closeAlert($index)">{{ alert.msg }}</alert>
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/apps" class="active">My Applications</a></li>
</ol>
<tabset type="pills">
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disabled="tab.disabled" ng-hide="tab.hidden">
<div ng-if="(tab.id == 'createApp')"><ng-include src="'app/apps/partials/create_app.html'"></ng-include></div>
<div ng-if="(tab.id == 'listApp')"><ng-include src="'app/apps/partials/list_app.html'"></ng-include></div>
</tab>
</tabset>
</div>
<div ng-include="'components/footer/footer.html'"></div>