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

Add unit tests to dbt docs #496

Closed
8 changes: 4 additions & 4 deletions src/app/docs/unit_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ <h1>
</div>
<div class="app-frame app-pad-h">
<ul class="nav nav-tabs">
<li ui-sref-active='active'><a ui-sref="dbt.unit_test({'#': 'description'})">Description</a></li>
<li ui-sref-active='active' ng-show = "parentsLength != 0"><a ui-sref="dbt.unit_test({'#': 'depends_on'})">Depends On</a></li>
<li ui-sref-active='active'><a ui-sref="dbt.unit_test({'#': 'description'})">Description of Unit Test</a></li>
<li ui-sref-active='active' ng-show = "parentsLength != 0"><a ui-sref="dbt.unit_test({'#': 'depends_on'})">Unit Test Depends On</a></li>
</ul>
</div>
</div>
Expand All @@ -37,7 +37,7 @@ <h1>
<section class="section">
<div class="section-target" id="description"></div>
<div class="section-content">
<h6>Description</h6>
<h6>Description of Unit Test</h6>
<div class="panel">
<div class="panel-body">
<div ng-if="model.description" class="model-markdown" marked="model.description"></div>
Expand All @@ -50,7 +50,7 @@ <h6>Description</h6>
<section class="section" ng-show = "parentsLength != 0">
<div class="section-target" id="depends_on"></div>
<div class="section-content">
<h6>Depends On</h6>
<h6>Unit Test Depends On</h6>
<reference-list references="parents" node="model" />
</div>
</section>
Expand Down
9 changes: 9 additions & 0 deletions src/app/index.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const templates = {
seed: require('./docs/seed.html'),
unit_test: require('./docs/unit_test.html'),
test: require('./docs/test.html'),
unit_test: require('./docs/unit_test.html'),
analysis: require('./docs/analysis.html'),
macro: require('./docs/macro.html'),
exposure: require('./docs/exposure.html'),
Expand Down Expand Up @@ -95,6 +96,14 @@ angular
unique_id: {type: 'string'}
},
})
.state('dbt.unit_test', {
url: 'unit_test/:unique_id?section&' + graph_params,
controller: 'TestCtrl',
templateUrl: templates.test,
params: {
unique_id: {type: 'string'}
},
})
.state('dbt.analysis', {
url: 'analysis/:unique_id?section&' + graph_params,
controller: 'AnalysisCtrl',
Expand Down
Loading