openSUSE上的lightdm自动登录

时间:2017-04-02 15:58:00

标签: linux opensuse

如何为用户创建lightdm自动登录" test"在openSUSE上 这段代码对我不起作用:

describe("MealSuggestionsController", function() {
  var $componentController, $rootScope, MealSuggestionsService, MealSuggestionsController, scope;

  beforeEach(function() {
    module('wwwAPP');

    // Provide will help us create fake implementations for our dependencies
    module(function($provide) {

    // Fake MealSuggestionsService Implementation returning a promise
      $provide.value('MealSuggestionsService', {
        getMeals: function() {
          return {
            then: function(callback) {
              return callback([
                {
                  "foo": "bar"
                }
              ]);
            }
          };
        }
      });
      return null;
    });
  });

  beforeEach(function() {

    // When Angular Injects the MealSuggestionsService dependency,
    // it will use the implementation we provided above
    inject(function($injector) {
      $componentController = $injector.get('$componentController');
      $rootScope = $injector.get('$rootScope');
      MealSuggestionsService = $injector.get('MealSuggestionsService');
      scope = $rootScope.$new();
      MealSuggestionsController = $componentController ('mealSuggestions', {
        $scope: {},
        MealSuggestionsService: MealSuggestionsService
      })
    });
    main = jasmine.createSpy().and.callFake(function() {
      MealSuggestionsService.getMeals();
    });
  });

  it('The MealSuggestionsController should be defined', function() {
    expect(MealSuggestionsController).toBeDefined();
  });

  it('main() should be a defined function', function() {
    expect(main).toBeDefined();
    expect(typeof main).toEqual("function");
  });

  it('should have call main', function() {
    spyOn(MealSuggestionsController, 'main').and.callThrough();
    expect(MealSuggestionsController.main).toHaveBeenCalled();
    spyOn(MealSuggestionsService, 'getMeals').and.callThrough();
    expect(MealSuggestionsService.getMeals).toHaveBeenCalled();
  });
});

加载到正常登录屏幕。

1 个答案:

答案 0 :(得分:0)

使用yast2或修改df['DOY'] = datetime.timetuple(df['Date']).tm_yday 并将/etc/sysconfig/displaymanager设置为“是”

DISPLAYMANAGER_AUTOLOGIN