<commit_before>import { browser, ElementFinder } from 'protractor';
import { BaseElement } from '../../ui/base.element';
import { Dropdown } from '../../ui/dropdown';

export class Header extends BaseElement {
  profileDropdown = new ProfileDropdown(this.$('.user-dropdown-menu'));
  recentItemsDropdown = new RecentItemsDropdown(this.$('.recent-items-dropdown'));

  constructor(el: ElementFinder) {
    super(el);
  }

  async ready() {
    await this.profileDropdown.ready();
    await this.recentItemsDropdown.ready();
  }
}

export class ProfileDropdown extends Dropdown {

  constructor(element: ElementFinder) {
    super(element);
  }

  async selectProfile() {
    super.select('Profile');
  }

  async selectSettings() {
    super.select('Settings');
  }

  async selectLogOut() {
    super.select('Log Out');
  }
}

export class RecentItemsDropdown extends Dropdown {

  private isProd: boolean = true;

  constructor(element: ElementFinder) {
    super(element);
    let url: string = browser.params.target.url;

    if (url.includes('localhost') || url.includes('preview')) {
      this.isProd = false;
    }
  }

  async selectAccountHome() {
    if (this.isProd) {
      super.select('Account home');
    } else {
      super.select('Home');
    }
  }

  async selectCreateSpace() {
    if (this.isProd) {
      super.select('Create space');
    } else {
      super.select('Create Space');
    }
  }
}<commit_msg>E2E: Updated top dropdown menu for prod<commit_after>import { ElementFinder } from 'protractor';
import { BaseElement } from '../../ui/base.element';
import { Dropdown } from '../../ui/dropdown';

export class Header extends BaseElement {
  profileDropdown = new ProfileDropdown(this.$('.user-dropdown-menu'));
  recentItemsDropdown = new RecentItemsDropdown(this.$('.recent-items-dropdown'));

  constructor(el: ElementFinder) {
    super(el);
  }

  async ready() {
    await this.profileDropdown.ready();
    await this.recentItemsDropdown.ready();
  }
}

export class ProfileDropdown extends Dropdown {

  constructor(element: ElementFinder) {
    super(element);
  }

  async selectProfile() {
    super.select('Profile');
  }

  async selectSettings() {
    super.select('Settings');
  }

  async selectLogOut() {
    super.select('Log Out');
  }
}

export class RecentItemsDropdown extends Dropdown {

  constructor(element: ElementFinder) {
    super(element);
  }

  async selectAccountHome() {
    super.select('Home');
  }

  async selectCreateSpace() {
    if (this.isProd) {
      super.select('Create space');
    } else {
      super.select('Create Space');
    }
  }
}
{'fraction_non_alphanumeric': 0.14351320321469574, 'fraction_numerical': 0.0003827018752391887, 'mean_word_length': 3.445578231292517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '511896', 'n_tokens_mistral': 796, 'n_tokens_neox': 783, 'n_words': 165}