{"size": 772, "ext": "js", "max_stars_repo_path": "ui/admin/tests/pages/tenants/tenants-dashboard.js", "max_stars_repo_name": "xlinur/camunda", "max_stars_repo_stars_event_min_datetime": "2016-07-14T03:19:46.000Z", "max_stars_repo_stars_event_max_datetime": "2016-07-14T03:19:46.000Z", "max_issues_repo_path": "ui/admin/tests/pages/tenants/tenants-dashboard.js", "max_issues_repo_name": "langfr/camunda-bpm-webapp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ui/admin/tests/pages/tenants/tenants-dashboard.js", "max_forks_repo_name": "langfr/camunda-bpm-webapp", "max_forks_repo_forks_event_min_datetime": "2019-09-07T01:31:01.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-07T01:31:01.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 22.7058823529, "max_line_length": 79, "alphanum_fraction": 0.6476683938}
'use strict';

var Base = require('./../base');

module.exports = Base.extend({

  url: '/camunda/app/admin/default/#/tenants',

  newTenantButton: function() {
    return element(by.css('[ng-show="availableOperations.create"] > a'));
  },

  tenantList: function() {
    return element.all(by.repeater('tenant in tenantList'));
  },

  tenantId: function(idx) {
    return this.tenantList().get(idx).element(by.css('.tenant-id > a'));
  },

  tenantName: function(idx) {
    return this.tenantList().get(idx).element(by.binding('{{ tenant.name }}'));
  },

  selectTenantByEditLink: function(idx) {
    return this.tenantList().get(idx).element(by.linkText('Edit')).click();
  },

  selectTenantByNameLink: function(idx) {
    return this.tenantId(idx).click();
  }

});
