"use strict";

var _LoginPage = _interopRequireDefault(require("./pageObjects/LoginPage"));

var _ObjectRecordPage = _interopRequireDefault(require("./pageObjects/ObjectRecordPage"));

var _ProtectedPage = _interopRequireDefault(require("./pageObjects/ProtectedPage"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

describe('object record page', function suite() {
  const loginPage = new _LoginPage.default();
  const objectRecordPage = new _ObjectRecordPage.default();
  const protectedPage = new _ProtectedPage.default();
  describe('when logged in as the admin user', () => {
    before(() => {
      loginPage.open();
      loginPage.login(testParams.adminUser.username, testParams.adminUser.password);
      protectedPage.becomesVisible();
      objectRecordPage.open();
      objectRecordPage.becomesVisible();
    });
    after(() => {
      if (protectedPage.isVisible()) {
        protectedPage.logout();
      }
    });
    it('should open', () => {
      objectRecordPage.isVisible().should.equal(true);
    });
  });
});