<commit_before>/*!
 * Application E2E Test
 *
 * Copyright(c) <NAME> <<EMAIL>>
 * Licensed under MIT
 */

import { SaraiNg2Page } from './app.po';

describe('sarai-ng2 App', function() {
  let page: SaraiNg2Page;

  beforeEach(() => {
    page = new SaraiNg2Page();
  });

  it('should contain the text "Project SARAI"', () => {
    page.navigateTo();

    expect(page.getLogoTitle()).toEqual('Project SARAI');
  });

  it('should make the suitability maps button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showSuitabilityMapsPanel();

    expect(page.getSuitabilityMapsButtonClass()).toMatch('btn--inverted');
  });

  it('should make the suitability map panel visible', () => {
    page.navigateTo();

    page.showSuitabilityMapsPanel();

    expect(page.getSuitabilityMapsPanelStyle('opacity')).toMatch('1');
  });

  it('should make the crop production area button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showCropProductionAreaPanel();

    expect(page.getCropProductionAreaButtonClass()).toMatch('btn--inverted');
  });

  it('should make the crop production area panel visible', () => {
    page.navigateTo();

    page.showCropProductionAreaPanel();

    expect(page.getCropProductionAreaPanelStyle('opacity')).toMatch('1');
  });

  it('should make the ndvi button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showNdviPanel();

    expect(page.getNdviButtonClass()).toMatch('btn--inverted');
  });

  it('should make the ndvi panel visible', () => {
    page.navigateTo();

    page.showNdviPanel();

    expect(page.getNdviPanelStyle('opacity')).toMatch('1');
  });

  it('should make the ndvi button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showRainfallMapPanel();

    expect(page.getRainfallMapButtonClass()).toMatch('btn--inverted');
  });

  it('should make the ndvi panel visible', () => {
    page.navigateTo();

    page.showRainfallMapPanel();

    expect(page.getRainfallMapPanelStyle('opacity')).toMatch('1');
  });

});

<commit_msg>Fix tests about map panels opacity<commit_after>/*!
 * Application E2E Test
 *
 * Copyright(c) <NAME> <<EMAIL>>
 * Licensed under MIT
 */

import { SaraiNg2Page } from './app.po';

describe('sarai-ng2 App', function() {
  let page: SaraiNg2Page;

  beforeEach(() => {
    page = new SaraiNg2Page();
  });

  it('should contain the text "Project SARAI"', () => {
    page.navigateTo();

    expect(page.getLogoTitle()).toEqual('Project SARAI');
  });

  it('should make the suitability maps button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showSuitabilityMapsPanel();

    expect(page.getSuitabilityMapsButtonClass()).toMatch('btn--inverted');
  });

  it('should make the suitability map panel visible', (done) => {
    page.navigateTo();

    page
      .showSuitabilityMapsPanel()
      .then(() => {
        return page.getSuitabilityMapsPanelStyle('opacity');
      })
      .then((opacity) => {
        expect(parseFloat(opacity)).toBeGreaterThan(0);
      })
      .thenFinally(done)
      ;
  });

  it('should make the crop production area button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showCropProductionAreaPanel();

    expect(page.getCropProductionAreaButtonClass()).toMatch('btn--inverted');
  });

  it('should make the crop production area panel visible', (done) => {
    page.navigateTo();

    page
      .showCropProductionAreaPanel()
      .then(() => {
        return page.getCropProductionAreaPanelStyle('opacity');
      })
      .then((opacity) => {
        expect(parseFloat(opacity)).toBeGreaterThan(0);
      })
      .thenFinally(done)
      ;
  });

  it('should make the ndvi button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showNdviPanel();

    expect(page.getNdviButtonClass()).toMatch('btn--inverted');
  });

  it('should make the ndvi panel visible', (done) => {
    page.navigateTo();

    page
      .showNdviPanel()
      .then(() => {
        return page.getNdviPanelStyle('opacity');
      })
      .then((opacity) => {
        expect(parseFloat(opacity)).toBeGreaterThan(0);
      })
      .thenFinally(done)
      ;
  });

  it('should make the ndvi button contain btn--inverted class when clicked', () => {
    page.navigateTo();

    page.showRainfallMapPanel();

    expect(page.getRainfallMapButtonClass()).toMatch('btn--inverted');
  });

  it('should make the ndvi panel visible', (done) => {
    page.navigateTo();

    page
      .showRainfallMapPanel()
      .then(() => {
        return page.getRainfallMapPanelStyle('opacity');
      })
      .then((opacity) => {
        expect(parseFloat(opacity)).toBeGreaterThan(0);
      })
      .thenFinally(done)
      ;
  });

});


{'fraction_non_alphanumeric': 0.1636251794135739, 'fraction_numerical': 0.0036907935206069303, 'mean_word_length': 3.3553571428571427, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 37, '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': '3174964', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1484, 'n_words': 287}