~andreserl/maas/refactor_debconf_selections_preseed

« back to all changes in this revision

Viewing changes to src/maasserver/static/js/angular/controllers/tests/test_node_details.js

  • Committer: MAAS Lander
  • Author(s): Lee Trager
  • Date: 2017-03-01 22:46:02 UTC
  • mfrom: (5755.3.5 test_result_ui)
  • Revision ID: maas_lander-20170301224602-pd2kbtwexkqd5r2b
[r=andreserl][bug=][author=ltrager] Add a section to the UI for test results.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
            summary_xml: null,
84
84
            summary_yaml: null,
85
85
            commissioning_results: [],
 
86
            testing_results: [],
86
87
            installation_results: [],
87
88
            events: [],
88
89
            interfaces: [],
481
482
            }]);
482
483
        });
483
484
 
484
 
    it("machine output output view available if commissioning_results",
 
485
    it("machine output commissioning view available if commissioning_results",
485
486
        function() {
486
487
            node.commissioning_results.push({});
487
488
            var controller = makeControllerResolveSetActiveItem();
488
489
            expect($scope.machine_output.views).toEqual([{
489
 
                name: "output",
490
 
                title: "Commissioning Output"
 
490
                name: "commissioning",
 
491
                title: "Commissioning Results"
491
492
            }]);
492
493
        });
493
494
 
494
 
    it("machine output install view available if installation_results",
 
495
    it("machine output installation view available if installation_results",
495
496
        function() {
496
497
            node.installation_results.push({});
497
498
            var controller = makeControllerResolveSetActiveItem();
498
499
            expect($scope.machine_output.views).toEqual([{
499
 
                name: "install",
 
500
                name: "installation",
500
501
                title: "Installation Output"
501
502
            }]);
502
503
        });
506
507
            node.commissioning_results.push({});
507
508
            var controller = makeControllerResolveSetActiveItem();
508
509
            expect($scope.machine_output.selectedView).toEqual({
509
 
                name: "output",
510
 
                title: "Commissioning Output"
 
510
                name: "commissioning",
 
511
                title: "Commissioning Results"
511
512
            });
512
513
        });
513
514
 
524
525
            // Output view should still be selected as it was initially
525
526
            // selected.
526
527
            expect($scope.machine_output.selectedView).toEqual({
527
 
                name: "output",
528
 
                title: "Commissioning Output"
 
528
                name: "commissioning",
 
529
                title: "Commissioning Results"
529
530
            });
530
531
        });
531
532
 
532
533
    it("machine output install view is always selected first if possible",
533
534
        function() {
534
535
            node.commissioning_results.push({});
 
536
            node.testing_results.push({});
535
537
            node.installation_results.push({});
536
538
            var controller = makeControllerResolveSetActiveItem();
537
539
            expect($scope.machine_output.selectedView).toEqual({
538
 
                name: "install",
 
540
                name: "installation",
539
541
                title: "Installation Output"
540
542
            });
541
543
        });
2147
2149
            $scope.node = makeNode();
2148
2150
            var install_result = {};
2149
2151
            $scope.node.installation_results.push({
2150
 
                data: install_result
 
2152
                output: install_result
2151
2153
            });
2152
2154
            $scope.node.installation_results.push({
2153
 
                data: {}
 
2155
                output: {}
2154
2156
            });
2155
2157
            expect($scope.getInstallationData()).toBe("\n" + install_result);
2156
2158
        });