<commit_before>"use strict";

describe('clicking on add team button ',function() {

  var addTeamButton;

  beforeEach(function() {
    browser.get('/#/side-menu21/teamProfile');
    addTeamButton = element(by.linkText('Add New Team'));
  });

  it('it should show the add team new team page when add team button pressed',function() {

  });

});

describe('clicking on the create profile button',function() {

  var createProfileButton, teamName, teamLoction;

  beforeEach(function() {
    browser.get('/#/side-menu21/addTeam');
    teamName = element(by.model('team.name'));
    teamLoction = element(by.model('team.location'));
    createProfileButton = element(by.css('.button.button-block.button-positive'));
  });

  it('should validate all fields filled in and display team profile',function() {
    teamName.sendKeys('<NAME>');
    teamLoction.sendKeys('Hospital ward A');

    createProfileButton.click().then(function() {
      expect(browser.getLocationAbsUrl()).toMatch('/side-menu21/teamProfile');
    });

    //should test content of team profile page

  });

  it('should show pop up if all fields not filled in',function() {
    teamName.sendKeys('');
    teamLoction.sendKeys('');

    createProfileButton.click().then(function() {
      expect(browser.getLocationAbsUrl()).toMatch('/side-menu21/addTeam');

      var popup = element(by.css('.popup-container.popup-showing.active'));
      expect(popup.isDisplayed()).toBeTruthy();

    });

  });

});<commit_msg>close #4 ensure example e2e-tests added<commit_after>"use strict";

describe('clicking on add team button ',function() {

  var addTeamButton;

  beforeEach(function() {
    browser.get('/#/side-menu21/teamProfile');
    addTeamButton = element(by.linkText('Add New Team'));
  });

  it('it should show the add team new team page when add team button pressed',function() {

  });

});

describe('clicking on the create profile button',function() {

  var createProfileButton, teamName, teamLoction;

  beforeEach(function() {
    browser.get('/#/side-menu21/addTeam');
    teamName = element(by.model('team.name'));
    teamLoction = element(by.model('team.location'));
    createProfileButton = element(by.css('.button.button-block.button-positive'));
  });

  it('should validate all fields filled in and display team profile',function() {
    teamName.sendKeys('First test team');
    teamLoction.sendKeys('Hospital ward A');

    createProfileButton.click().then(function() {
      expect(browser.getLocationAbsUrl()).toMatch('/side-menu21/teamProfile');
    });

    //possible shold have extra test to ensure that team actually added

  });

  it('should show pop up if all fields not filled in',function() {
    teamName.sendKeys('');
    teamLoction.sendKeys('');

    createProfileButton.click().then(function() {
      expect(browser.getLocationAbsUrl()).toMatch('/side-menu21/addTeam');

      var popup = element(by.css('.popup-container.popup-showing.active'));
      expect(popup.isDisplayed()).toBeTruthy();

    });

  });

});
{'fraction_non_alphanumeric': 0.15862524785194976, 'fraction_numerical': 0.005948446794448116, 'mean_word_length': 4.156729131175468, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6792478', 'n_tokens_mistral': 913, 'n_tokens_neox': 866, 'n_words': 189}