<commit_before>import { getCountFromHeader } from '../support/helper-functions';
import { queries, urls, values } from '../support/permissions-constants';

describe('employee permissions', () => {
  before(() => {
    cy.login('EMPLOYEE');
  });

  beforeEach(() => {
    // go to the homepage
    cy.visit('/');
  });

  after(() => {
    cy.logout();
  });

  it.skip('0. Should show "Kadastrale subjecten" for medewerker in the autocomplete', () => {
    // TODO: enable this test once fetch is fully supported by Cypress
    // this test now fails because we send the auth headers in the fetch call
    // https://github.com/cypress-io/cypress/issues/95

    cy.server();
    cy.route('/typeahead?q=bakker').as('getResults');
    cy.get('#auto-suggest__input').focus().click().type('bakker');

    cy.wait('@getResults');
    cy.get('.auto-suggest__tip').should('exist').and('be.visible');
    cy.get('.auto-suggest__dropdown').contains(values.kadastraleSubjecten);
    cy.get('.auto-suggest__dropdown-item').contains('ijf Ja');
  });

  it('1. Should show a message after search is performed', () => {
    cy.server();
    cy.defineSearchRoutes();

    cy.get('#auto-suggest__input').focus().type('bakker');
    cy.get('.qa-search-form-submit').click();

    cy.waitForSearch();
    cy.get(queries.warningPanel)
      .contains('Medewerkers met speciale bevoegdheden kunnen alle gegevens vinden');
    cy.get(queries.searchHeader).contains(values.kadastraleSubjecten).then((title) => {
      const count = getCountFromHeader(title.text());
      expect(count).to.be.below(100);
    });
  });

  it('2A. Should allow an employee to view a natural person but not the "Zakelijke rechten"', () => {
    cy.server();
    cy.route('/brk/subject/*').as('getResults');

    cy.visit(urls.natuurlijk);

    cy.wait('@getResults');
    cy.get(queries.warningPanel)
      .contains('Medewerkers met speciale bevoegdheden kunnen alle gegevens zien (ook zakelijke rechten).');
    cy.get(queries.headerTitle).contains('akker');
    cy.get(queries.natuurlijkPersoon).should('exist').and('be.visible');
  });

  it('2B. Should allow an employee to view a non-natural subject', () => {
    cy.server();
    cy.route('/brk/subject/*').as('getResults');

    cy.visit(urls.nietNatuurlijk);

    cy.wait('@getResults');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('er & T');
    cy.get(queries.nietNatuurlijkPersoon).should('exist').and('be.visible');
  });

  it('3. Should show an employee all info for a cadastral subject', () => {
    cy.server();
    cy.route('/brk/object/*').as('getResults');
    cy.route('/brk/object-expand/*').as('getObjectExpand');
    cy.route('/bag/nummeraanduiding/?kadastraalobject=*').as('getNummeraanduidingen');

    cy.visit(urls.business);

    cy.wait('@getResults');
    cy.wait('@getObjectExpand');
    cy.wait('@getNummeraanduidingen');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('08575');
    cy.get(queries.headerSubTitle).contains(values.aantekeningen);
  });

  it('4. Should show an employee all info for an address', () => {
    cy.server();
    cy.route('/bag/verblijfsobject/*').as('getVerblijfsobject');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/bag/pand/?verblijfsobjecten__id=*').as('getPanden');
    cy.route('/brk/object-expand/?verblijfsobjecten__id=*').as('getObjectExpand');
    cy.route('/monumenten/monumenten/*').as('getMonument');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getSitueringen');

    cy.visit(urls.address);

    cy.wait('@getVerblijfsobject');
    cy.wait('@getMonument');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getObjectExpand');
    cy.wait('@getPanden');
    cy.wait('@getSitueringen');
    cy.get(queries.headerTitle).contains('Nes 98');
    cy.get(queries.headerSubTitle).should(($values) => {
      expect($values).to.contain('Ligt in');
      expect($values).to.contain('Panoramabeeld');
      expect($values).to.contain('Verblijfsobject');
      expect($values).to.contain('Panden');
      expect($values).to.contain('Vestigingen');
      expect($values).to.contain('Kadastrale objecten');
      expect($values).to.contain('Monumenten');
      expect($values).to.contain(values.zakelijkeRechten);
    });
    cy.get(queries.warningPanel).should('not.exist');
  });

  it('5. Should show an employee all info for "Gemeentelijke beperking"', () => {
    cy.server();
    cy.route('/wkpb/beperking/*').as('getResults');
    cy.route('/wkpb/brondocument/?beperking=*').as('getBronDocument');
    cy.route('/brk/object/?beperkingen__id=*').as('getObject');

    cy.visit(urls.gemeentelijkeBeperking);

    cy.wait('@getResults');
    cy.wait('@getBronDocument');
    cy.wait('@getObject');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('6142');
    cy.get(queries.keyValueList).contains(values.documentnaam);
  });

  it('6. Should allow an employee to view all map layers', () => {
    cy.visit(urls.map);
    cy.get(queries.mapLayersCategory).should(($values) => {
      expect($values).to.contain(values.economieEnHaven);
      expect($values).to.contain(values.geografie);
      expect($values).to.contain(values.bedrijvenInvloedsgebieden);
    });
    cy.get(queries.legendToggleItem).contains(values.vestigingenHoreca).click();
    cy.get(queries.legendNotification).should('not.exist');
    /** Leave out visible for elements that could be hidden by overscroll
    cy.get(queries.legendItem).contains(values.legendCafeValue).should('exist').and('be.visible');
    */
    cy.get(queries.legendItem).contains(values.legendCafeValue).should('exist');
  });

  it('7A. Should allow an employee to view "Vestigingen"', () => {
    cy.server();
    cy.route('/dataselectie/hr/*').as('getResults');

    cy.visit(urls.vestigingenTabel);

    cy.wait('@getResults');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.table).contains('Handelsnaam');
  });

  it('7B. Should show an employee all "Pand" information', () => {
    cy.server();
    cy.route('/bag/pand/*').as('getResults');
    cy.route('/monumenten/monumenten/?betreft_pand=*').as('getMonumenten');
    cy.route('/bag/nummeraanduiding/?pand=*').as('getNummeraanduidingen');
    cy.route('/handelsregister/vestiging/?pand=*').as('getVestigingen');

    cy.visit(urls.pand);

    cy.wait('@getResults');
    cy.wait('@getMonumenten');
    cy.wait('@getNummeraanduidingen');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('0001216');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.pandVestigingName);
  });

  it.skip('7C. Should show an employee all information in a Geo search', () => {
    // TODO: enable this test once fetch is fully supported by Cypress
    // this test now fails because we send the auth headers in the fetch call
    // https://github.com/cypress-io/cypress/issues/95

    cy.server();
    cy.defineGeoSearchRoutes();
    cy.route('/bag/pand/*').as('getResults');
    cy.route('/monumenten/monumenten/?betreft_pand=*').as('getMonumenten');
    cy.route('/bag/nummeraanduiding/?pand=*').as('getNummeraanduidingen');
    cy.route('/handelsregister/vestiging/?pand=*').as('getVestigingen');

    cy.visit(urls.geoSearch);

    cy.waitForGeoSearch();
    cy.wait('@getResults');
    cy.wait('@getMonumenten');
    cy.wait('@getNummeraanduidingen');
    cy.wait('@getVestigingen');
    cy.get('.o-header').contains('1393.70, 48738');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerSubTitle).contains(values.vestigingen);
    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.mapSearchResultsCategoryHeader).contains(values.vestigingen);
  });

  it('7D. Should show an employee all information in a "ligplaats" search', () => {
    cy.server();
    cy.route('/bag/ligplaats/*').as('getResults');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getMonument');
    cy.route('/handelsregister/vestiging/?nummeraanduiding=*').as('getVestigingen');

    cy.visit(urls.ligplaats);

    cy.wait('@getResults');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getMonument');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('Oosterdokskade 8');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.ligplaatsVestigingName);
  });

  it('7E. Should show an employee all information in "standplaats" search', () => {
    cy.server();
    cy.route('/bag/standplaats/*').as('getResults');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getMonument');
    cy.route('/handelsregister/vestiging/?nummeraanduiding=*').as('getVestigingen');

    cy.visit(urls.standplaats);

    cy.wait('@getResults');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getMonument');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('oedele');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.standplaatsVestigingName);
  });

  it('7F. Should allow an employee to view "vestiging"', () => {
    cy.server();
    cy.route('/handelsregister/vestiging/*').as('getVestiging');
    cy.route('/handelsregister/maatschappelijkeactiviteit/*').as('getMaatschappelijkeActiviteit');

    cy.visit(urls.vestiging);

    cy.wait('@getVestiging');
    cy.wait('@getMaatschappelijkeActiviteit');
    cy.get(queries.headerTitle).contains('uwe Loo');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.vestigingName);

    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.infoNotification).should('not.exist');
    cy.get(queries.mapDetailResultHeaderSubTitle).contains(values.vestigingName);
  });

  it('7G. Should allow an employee to view "maatschappelijke activiteit"', () => {
    cy.server();
    cy.route('/handelsregister/maatschappelijkeactiviteit/*').as('getMaatschappelijkeActiviteit');
    cy.route('/handelsregister/persoon/*').as('getPersoon');
    cy.route('/handelsregister/vestiging/?maatschappelijke_activiteit=*').as('getVestigingen');
    cy.route('/handelsregister/functievervulling/?heeft_aansprakelijke=*').as('getFunctievervullingen');

    cy.visit(urls.maatschappelijkeActiviteit);

    cy.wait('@getMaatschappelijkeActiviteit');
    cy.wait('@getPersoon');
    cy.wait('@getVestigingen');
    cy.wait('@getFunctievervullingen');
    cy.get(queries.headerTitle).contains(values.maatschappelijkeActiviteitName);
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.maatschappelijkeActiviteitVestigingName);
  });

  it('8A. Should show an employee all information in "monument"', () => {
    cy.server();
    cy.route('/monumenten/monumenten/*').as('getMonument');
    cy.route('/monumenten/complexen/*').as('getComplex');
    cy.route('/monumenten/situeringen/?monument_id=*').as('getSitueringen');

    cy.visit(urls.monument);

    cy.wait('@getMonument');
    cy.wait('@getComplex');
    cy.wait('@getSitueringen');
    cy.get(queries.headerTitle).contains('Museumtuin met hekwerken en bouwfragmenten');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.redengevendeOmschrijving);
    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.mapDetailResultItem).contains(values.type);
  });

  it('8B. Should show an employee all information in "monument complex"', () => {
    cy.server();
    cy.route('/monumenten/complexen/*').as('getComplex');
    cy.route('/monumenten/monumenten/?complex_id=*').as('getMonumenten');

    cy.visit(urls.monumentComplex);

    cy.wait('@getComplex');
    cy.wait('@getMonumenten');
    cy.get(queries.headerTitle).contains('us Bo');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.beschrijving);
  });
});
<commit_msg>DP-5464 peermissions-employee e2e fixed<commit_after>import { getCountFromHeader } from '../support/helper-functions';
import { queries, urls, values } from '../support/permissions-constants';

describe('employee permissions', () => {
  before(() => {
    cy.login('EMPLOYEE');
  });

  after(() => {
    cy.logout();
  });

  it('0. Should show "Kadastrale subjecten" for medewerker in the autocomplete', () => {
    cy.server();
    cy.route('/typeahead?q=bakker').as('getResults');

    cy.visit('/');
    cy.get('#auto-suggest__input').focus().click().type('bakker');

    cy.wait('@getResults');
    cy.get('.auto-suggest__tip').should('exist').and('be.visible');
    cy.get('.auto-suggest__dropdown').contains(values.kadastraleSubjecten);
    cy.get('.auto-suggest__dropdown-item').contains('ijf Ja');
  });

  it('1. Should show a message after search is performed', () => {
    cy.server();
    cy.defineSearchRoutes();

    cy.visit('/');

    cy.get('#auto-suggest__input').focus().type('bakker');
    cy.get('.qa-search-form-submit').click();

    cy.waitForSearch();
    cy.get(queries.warningPanel)
      .contains('Medewerkers met speciale bevoegdheden kunnen alle gegevens vinden');
    cy.get(queries.searchHeader).contains(values.kadastraleSubjecten).then((title) => {
      const count = getCountFromHeader(title.text());
      expect(count).to.be.below(100);
    });
  });

  it('2A. Should allow an employee to view a natural person but not the "Zakelijke rechten"', () => {
    cy.server();
    cy.route('/brk/subject/*').as('getResults');

    cy.visit(urls.natuurlijk);

    cy.wait('@getResults');
    cy.get(queries.warningPanel)
      .contains('Medewerkers met speciale bevoegdheden kunnen alle gegevens zien (ook zakelijke rechten).');
    cy.get(queries.headerTitle).contains('akker');
    cy.get(queries.natuurlijkPersoon).should('exist').and('be.visible');
  });

  it('2B. Should allow an employee to view a non-natural subject', () => {
    cy.server();
    cy.route('/brk/subject/*').as('getResults');

    cy.visit(urls.nietNatuurlijk);

    cy.wait('@getResults');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('er & T');
    cy.get(queries.nietNatuurlijkPersoon).should('exist').and('be.visible');
  });

  it('3. Should show an employee all info for a cadastral subject', () => {
    cy.server();
    cy.route('/brk/object/*').as('getResults');
    cy.route('/brk/object-expand/*').as('getObjectExpand');
    cy.route('/bag/nummeraanduiding/?kadastraalobject=*').as('getNummeraanduidingen');

    cy.visit(urls.business);

    cy.wait('@getResults');
    cy.wait('@getObjectExpand');
    cy.wait('@getNummeraanduidingen');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('08575');
    cy.get(queries.headerSubTitle).contains(values.aantekeningen);
  });

  it('4. Should show an employee all info for an address', () => {
    cy.server();
    cy.route('/bag/verblijfsobject/*').as('getVerblijfsobject');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/bag/pand/?verblijfsobjecten__id=*').as('getPanden');
    cy.route('/brk/object-expand/?verblijfsobjecten__id=*').as('getObjectExpand');
    cy.route('/monumenten/monumenten/*').as('getMonument');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getSitueringen');

    cy.visit(urls.address);

    cy.wait('@getVerblijfsobject');
    cy.wait('@getMonument');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getObjectExpand');
    cy.wait('@getPanden');
    cy.wait('@getSitueringen');
    cy.get(queries.headerTitle).contains('Nes 98');
    cy.get(queries.headerSubTitle).should(($values) => {
      expect($values).to.contain('Ligt in');
      expect($values).to.contain('Panoramabeeld');
      expect($values).to.contain('Verblijfsobject');
      expect($values).to.contain('Panden');
      expect($values).to.contain('Vestigingen');
      expect($values).to.contain('Kadastrale objecten');
      expect($values).to.contain('Monumenten');
      expect($values).to.contain(values.zakelijkeRechten);
    });
    cy.get(queries.warningPanel).should('not.exist');
  });

  it('5. Should show an employee all info for "Gemeentelijke beperking"', () => {
    cy.server();
    cy.route('/wkpb/beperking/*').as('getResults');
    cy.route('/wkpb/brondocument/?beperking=*').as('getBronDocument');
    cy.route('/brk/object/?beperkingen__id=*').as('getObject');

    cy.visit(urls.gemeentelijkeBeperking);

    cy.wait('@getResults');
    cy.wait('@getBronDocument');
    cy.wait('@getObject');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerTitle).contains('6142');
    cy.get(queries.keyValueList).contains(values.documentnaam);
  });

  it('6. Should allow an employee to view all map layers', () => {
    cy.visit(urls.map);
    cy.get(queries.mapLayersCategory).should(($values) => {
      expect($values).to.contain(values.economieEnHaven);
      expect($values).to.contain(values.geografie);
      expect($values).to.contain(values.bedrijvenInvloedsgebieden);
    });
    cy.get(queries.legendToggleItem).contains(values.vestigingenHoreca).click();
    cy.get(queries.legendNotification).should('not.exist');
    /** Leave out visible for elements that could be hidden by overscroll
    cy.get(queries.legendItem).contains(values.legendCafeValue).should('exist').and('be.visible');
    */
    cy.get(queries.legendItem).contains(values.legendCafeValue).should('exist');
  });

  it('7A. Should allow an employee to view "Vestigingen"', () => {
    cy.server();
    cy.route('/dataselectie/hr/*').as('getResults');

    cy.visit(urls.vestigingenTabel);

    cy.wait('@getResults');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.table).contains('Handelsnaam');
  });

  it('7B. Should show an employee all "Pand" information', () => {
    cy.server();
    cy.route('/bag/pand/*').as('getResults');
    cy.route('/monumenten/monumenten/?betreft_pand=*').as('getMonumenten');
    cy.route('/bag/nummeraanduiding/?pand=*').as('getNummeraanduidingen');
    cy.route('/handelsregister/vestiging/?pand=*').as('getVestigingen');

    cy.visit(urls.pand);

    cy.wait('@getResults');
    cy.wait('@getMonumenten');
    cy.wait('@getNummeraanduidingen');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('0001216');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.pandVestigingName);
  });

  it('7C. Should show an employee all information in a Geo search', () => {
    cy.server();
    cy.defineGeoSearchRoutes();
    cy.route('/bag/pand/*').as('getResults');
    cy.route('/monumenten/monumenten/?betreft_pand=*').as('getMonumenten');
    cy.route('/bag/nummeraanduiding/?pand=*').as('getNummeraanduidingen');
    cy.route('/handelsregister/vestiging/?pand=*').as('getVestigingen');
    cy.route('/panorama/thumbnail/?*').as('getPanorama');

    cy.visit(urls.geoSearch);

    cy.waitForGeoSearch();
    cy.wait('@getResults');
    cy.wait('@getMonumenten');
    cy.wait('@getNummeraanduidingen');
    cy.wait('@getVestigingen');
    cy.wait('@getPanorama');

    cy.get('h2.o-header__subtitle').contains('121393');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.headerSubTitle).contains(values.vestigingen);
    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.mapSearchResultsCategoryHeader).contains(values.vestigingen);
  });

  it('7D. Should show an employee all information in a "ligplaats" search', () => {
    cy.server();
    cy.route('/bag/ligplaats/*').as('getResults');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getMonument');
    cy.route('/handelsregister/vestiging/?nummeraanduiding=*').as('getVestigingen');

    cy.visit(urls.ligplaats);

    cy.wait('@getResults');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getMonument');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('Oosterdokskade 8');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.ligplaatsVestigingName);
  });

  it('7E. Should show an employee all information in "standplaats" search', () => {
    cy.server();
    cy.route('/bag/standplaats/*').as('getResults');
    cy.route('/bag/nummeraanduiding/*').as('getNummeraanduiding');
    cy.route('/monumenten/situeringen/?betreft_nummeraanduiding=*').as('getMonument');
    cy.route('/handelsregister/vestiging/?nummeraanduiding=*').as('getVestigingen');

    cy.visit(urls.standplaats);

    cy.wait('@getResults');
    cy.wait('@getNummeraanduiding');
    cy.wait('@getMonument');
    cy.wait('@getVestigingen');
    cy.get(queries.headerTitle).contains('oedele');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.listItem).contains(values.standplaatsVestigingName);
  });

  it('7F. Should allow an employee to view "vestiging"', () => {
    cy.server();
    cy.route('/handelsregister/vestiging/*').as('getVestiging');
    cy.route('/handelsregister/maatschappelijkeactiviteit/*').as('getMaatschappelijkeActiviteit');

    cy.visit(urls.vestiging);

    cy.wait('@getVestiging');
    cy.wait('@getMaatschappelijkeActiviteit');
    cy.get(queries.headerTitle).contains('uwe Loo');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.vestigingName);

    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.infoNotification).should('not.exist');
    cy.get(queries.mapDetailResultHeaderSubTitle).contains(values.vestigingName);
  });

  it('7G. Should allow an employee to view "maatschappelijke activiteit"', () => {
    cy.server();
    cy.route('/handelsregister/maatschappelijkeactiviteit/*').as('getMaatschappelijkeActiviteit');
    cy.route('/handelsregister/persoon/*').as('getPersoon');
    cy.route('/handelsregister/vestiging/?maatschappelijke_activiteit=*').as('getVestigingen');
    cy.route('/handelsregister/functievervulling/?heeft_aansprakelijke=*').as('getFunctievervullingen');

    cy.visit(urls.maatschappelijkeActiviteit);

    cy.wait('@getMaatschappelijkeActiviteit');
    cy.wait('@getPersoon');
    cy.wait('@getVestigingen');
    cy.wait('@getFunctievervullingen');
    cy.get(queries.headerTitle).contains(values.maatschappelijkeActiviteitName);
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.maatschappelijkeActiviteitVestigingName);
  });

  it('8A. Should show an employee all information in "monument"', () => {
    cy.server();
    cy.route('/monumenten/monumenten/*').as('getMonument');
    cy.route('/monumenten/complexen/*').as('getComplex');
    cy.route('/monumenten/situeringen/?monument_id=*').as('getSitueringen');

    cy.visit(urls.monument);

    cy.wait('@getMonument');
    cy.wait('@getComplex');
    cy.wait('@getSitueringen');
    cy.get(queries.headerTitle).contains('Museumtuin met hekwerken en bouwfragmenten');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.redengevendeOmschrijving);
    cy.get('button.toggle-fullscreen').click();
    cy.get(queries.mapDetailResultItem).contains(values.type);
  });

  it('8B. Should show an employee all information in "monument complex"', () => {
    cy.server();
    cy.route('/monumenten/complexen/*').as('getComplex');
    cy.route('/monumenten/monumenten/?complex_id=*').as('getMonumenten');

    cy.visit(urls.monumentComplex);

    cy.wait('@getComplex');
    cy.wait('@getMonumenten');
    cy.get(queries.headerTitle).contains('us Bo');
    cy.get(queries.warningPanel).should('not.exist');
    cy.get(queries.keyValueList).contains(values.beschrijving);
  });
});
<|endoftext|>


<commit_before>import { SET_CONFIG } from '../base/config';
import { MiddlewareRegistry } from '../base/redux';

import { SET_DYNAMIC_BRANDING_DATA } from './actionTypes';
import { fetchCustomBrandingData } from './actions.native';

MiddlewareRegistry.register(store => next => action => {
    switch (action.type) {
    case SET_CONFIG: {
        const result = next(action);

        store.dispatch(fetchCustomBrandingData());

        return result;
    }

    case SET_DYNAMIC_BRANDING_DATA: {
        const {
            avatarBackgrounds,
            backgroundColor,
            backgroundImageUrl
        } = action.value;

        action.value = {
            ...action.value,
            avatarBackgrounds,
            backgroundColor,
            backgroundImageUrl
        };
        break;
    }
    }

    return next(action);
});
<commit_msg>feat(rn,dynamic-branding) add support for didPageUrl and inviteDomain<commit_after>import { SET_CONFIG } from '../base/config';
import { MiddlewareRegistry } from '../base/redux';

import { SET_DYNAMIC_BRANDING_DATA } from './actionTypes';
import { fetchCustomBrandingData } from './actions.native';

MiddlewareRegistry.register(store => next => action => {
    switch (action.type) {
    case SET_CONFIG: {
        const result = next(action);

        store.dispatch(fetchCustomBrandingData());

        return result;
    }

    case SET_DYNAMIC_BRANDING_DATA: {
        const {
            avatarBackgrounds = [],
            backgroundColor,
            backgroundImageUrl,
            didPageUrl,
            inviteDomain
        } = action.value;

        action.value = {
            avatarBackgrounds,
            backgroundColor,
            backgroundImageUrl,
            didPageUrl,
            inviteDomain
        };
        break;
    }
    }

    return next(action);
});
<|endoftext|>


<commit_before>(function(define) {
    define([
        'jquery',
        'underscore',
        'backbone',
        'gettext',
        'js/discovery/views/course_card'
    ], function($, _, Backbone, gettext, CourseCardView) {
        'use strict';

        return Backbone.View.extend({

            el: 'div.courses',
            $window: $(window),
            $document: $(document),

            initialize: function() {
                this.$list = this.$el.find('.courses-listing');
                this.attachScrollHandler();
            },

            render: function() {
                this.$list.empty();
                this.renderItems();
                return this;
            },

            renderNext: function() {
                this.renderItems();
                this.isLoading = false;
            },

            renderItems: function() {
                /* eslint no-param-reassign: [2, { "props": true }] */
                var latest = this.model.latest();
                var items = latest.map(function(result) {
                    result.userPreferences = this.model.userPreferences;
                    var item = new CourseCardView({model: result});
                    return item.render().el;
                }, this);
                this.$list.append(items);
                /* eslint no-param-reassign: [2, { "props": false }] */
            },

            attachScrollHandler: function() {
                this.$window.on('scroll', _.throttle(this.scrollHandler.bind(this), 400));
            },

            scrollHandler: function() {
                if (this.isNearBottom() && !this.isLoading) {
                    this.trigger('next');
                    this.isLoading = true;
                }
            },

            isNearBottom: function() {
                var scrollBottom = this.$window.scrollTop() + this.$window.height();
                var threshold = this.$document.height() - 200;
                return scrollBottom >= threshold;
            }

        });
    });
}(define || RequireJS.define));
<commit_msg>PROD-2207<commit_after>(function(define) {
    define([
        'jquery',
        'underscore',
        'backbone',
        'gettext',
        'js/discovery/views/course_card',
        'edx-ui-toolkit/js/utils/html-utils'
    ], function($, _, Backbone, gettext, CourseCardView, HtmlUtils) {
        'use strict';

        return Backbone.View.extend({

            el: 'div.courses',
            $window: $(window),
            $document: $(document),

            initialize: function() {
                this.$list = this.$el.find('.courses-listing');
                this.attachScrollHandler();
            },

            render: function() {
                this.$list.empty();
                this.renderItems();
                return this;
            },

            renderNext: function() {
                this.renderItems();
                this.isLoading = false;
            },

            renderItems: function() {
                /* eslint no-param-reassign: [2, { "props": true }] */
                var latest = this.model.latest();
                var items = latest.map(function(result) {
                    result.userPreferences = this.model.userPreferences;
                    var item = new CourseCardView({model: result});
                    return item.render().el;
                }, this);
                HtmlUtils.append(
                    this.$list,
                    HtmlUtils.HTML(items)
                );
                /* eslint no-param-reassign: [2, { "props": false }] */
            },

            attachScrollHandler: function() {
                this.$window.on('scroll', _.throttle(this.scrollHandler.bind(this), 400));
            },

            scrollHandler: function() {
                if (this.isNearBottom() && !this.isLoading) {
                    this.trigger('next');
                    this.isLoading = true;
                }
            },

            isNearBottom: function() {
                var scrollBottom = this.$window.scrollTop() + this.$window.height();
                var threshold = this.$document.height() - 200;
                return scrollBottom >= threshold;
            }

        });
    });
}(define || RequireJS.define));
<|endoftext|>


<commit_before>import graph from 'ld-graph'
import urijs from 'urijs'

export function parsePersonResponse (personUri, personResponse, worksResponse) {
  let personGraph = worksResponse
    ? graph.parse(worksResponse, personResponse)
    : graph.parse(personResponse)
  let personResource = personGraph.byType('Person')[ 0 ]
  let person = {}

  populate(person, 'personTitle', personResource)
  populate(person, 'name', personResource)
  populate(person, 'birthYear', personResource)
  populate(person, 'deathYear', personResource)
  populateLabel(person, 'nationality', personResource)

  person.works = []
  personGraph.byType('Work').forEach(workResource => {
    let work = {}
    populateLabelsByLanguage(work, 'mainTitle', workResource)
    populateLabelsByLanguage(work, 'partTitle', workResource)
    work.relativeUri = urijs(workResource.id).path()
    person.works.push(work)
  })

  person.uri = personResource.id

  return person
}

export function parseWorkResponse (workUri, workResponse, itemsResponse) {
  let workGraph = itemsResponse
    ? graph.parse(workResponse, itemsResponse)
    : graph.parse(workResponse)

  let workResource = workGraph.byType('Work')[ 0 ]
  let work = {}

  // TODO: availCount
  populateLabelsByLanguage(work, 'mainTitle', workResource)
  populateLabelsByLanguage(work, 'partTitle', workResource)
  populate(work, 'publicationYear', workResource)

  work.creators = []
  workResource.outAll('creator').forEach(creatorResource => {
    let creator = {}
    populate(creator, 'name', creatorResource)
    creator.relativeUri = urijs(creatorResource.id).path()
    work.creators.push(creator)
  })

  work.publications = []
  work.items = []
  workGraph.byType('Publication').forEach(publicationResource => {
    let publication = {}
    populate(publication, 'mainTitle', publicationResource)
    populate(publication, 'partTitle', publicationResource)
    populate(publication, 'publicationYear', publicationResource)
    populateLabel(publication, 'language', publicationResource)
    populateLabel(publication, 'format', publicationResource)
    publication.id = publicationResource.id
    publication.itemsCount = 0
    publicationResource.inAll('editionOf').map(item => {
      publication.itemsCount++
      let item = {}
      populate(item, 'location', item)
      populate(item, 'status', item)
      populate(item, 'barcode', item)
      populate(item, 'shelfmark', item)
      item.title = publication.mainTitle
      if (publication.partTitle) {
        item.title += ' — ' + publication.partTitle
      }
      item.language = publication.language
      item.format = publication.format
      work.items.push(item)
    })
    work.publications.push(publication)
  })

  work.uri = workResource.id

  return work
}

function populate (target, field, sourceResource) {
  target[ field ] = ''
  if (sourceResource.has(field)) {
    target[ field ] = sourceResource.get(field).value
  }
}

function populateLabel (target, field, sourceResource) {
  target[ field ] = ''
  if (sourceResource.hasOut(field) && sourceResource.out(field).has('label')) {
    target[ field ] = sourceResource.out(field).get('label').value
  }
}

function populateLabelsByLanguage (target, field, sourceResource) {
  target[ field ] = {}
  sourceResource.getAll(field).map(literal => {
    target[ field ][ literal.lang ] = literal.value
  })
}
<commit_msg>Patron-client: Fix duplicate declaration in graphparse<commit_after>import graph from 'ld-graph'
import urijs from 'urijs'

export function parsePersonResponse (personUri, personResponse, worksResponse) {
  let personGraph = worksResponse
    ? graph.parse(worksResponse, personResponse)
    : graph.parse(personResponse)
  let personResource = personGraph.byType('Person')[ 0 ]
  let person = {}

  populate(person, 'personTitle', personResource)
  populate(person, 'name', personResource)
  populate(person, 'birthYear', personResource)
  populate(person, 'deathYear', personResource)
  populateLabel(person, 'nationality', personResource)

  person.works = []
  personGraph.byType('Work').forEach(workResource => {
    let work = {}
    populateLabelsByLanguage(work, 'mainTitle', workResource)
    populateLabelsByLanguage(work, 'partTitle', workResource)
    work.relativeUri = urijs(workResource.id).path()
    person.works.push(work)
  })

  person.uri = personResource.id

  return person
}

export function parseWorkResponse (workUri, workResponse, itemsResponse) {
  let workGraph = itemsResponse
    ? graph.parse(workResponse, itemsResponse)
    : graph.parse(workResponse)

  let workResource = workGraph.byType('Work')[ 0 ]
  let work = {}

  // TODO: availCount
  populateLabelsByLanguage(work, 'mainTitle', workResource)
  populateLabelsByLanguage(work, 'partTitle', workResource)
  populate(work, 'publicationYear', workResource)

  work.creators = []
  workResource.outAll('creator').forEach(creatorResource => {
    let creator = {}
    populate(creator, 'name', creatorResource)
    creator.relativeUri = urijs(creatorResource.id).path()
    work.creators.push(creator)
  })

  work.publications = []
  work.items = []
  workGraph.byType('Publication').forEach(publicationResource => {
    let publication = {}
    populate(publication, 'mainTitle', publicationResource)
    populate(publication, 'partTitle', publicationResource)
    populate(publication, 'publicationYear', publicationResource)
    populateLabel(publication, 'language', publicationResource)
    populateLabel(publication, 'format', publicationResource)
    publication.id = publicationResource.id
    publication.itemsCount = 0
    publicationResource.inAll('editionOf').map(itemResource => {
      publication.itemsCount++
      let item = {}
      populate(item, 'location', itemResource)
      populate(item, 'status', itemResource)
      populate(item, 'barcode', itemResource)
      populate(item, 'shelfmark', itemResource)
      item.title = publication.mainTitle
      if (publication.partTitle) {
        item.title += ' — ' + publication.partTitle
      }
      item.language = publication.language
      item.format = publication.format
      work.items.push(item)
    })
    work.publications.push(publication)
  })

  work.uri = workResource.id

  return work
}

function populate (target, field, sourceResource) {
  target[ field ] = ''
  if (sourceResource.has(field)) {
    target[ field ] = sourceResource.get(field).value
  }
}

function populateLabel (target, field, sourceResource) {
  target[ field ] = ''
  if (sourceResource.hasOut(field) && sourceResource.out(field).has('label')) {
    target[ field ] = sourceResource.out(field).get('label').value
  }
}

function populateLabelsByLanguage (target, field, sourceResource) {
  target[ field ] = {}
  sourceResource.getAll(field).map(literal => {
    target[ field ][ literal.lang ] = literal.value
  })
}
<|endoftext|>


<commit_before>
var moonlightSettings = {
    'map' : {
	'tilesets': [
	    { 'name': 'Macks-tilea2',
	      'path': 'gfx/Macks-tilea2.png'
	    },
	    { 'name': 'Macks-tilea3',
	      'path': 'gfx/Macks-tilea3.png'
	    }
	],
	'collisionRange': [385, 512],
	'path': 'gfx/junkmap.json'
    },
    'images': [
	{
	    'name': 'simplelight',
	    'path': 'gfx/lights/light-white-256px.png'
	}
    ],
    'spritesheets': [
	{
	    'name': 'player',
	    'path': 'gfx/sprites/sprite-player.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-1',
	    'path': 'gfx/sprites/sprite-townsfolk-male-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-2',
	    'path': 'gfx/sprites/sprite-townsfolk-male-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-3',
	    'path': 'gfx/sprites/sprite-townsfolk-male-3.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-4',
	    'path': 'gfx/sprites/sprite-townsfolk-male-4.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-1',
	    'path': 'gfx/sprites/sprite-townsfolk-female-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-2',
	    'path': 'gfx/sprites/sprite-townsfolk-female-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-3',
	    'path': 'gfx/sprites/sprite-townsfolk-female-3.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-4',
	    'path': 'gfx/sprites/sprite-townsfolk-female-4.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-guard-1',
	    'path': 'gfx/sprites/sprite-townsfolk-guard-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-guard-2',
	    'path': 'gfx/sprites/sprite-townsfolk-guard-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	}
    ],
    'animations': {
	'bipedwalkdown': {
	    'frames': [1, 2, 0],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkleft': {
	    'frames': [4, 5, 3],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkright': {
	    'frames': [7, 8, 6],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkup': {
	    'frames': [10, 11, 9],
	    'speed': 4,
	    'loop': true
	},
	'bipedrundown': {
	    'frames': [1, 2, 0],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunleft': {
	    'frames': [4, 5, 3],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunright': {
	    'frames': [7, 8, 6],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunup': {
	    'frames': [10, 11, 9],
	    'speed': 12,
	    'loop': true
	}
    }
};

// Create torch objects
// Torch constructor
var Torch = function(game, x, y) {
    Phaser.Sprite.call(this, game, x, y, null);

    // Set the pivot point for this sprite to the center
    this.anchor.setTo(0.5, 0.5);
};

// Torches are a type of Phaser.Sprite
Torch.prototype = Object.create(Phaser.Sprite.prototype);
Torch.prototype.constructor = Torch;

var GameState = function(game) {
}

GameState.prototype.addAnimation = function(obj, anim)
{
    a = moonlightSettings['animations'][anim]
    obj.animations.add(anim, a['frames'], a['speed'], a['loop'])
}

GameState.prototype.preload = function()
{
    for (var k in moonlightSettings['map']['tilesets']) {
	var ts = moonlightSettings['map']['tilesets'][k];
	this.load.image(ts['name'], ts['path']);
    }
    for (var k in moonlightSettings['images']) {
	var i = moonlightSettings['images'][k];
	this.load.image(i['name'], i['path']);
    }
    for (var k in moonlightSettings['spritesheets']) {
	var s = moonlightSettings['spritesheets'][k]
	game.load.spritesheet(s['name'], s['path'], s['width'], s['height'], s['frames'])
    }
    this.load.tilemap('map',
		      moonlightSettings['map']['path'],
		      null,
		      Phaser.Tilemap.TILED_JSON);
}

GameState.prototype.create = function()
{
    map = this.add.tilemap('map');
    for (var k in moonlightSettings['map']['tilesets']) {
	var ts = moonlightSettings['map']['tilesets'][k];
	map.addTilesetImage(ts['name']);
    }
    layer = map.createLayer('Tile Layer 1');
    layer.resizeWorld();
    map.setCollisionBetween(
	moonlightSettings['map']['collisionRange'][0],
	moonlightSettings['map']['collisionRange'][1]
    );

    player = this.add.sprite(10, 10, 'player');
    this.physics.arcade.enable(player);
    player.body.collideWorldBounds = true;

    this.addAnimation(player, 'bipedwalkleft');
    this.addAnimation(player, 'bipedwalkright');
    this.addAnimation(player, 'bipedwalkup');
    this.addAnimation(player, 'bipedwalkdown');
    this.addAnimation(player, 'bipedrunleft');
    this.addAnimation(player, 'bipedrunright');
    this.addAnimation(player, 'bipedrunup');
    this.addAnimation(player, 'bipedrundown');

    this.camera.follow(player, Phaser.Camera.FOLLOW_TOPDOWN);
    controls = game.input.keyboard.createCursorKeys();

    this.game.time.advancedTiming = true;
    this.fpsText = this.game.add.text(
        20, 20, '', { font: '16px Arial', fill: '#ffffff' }
    );
    this.fpsText.fixedToCamera = true;

    this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height);

    // Create an object that will use the bitmap as a texture
    this.shadowSprite = game.add.image(0, 0, this.shadowTexture);

    // Set the blend mode to MULTIPLY. This will darken the colors of
    // everything below this sprite.
    this.shadowSprite.blendMode = Phaser.blendModes.MULTIPLY;

    // Create the lights
    this.lights = game.add.group();
    for (i = 0; i < 20 ; i++ ) {
	this.lights.add(
	    new Torch(game,
		  game.rnd.integerInRange(0, game.width),
		  game.rnd.integerInRange(0, game.height)
		 )
	);
    }
    this.movingLight = new Torch(game, game.width/2, game.height/2);
    this.lights.add(this.movingLight);
}

GameState.prototype.updateShadowTexture = function() {
    // This function updates the shadow texture (this.shadowTexture).
    // First, it fills the entire texture with a dark shadow color.
    // Then it draws a white circle centered on the pointer position.
    // Because the texture is drawn to the screen using the MULTIPLY
    // blend mode, the dark areas of the texture make all of the colors
    // underneath it darker, while the white area is unaffected.

    // Draw shadow
    this.shadowTexture.context.fillStyle = 'rgb(50, 50, 50)';
    this.shadowTexture.context.fillRect(game.camera.x - 50,
					game.camera.y - 50,
					game.width + 50,
					game.height + 50);

    // Iterate through each of the lights and draw the glow
    this.lights.forEach(function(light) {
        // Randomly change the radius each frame
        var radius = 64 + game.rnd.integerInRange(1,10);

        // Draw circle of light with a soft edge
        var gradient =
            this.shadowTexture.context.createRadialGradient(
                light.x + 16, light.y + 16, 64 * 0.25,
                light.x + 16, light.y + 16, radius);
        gradient.addColorStop(0, 'rgba(255, 255, 255, 1.0)');
        gradient.addColorStop(1, 'rgba(255, 255, 255, 0.0)');

        this.shadowTexture.context.beginPath();
        this.shadowTexture.context.fillStyle = gradient;
        this.shadowTexture.context.arc(light.x + 16, light.y + 16, radius, 0, Math.PI*2);
        this.shadowTexture.context.fill();
    }, this);

    // This just tells the engine it should update the texture cache
    this.shadowTexture.dirty = true;
};

GameState.prototype.setSpriteMovement = function(spr, running, dir)
{
    var x = 0;
    var y = 0;

    if ( running ) {
	x = 200;
	y = 200;
	spr.animations.play("bipedrun" + dir);
    } else {
	x = 75;
	y = 75;
	spr.animations.play("bipedwalk" + dir);
    }

    if ( dir == "left" ) {
	spr.body.velocity.x = -x;
	spr.body.velocity.y = 0;
    } else if ( dir == "right" ) {
	spr.body.velocity.x = x;
	spr.body.velocity.y = 0;
    } else if ( dir == "up" ) {
	spr.body.velocity.x = 0;
	spr.body.velocity.y = -y;
    } else if ( dir == "down" ) {
	spr.body.velocity.x = 0;
	spr.body.velocity.y = y;
    }
}

GameState.prototype.check_input = function()
{

    player.body.velocity.x = 0;
    player.body.velocity.y = 0;
    velocityMod = 0;

    runningSpeed = {true: 150, false: 75}

    if ( controls.up.isDown) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'up');
    } else if ( controls.down.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'down');
    } else if ( controls.left.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'left');
    } else if ( controls.right.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'right');
    } else {
	player.animations.stop(null, true);
    }
}

GameState.prototype.update = function()
{
    if (game.time.fps !== 0) {
        this.fpsText.setText(game.time.fps + ' FPS');
    }

    this.check_input();
    this.physics.arcade.collide(player, layer);
    this.movingLight.x = player.x;
    this.movingLight.y = player.y;
    this.updateShadowTexture();
}

var game = new Phaser.Game(640, 480, Phaser.AUTO, '');
game.state.add('game', GameState, true);
<commit_msg>Parameterize torches<commit_after>
var moonlightSettings = {
    'map' : {
	'tilesets': [
	    { 'name': 'Macks-tilea2',
	      'path': 'gfx/Macks-tilea2.png'
	    },
	    { 'name': 'Macks-tilea3',
	      'path': 'gfx/Macks-tilea3.png'
	    }
	],
	'collisionRange': [385, 512],
	'path': 'gfx/junkmap.json'
    },
    'images': [
	{
	    'name': 'simplelight',
	    'path': 'gfx/lights/light-white-256px.png'
	}
    ],
    'spritesheets': [
	{
	    'name': 'player',
	    'path': 'gfx/sprites/sprite-player.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-1',
	    'path': 'gfx/sprites/sprite-townsfolk-male-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-2',
	    'path': 'gfx/sprites/sprite-townsfolk-male-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-3',
	    'path': 'gfx/sprites/sprite-townsfolk-male-3.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-male-4',
	    'path': 'gfx/sprites/sprite-townsfolk-male-4.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-1',
	    'path': 'gfx/sprites/sprite-townsfolk-female-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-2',
	    'path': 'gfx/sprites/sprite-townsfolk-female-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-3',
	    'path': 'gfx/sprites/sprite-townsfolk-female-3.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-female-4',
	    'path': 'gfx/sprites/sprite-townsfolk-female-4.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-guard-1',
	    'path': 'gfx/sprites/sprite-townsfolk-guard-1.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	},
	{
	    'name': 'townsfolk-guard-2',
	    'path': 'gfx/sprites/sprite-townsfolk-guard-2.png',
	    'width': 32,
	    'height': 32,
	    'frames': 12
	}
    ],
    'animations': {
	'bipedwalkdown': {
	    'frames': [1, 2, 0],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkleft': {
	    'frames': [4, 5, 3],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkright': {
	    'frames': [7, 8, 6],
	    'speed': 4,
	    'loop': true
	},
	'bipedwalkup': {
	    'frames': [10, 11, 9],
	    'speed': 4,
	    'loop': true
	},
	'bipedrundown': {
	    'frames': [1, 2, 0],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunleft': {
	    'frames': [4, 5, 3],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunright': {
	    'frames': [7, 8, 6],
	    'speed': 12,
	    'loop': true
	},
	'bipedrunup': {
	    'frames': [10, 11, 9],
	    'speed': 12,
	    'loop': true
	}
    }
};

// Create torch objects
// Torch constructor
var Torch = function(game, x, y, radius, fade, color) {
    color = typeof color !== undefined ? color : [255, 255, 255];
    fade = typeof fade !== undefined ? fade : 0.25;
    radius = typeof radius !== undefined ? radius : 64;
    Phaser.Sprite.call(this, game, x, y, null);

    // Set the pivot point for this sprite to the center
    this.anchor.setTo(0.5, 0.5);
    this.color = color
    this.fade = radius * fade
};

// Torches are a type of Phaser.Sprite
Torch.prototype = Object.create(Phaser.Sprite.prototype);
Torch.prototype.constructor = Torch;

var GameState = function(game) {
}

GameState.prototype.addAnimation = function(obj, anim)
{
    a = moonlightSettings['animations'][anim]
    obj.animations.add(anim, a['frames'], a['speed'], a['loop'])
}

GameState.prototype.preload = function()
{
    for (var k in moonlightSettings['map']['tilesets']) {
	var ts = moonlightSettings['map']['tilesets'][k];
	this.load.image(ts['name'], ts['path']);
    }
    for (var k in moonlightSettings['images']) {
	var i = moonlightSettings['images'][k];
	this.load.image(i['name'], i['path']);
    }
    for (var k in moonlightSettings['spritesheets']) {
	var s = moonlightSettings['spritesheets'][k]
	game.load.spritesheet(s['name'], s['path'], s['width'], s['height'], s['frames'])
    }
    this.load.tilemap('map',
		      moonlightSettings['map']['path'],
		      null,
		      Phaser.Tilemap.TILED_JSON);
}

GameState.prototype.create = function()
{
    map = this.add.tilemap('map');
    for (var k in moonlightSettings['map']['tilesets']) {
	var ts = moonlightSettings['map']['tilesets'][k];
	map.addTilesetImage(ts['name']);
    }
    layer = map.createLayer('Tile Layer 1');
    layer.resizeWorld();
    map.setCollisionBetween(
	moonlightSettings['map']['collisionRange'][0],
	moonlightSettings['map']['collisionRange'][1]
    );

    player = this.add.sprite(10, 10, 'player');
    this.physics.arcade.enable(player);
    player.body.collideWorldBounds = true;

    this.addAnimation(player, 'bipedwalkleft');
    this.addAnimation(player, 'bipedwalkright');
    this.addAnimation(player, 'bipedwalkup');
    this.addAnimation(player, 'bipedwalkdown');
    this.addAnimation(player, 'bipedrunleft');
    this.addAnimation(player, 'bipedrunright');
    this.addAnimation(player, 'bipedrunup');
    this.addAnimation(player, 'bipedrundown');

    this.camera.follow(player, Phaser.Camera.FOLLOW_TOPDOWN);
    controls = game.input.keyboard.createCursorKeys();

    this.game.time.advancedTiming = true;
    this.fpsText = this.game.add.text(
        20, 20, '', { font: '16px Arial', fill: '#ffffff' }
    );
    this.fpsText.fixedToCamera = true;

    this.shadowTexture = game.add.bitmapData(game.world.width, game.world.height);

    // Create an object that will use the bitmap as a texture
    this.shadowSprite = game.add.image(0, 0, this.shadowTexture);

    // Set the blend mode to MULTIPLY. This will darken the colors of
    // everything below this sprite.
    this.shadowSprite.blendMode = Phaser.blendModes.MULTIPLY;

    // Create the lights
    this.lights = game.add.group();
    for (i = 0; i < 20 ; i++ ) {
	this.lights.add(
	    new Torch(game,
		  game.rnd.integerInRange(0, game.width),
		  game.rnd.integerInRange(0, game.height)
		 )
	);
    }
    this.movingLight = new Torch(game, game.width/2, game.height/2);
    this.lights.add(this.movingLight);
}

GameState.prototype.updateShadowTexture = function() {
    // This function updates the shadow texture (this.shadowTexture).
    // First, it fills the entire texture with a dark shadow color.
    // Then it draws a white circle centered on the pointer position.
    // Because the texture is drawn to the screen using the MULTIPLY
    // blend mode, the dark areas of the texture make all of the colors
    // underneath it darker, while the white area is unaffected.

    // Draw shadow
    this.shadowTexture.context.fillStyle = 'rgb(50, 50, 50)';
    this.shadowTexture.context.fillRect(game.camera.x - 50,
					game.camera.y - 50,
					game.width + 50,
					game.height + 50);

    // Iterate through each of the lights and draw the glow
    this.lights.forEach(function(light) {
        // Randomly change the radius each frame
        var radius = light.radius + game.rnd.integerInRange(1,10);

        // Draw circle of light with a soft edge
        var gradient =
            this.shadowTexture.context.createRadialGradient(
                light.x + 16, light.y + 16, light.fade,
                light.x + 16, light.y + 16, radius);
        gradient.addColorStop(0, 'rgba(' + light.color[0] + ',' + light.color[1] + ',' + light.color[2] +', 1.0)');
        gradient.addColorStop(1, 'rgba(' + light.color[0] + ',' + light.color[1] + ',' + light.color[2] +', 0.0)');

        this.shadowTexture.context.beginPath();
        this.shadowTexture.context.fillStyle = gradient;
        this.shadowTexture.context.arc(light.x + 16, light.y + 16, radius, 0, Math.PI*2);
        this.shadowTexture.context.fill();
    }, this);

    // This just tells the engine it should update the texture cache
    this.shadowTexture.dirty = true;
};

GameState.prototype.setSpriteMovement = function(spr, running, dir)
{
    var x = 0;
    var y = 0;

    if ( running ) {
	x = 200;
	y = 200;
	spr.animations.play("bipedrun" + dir);
    } else {
	x = 75;
	y = 75;
	spr.animations.play("bipedwalk" + dir);
    }

    if ( dir == "left" ) {
	spr.body.velocity.x = -x;
	spr.body.velocity.y = 0;
    } else if ( dir == "right" ) {
	spr.body.velocity.x = x;
	spr.body.velocity.y = 0;
    } else if ( dir == "up" ) {
	spr.body.velocity.x = 0;
	spr.body.velocity.y = -y;
    } else if ( dir == "down" ) {
	spr.body.velocity.x = 0;
	spr.body.velocity.y = y;
    }
}

GameState.prototype.check_input = function()
{

    player.body.velocity.x = 0;
    player.body.velocity.y = 0;
    velocityMod = 0;

    runningSpeed = {true: 150, false: 75}

    if ( controls.up.isDown) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'up');
    } else if ( controls.down.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'down');
    } else if ( controls.left.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'left');
    } else if ( controls.right.isDown ) {
	this.setSpriteMovement(player, controls.up.shiftKey, 'right');
    } else {
	player.animations.stop(null, true);
    }
}

GameState.prototype.update = function()
{
    if (game.time.fps !== 0) {
        this.fpsText.setText(game.time.fps + ' FPS');
    }

    this.check_input();
    this.physics.arcade.collide(player, layer);
    this.movingLight.x = player.x;
    this.movingLight.y = player.y;
    this.updateShadowTexture();
}

var game = new Phaser.Game(640, 480, Phaser.AUTO, '');
game.state.add('game', GameState, true);
<|endoftext|>


<commit_before>// Hash: 01ae4880b9b4296907d680e9b909713c36c42491
// Link: https://github.com/gitpoint/git-point/pull/260

export const es = {
  auth: {
    login: {
      connectingToGitHub: 'Conectando a GitHub...',
      preparingGitPoint: 'Preparando GitPoint...',
      cancel: 'CANCELAR',
      welcomeTitle: 'Bienvenido a GitPoint',
      welcomeMessage:
        'El cliente GitHub con más funcionalidades, 100% gratuito',
      notificationsTitle: 'Gestiona notificaciones',
      notificationsMessage: 'Revisa y gestiona tus notificaciones pendientes',
      reposTitle: 'Repositorios y Usuarios',
      reposMessage:
        'Obtén fácilmente información de repositorios, usuarios y organizaciones',
      issuesTitle: 'Issues y Pull Requests',
      issuesMessage:
        'Comunícate en conversaciones, haz merges de pull requests y más',
      signInButton: 'IDENTIFÍCATE',
    },
    welcome: {
      welcomeTitle: 'Bienvenido a GitPoint',
    },
    events: {
      welcomeMessage:
        '¡Bienvenido! Este es tu hilo de noticias - te ayudará a mantenerte informado sobre la actividad de los respositorios y los usuarios que sigues.',
      commitCommentEvent: 'commit comentado',
      createEvent: '{{object}} creado',
      deleteEvent: '{{object}} eliminado',
      issueCommentEvent: '{{action}} en {{type}}',
      issueEditedEvent: '{{action}} su comentario en {{type}}',
      issueRemovedEvent: '{{action}} su comentario en {{type}}',
      issuesEvent: '{{action}} issue',
      publicEvent: {
        action: 'hacer',
        connector: 'público',
      },
      pullRequestEvent: '{{action}} pull request',
      pullRequestReviewEvent: '{{action}} revisiones de pull request',
      pullRequestReviewCommentEvent: '{{action}} en pull request',
      pullRequestReviewEditedEvent:
        '{{action}} su comentario en el pull request',
      pullRequestReviewDeletedEvent:
        '{{action}} su comentario en el pull request',
      releaseEvent: '{{action}} lanzamiento',
      atConnector: 'at',
      toConnector: 'at',
      types: {
        pullRequest: 'pull request',
        issue: 'issue',
      },
      objects: {
        repository: 'repositorio',
        branch: 'rama',
        tag: 'etiqueta',
      },
      actions: {
        added: 'añadió',
        created: 'creó',
        edited: 'editó',
        deleted: 'eliminó',
        assigned: 'asignó',
        unassigned: 'desasignó',
        labeled: 'etiquetó',
        unlabeled: 'desetiquetó',
        opened: 'abrió',
        milestoned: 'marcó hito como alcanzado',
        demilestoned: 'desmarcó hito como alcanzado',
        closed: 'cerró',
        reopened: 'reabrió',
        review_requested: 'solicitó revisión',
        review_request_removed: 'eliminó la petición de revisión',
        submitted: 'presentó',
        dismissed: 'rechazó',
        published: 'publicó',
        publicized: 'hizo público',
        privatized: 'hizo privado',
        starred: 'marcó como favorito',
        pushedTo: 'enviado a',
        forked: 'hizo fork de',
        commented: 'comentó',
        removed: 'eliminó',
      },
    },
    profile: {
      orgsRequestApprovalTop: '¿No ves todas tus organizaciones?',
      orgsRequestApprovalBottom:
        'Quizá tengas que solicitar aprobación para verlas.',
      codePushCheck: 'Comprobar actualizaciones',
      codePushChecking: 'Comprobando actualizaciones...',
      codePushUpdated: 'Aplicación actualizada',
      codePushAvailable: '¡Actualizaciones disponibles!',
      codePushNotApplicable: 'No aplicable en modo de depuración',
    },
    userOptions: {
      donate: 'Realizar donación',
      title: 'Opciones',
      language: 'Idioma',
      privacyPolicy: 'Política de privacidad',
      signOut: 'Cerrar sesión',
    },
    privacyPolicy: {
      title: 'Política de privacidad',
      effectiveDate: 'Última actualización: 15 de Julio, 2017',
      introduction:
        'Estamos contentos de que hayas decidido usar GitPoint. Esta política de privacidad está aquí para informarte sobre lo que hacemos - y lo que no - con tus datos de usuario.',
      userDataTitle: 'DATOS DE USUARIO',
      userData1:
        'No hacemos nada con tu información de GitHub. Tras la autenticación, el token OAuth del usuario se guarda directamente en el almacenamiento de su dispositivo. No es posible para nosotros recuperar esa información. Nunca vemos ni almacenamos el token de acceso de un usuario.',
      userData2:
        'Esto significa que de ninguna manera miramos, usamos o compartimos datos de GitHub de los usuarios. Si la información privada se volviera visible en algún momento, no la registraremos ni leeremos. Si se guardara accidentalmente, la borraremos inmediatamente usando métodos seguros de borrado. Sin embargo, hemos configurado la autenticación para que esto nunca suceda.',
      analyticsInfoTitle: 'INFORMACIÓN DE ANALYTICS',
      analyticsInfo1:
        'Actualmente usamos Google Analytics y iTunes App Analytics para ayudarnos a medir el tráfico y las tendencias de uso de GitPoint. Estas herramientas recogen información mandada por tu dispositivo, invluyendo la versión del dispositivo y la plataforma y la zona geográfica. Esta información no puede ser usada para identificar ningún usuario individual y no se extrae ninguna información personal.',
      analyticsInfo2:
        'Si incluimos otras plataformas de terceros para analizar rastros, archivos de error o otra información analítica, nos aseguraremos de que los datos del usuario permanezcan anonimizados y encriptados.',
      openSourceTitle: 'CÓDIGO ABIERTO',
      openSource1:
        'GitPoint es de código abierto y el histórico de contribuciones a la plataforma será siempre visible al público.',
      openSource2:
        'Con cada contribución a la aplicación, se realiza una revisión de código para evitar que nadie incluya código malicioso de cualquier tipo.',
      contactTitle: 'CONTACTO',
      contact1:
        'Gracias por leer nuestra política de privacidad. Esperamos que disfrutes usando GitPoint tanto como nosotros disfutamos desarrollándolo.',
      contact2:
        'Si tienes preguntas de cualquier tipo acerca de esta política de privacidad o de GitPoint en general, por favor crea una incidencia en el',
      contactLink: 'repositorio de GitPoint',
    },
  },
  notifications: {
    main: {
      unread: 'no leído',
      participating: 'participando',
      all: 'todas',
      unreadButton: 'Marcar como no leído',
      participatingButton: 'Participando',
      allButton: 'Todas',
      retrievingMessage: 'Cargando notificaciones',
      noneMessage: 'No tienes ninguna notificación de este tipo',
      markAllAsRead: 'Marcar todo como leído',
    },
  },
  search: {
    main: {
      repositoryButton: 'Repositorios',
      userButton: 'Usuarios',
      searchingMessage: 'Buscando {{query}}',
      searchMessage: 'Buscando cualquier {{type}}',
      repository: 'repositorio',
      user: 'usuario',
      noUsersFound: 'No se encontraron usuarios :(',
      noRepositoriesFound: 'No se encontraron repositorios :(',
    },
  },
  user: {
    profile: {
      userActions: 'Acciones de usuario',
      unfollow: 'Dejar de seguir',
      follow: 'Seguir',
    },
    repositoryList: {
      title: 'Repositorios',
    },
    starredRepositoryList: {
      title: 'Stars',
      text: 'Stars',
    },
    followers: {
      title: 'Seguidores',
      text: 'Seguidores',
      followsYou: 'Te sigue',
    },
    following: {
      title: 'Siguiendo',
      text: 'Siguiendo',
      followingYou: 'Siguiendo',
    },
  },
  repository: {
    main: {
      shareRepositoryTitle: 'Compartir {{repoName}}',
      shareRepositoryMessage: 'Revisa {{repoName}} en GitHub. {{repoUrl}}',
      repoActions: 'Acciones del repositorio',
      forkAction: 'Hacer fork',
      starAction: 'Marcar favorito',
      unstarAction: 'Desmarcar favorito',
      shareAction: 'Compartir',
      unwatchAction: 'Dejar de seguir',
      watchAction: 'Seguir',
      ownerTitle: 'PROPIETARIO',
      contributorsTitle: 'CONTRIBUIDORES',
      noContributorsMessage: 'No se encontraron contribuidores',
      sourceTitle: 'CÓDIGO',
      readMe: 'LEEME',
      viewSource: 'Ver código',
      issuesTitle: 'ISSUES',
      noIssuesMessage: 'No hay issues',
      noOpenIssuesMessage: 'No hay issues abiertas',
      viewAllButton: 'Ver todo',
      newIssueButton: 'Nueva issue',
      pullRequestTitle: 'PULL REQUESTS',
      noPullRequestsMessage: 'No pull requests',
      noOpenPullRequestsMessage: 'No open pull requests',
      starsTitle: 'Stars',
      forksTitle: 'Forks',
      forkedFromMessage: 'forked from',
      starred: 'Favoritos',
      watching: 'Siguiendo',
      watchers: 'Seguidores',
    },
    codeList: {
      title: 'Código',
    },
    issueList: {
      title: 'Issues',
      openButton: 'Abiertas',
      closedButton: 'Cerradas',
      searchingMessage: 'Buscando {{query}}',
      noOpenIssues: '¡No se encontraron issues abiertas!',
      noClosedIssues: '¡No se encontraron issues cerradas!',
    },
    pullList: {
      title: 'Pull Requests',
      openButton: 'Abiertos',
      closedButton: 'Cerrados',
      searchingMessage: 'Buscando {{query}}',
      noOpenPulls: '¡No se encontraron pull requests abiertos!',
      noClosedPulls: '¡No se encontraron pull requests cerrados!',
    },
    pullDiff: {
      title: 'Diferencias',
      numFilesChanged: '{{numFilesChanged}} archivos',
      new: 'NUEVOS',
      deleted: 'ELIMINADOS',
      fileRenamed: 'Archivo renombrado sin cambios',
    },
    readMe: {
      readMeActions: 'Acciones README',
      noReadMeFound: 'No se ha encontrado README.md',
    },
  },
  organization: {
    main: {
      membersTitle: 'MIEMBROS',
      descriptionTitle: 'DESCRIPCIÓN',
    },
    organizationActions: 'Acciones de la organización',
  },
  issue: {
    settings: {
      title: 'Configuración',
      pullRequestType: 'Pull Request',
      issueType: 'Issues',
      applyLabelButton: 'Aplicar etiqueta',
      noneMessage: 'Ninguno todavía',
      labelsTitle: 'ETIQUETAS',
      assignYourselfButton: 'Asígnate a ti mismo',
      assigneesTitle: 'ASIGNADOS',
      actionsTitle: 'ACCIONES',
      unlockIssue: 'Desbloquear {{issueType}}',
      lockIssue: 'Bloquear {{issueType}}',
      closeIssue: 'Cerrar {{issueType}}',
      reopenIssue: 'Reabrir {{issueType}}',
      areYouSurePrompt: '¿Estás seguro?',
      applyLabelTitle: 'Asignar etiqueta a esta issue',
    },
    comment: {
      commentActions: 'Acciones de comentarios',
      editCommentTitle: 'Editar comentario',
      editAction: 'Editar',
      deleteAction: 'Eliminar',
    },
    main: {
      assignees: 'Assignees',
      mergeButton: 'Merge Pull Request',
      noDescription: 'No se ha proporcionado ninguna descripción.',
      lockedCommentInput: 'Bloqueado, pero todavía puedes comentar...',
      commentInput: 'Añade un comentario...',
      lockedIssue: 'La issue está bloqueada',
      states: {
        open: 'Abierta',
        closed: 'Cerrada',
        merged: 'Merged',
      },
      screenTitles: {
        issue: 'Issue',
        pullRequest: 'Pull Request',
      },
      openIssueSubTitle: '#{{number}} abiertas hace {{time}} por {{user}}',
      closedIssueSubTitle: '#{{number}} por {{user}} fue cerrada hace {{time}}',
      issueActions: 'Acciones de la Issue',
    },
    newIssue: {
      title: 'Nueva issue',
      missingTitleAlert: '¡Debes especificar un título para la issue!',
      issueTitle: 'Título de la issue',
      writeATitle: 'Escribe un título para la issue aquí',
      issueComment: 'Comentario de la issue',
      writeAComment: 'Escribe un comentario para tu issue aquí',
    },
    pullMerge: {
      title: 'Merge Pull Request',
      createMergeCommit: 'Crear un commit merge',
      squashAndMerge: 'Squash y merge',
      merge: 'merge',
      squash: 'squash',
      missingTitleAlert: '¡Debes especificar un título para el commit!',
      commitTitle: 'Título del commit',
      writeATitle: 'Escribe aquí un título para tu commit',
      commitMessage: 'Mensaje del commit',
      writeAMessage: 'Escribe aquí un mensaje para tu commit',
      mergeType: 'Tipo de merge',
      changeMergeType: 'Cambiar tipo de merge',
    },
  },
  common: {
    bio: 'BIO',
    stars: 'Estrellas',
    orgs: 'ORGANIZACIONES',
    noOrgsMessage: 'No hay organizaciones',
    info: 'INFORMACIÓN',
    company: 'Compañía',
    location: 'Ubicación',
    email: 'Email',
    website: 'Sitio web',
    repositories: 'Repositiorios',
    cancel: 'Cancelar',
    yes: 'Sí',
    ok: 'OK',
    submit: 'Enviar',
    relativeTime: {
      past: '%s',
      s: '%ds',
      m: '%dm',
      mm: '%dm',
      h: '%dh',
      hh: '%dh',
      d: '%dd',
      dd: '%dd',
      M: '%dmo',
      MM: '%dmo',
      y: '%dy',
      yy: '%dy',
    },
    abbreviations: {
      thousand: 'k',
    },
    openInBrowser: 'Abrir en el navegador',
  },
};
<commit_msg>fix(locale): Fix Spanish translation for "unreadButton". (#689)<commit_after>// Hash: 01ae4880b9b4296907d680e9b909713c36c42491
// Link: https://github.com/gitpoint/git-point/pull/260

export const es = {
  auth: {
    login: {
      connectingToGitHub: 'Conectando a GitHub...',
      preparingGitPoint: 'Preparando GitPoint...',
      cancel: 'CANCELAR',
      welcomeTitle: 'Bienvenido a GitPoint',
      welcomeMessage:
        'El cliente GitHub con más funcionalidades, 100% gratuito',
      notificationsTitle: 'Gestiona notificaciones',
      notificationsMessage: 'Revisa y gestiona tus notificaciones pendientes',
      reposTitle: 'Repositorios y Usuarios',
      reposMessage:
        'Obtén fácilmente información de repositorios, usuarios y organizaciones',
      issuesTitle: 'Issues y Pull Requests',
      issuesMessage:
        'Comunícate en conversaciones, haz merges de pull requests y más',
      signInButton: 'IDENTIFÍCATE',
    },
    welcome: {
      welcomeTitle: 'Bienvenido a GitPoint',
    },
    events: {
      welcomeMessage:
        '¡Bienvenido! Este es tu hilo de noticias - te ayudará a mantenerte informado sobre la actividad de los respositorios y los usuarios que sigues.',
      commitCommentEvent: 'commit comentado',
      createEvent: '{{object}} creado',
      deleteEvent: '{{object}} eliminado',
      issueCommentEvent: '{{action}} en {{type}}',
      issueEditedEvent: '{{action}} su comentario en {{type}}',
      issueRemovedEvent: '{{action}} su comentario en {{type}}',
      issuesEvent: '{{action}} issue',
      publicEvent: {
        action: 'hacer',
        connector: 'público',
      },
      pullRequestEvent: '{{action}} pull request',
      pullRequestReviewEvent: '{{action}} revisiones de pull request',
      pullRequestReviewCommentEvent: '{{action}} en pull request',
      pullRequestReviewEditedEvent:
        '{{action}} su comentario en el pull request',
      pullRequestReviewDeletedEvent:
        '{{action}} su comentario en el pull request',
      releaseEvent: '{{action}} lanzamiento',
      atConnector: 'at',
      toConnector: 'at',
      types: {
        pullRequest: 'pull request',
        issue: 'issue',
      },
      objects: {
        repository: 'repositorio',
        branch: 'rama',
        tag: 'etiqueta',
      },
      actions: {
        added: 'añadió',
        created: 'creó',
        edited: 'editó',
        deleted: 'eliminó',
        assigned: 'asignó',
        unassigned: 'desasignó',
        labeled: 'etiquetó',
        unlabeled: 'desetiquetó',
        opened: 'abrió',
        milestoned: 'marcó hito como alcanzado',
        demilestoned: 'desmarcó hito como alcanzado',
        closed: 'cerró',
        reopened: 'reabrió',
        review_requested: 'solicitó revisión',
        review_request_removed: 'eliminó la petición de revisión',
        submitted: 'presentó',
        dismissed: 'rechazó',
        published: 'publicó',
        publicized: 'hizo público',
        privatized: 'hizo privado',
        starred: 'marcó como favorito',
        pushedTo: 'enviado a',
        forked: 'hizo fork de',
        commented: 'comentó',
        removed: 'eliminó',
      },
    },
    profile: {
      orgsRequestApprovalTop: '¿No ves todas tus organizaciones?',
      orgsRequestApprovalBottom:
        'Quizá tengas que solicitar aprobación para verlas.',
      codePushCheck: 'Comprobar actualizaciones',
      codePushChecking: 'Comprobando actualizaciones...',
      codePushUpdated: 'Aplicación actualizada',
      codePushAvailable: '¡Actualizaciones disponibles!',
      codePushNotApplicable: 'No aplicable en modo de depuración',
    },
    userOptions: {
      donate: 'Realizar donación',
      title: 'Opciones',
      language: 'Idioma',
      privacyPolicy: 'Política de privacidad',
      signOut: 'Cerrar sesión',
    },
    privacyPolicy: {
      title: 'Política de privacidad',
      effectiveDate: 'Última actualización: 15 de Julio, 2017',
      introduction:
        'Estamos contentos de que hayas decidido usar GitPoint. Esta política de privacidad está aquí para informarte sobre lo que hacemos - y lo que no - con tus datos de usuario.',
      userDataTitle: 'DATOS DE USUARIO',
      userData1:
        'No hacemos nada con tu información de GitHub. Tras la autenticación, el token OAuth del usuario se guarda directamente en el almacenamiento de su dispositivo. No es posible para nosotros recuperar esa información. Nunca vemos ni almacenamos el token de acceso de un usuario.',
      userData2:
        'Esto significa que de ninguna manera miramos, usamos o compartimos datos de GitHub de los usuarios. Si la información privada se volviera visible en algún momento, no la registraremos ni leeremos. Si se guardara accidentalmente, la borraremos inmediatamente usando métodos seguros de borrado. Sin embargo, hemos configurado la autenticación para que esto nunca suceda.',
      analyticsInfoTitle: 'INFORMACIÓN DE ANALYTICS',
      analyticsInfo1:
        'Actualmente usamos Google Analytics y iTunes App Analytics para ayudarnos a medir el tráfico y las tendencias de uso de GitPoint. Estas herramientas recogen información mandada por tu dispositivo, invluyendo la versión del dispositivo y la plataforma y la zona geográfica. Esta información no puede ser usada para identificar ningún usuario individual y no se extrae ninguna información personal.',
      analyticsInfo2:
        'Si incluimos otras plataformas de terceros para analizar rastros, archivos de error o otra información analítica, nos aseguraremos de que los datos del usuario permanezcan anonimizados y encriptados.',
      openSourceTitle: 'CÓDIGO ABIERTO',
      openSource1:
        'GitPoint es de código abierto y el histórico de contribuciones a la plataforma será siempre visible al público.',
      openSource2:
        'Con cada contribución a la aplicación, se realiza una revisión de código para evitar que nadie incluya código malicioso de cualquier tipo.',
      contactTitle: 'CONTACTO',
      contact1:
        'Gracias por leer nuestra política de privacidad. Esperamos que disfrutes usando GitPoint tanto como nosotros disfutamos desarrollándolo.',
      contact2:
        'Si tienes preguntas de cualquier tipo acerca de esta política de privacidad o de GitPoint en general, por favor crea una incidencia en el',
      contactLink: 'repositorio de GitPoint',
    },
  },
  notifications: {
    main: {
      unread: 'no leído',
      participating: 'participando',
      all: 'todas',
      unreadButton: 'No leídas',
      participatingButton: 'Participando',
      allButton: 'Todas',
      retrievingMessage: 'Cargando notificaciones',
      noneMessage: 'No tienes ninguna notificación de este tipo',
      markAllAsRead: 'Marcar todo como leído',
    },
  },
  search: {
    main: {
      repositoryButton: 'Repositorios',
      userButton: 'Usuarios',
      searchingMessage: 'Buscando {{query}}',
      searchMessage: 'Buscando cualquier {{type}}',
      repository: 'repositorio',
      user: 'usuario',
      noUsersFound: 'No se encontraron usuarios :(',
      noRepositoriesFound: 'No se encontraron repositorios :(',
    },
  },
  user: {
    profile: {
      userActions: 'Acciones de usuario',
      unfollow: 'Dejar de seguir',
      follow: 'Seguir',
    },
    repositoryList: {
      title: 'Repositorios',
    },
    starredRepositoryList: {
      title: 'Stars',
      text: 'Stars',
    },
    followers: {
      title: 'Seguidores',
      text: 'Seguidores',
      followsYou: 'Te sigue',
    },
    following: {
      title: 'Siguiendo',
      text: 'Siguiendo',
      followingYou: 'Siguiendo',
    },
  },
  repository: {
    main: {
      shareRepositoryTitle: 'Compartir {{repoName}}',
      shareRepositoryMessage: 'Revisa {{repoName}} en GitHub. {{repoUrl}}',
      repoActions: 'Acciones del repositorio',
      forkAction: 'Hacer fork',
      starAction: 'Marcar favorito',
      unstarAction: 'Desmarcar favorito',
      shareAction: 'Compartir',
      unwatchAction: 'Dejar de seguir',
      watchAction: 'Seguir',
      ownerTitle: 'PROPIETARIO',
      contributorsTitle: 'CONTRIBUIDORES',
      noContributorsMessage: 'No se encontraron contribuidores',
      sourceTitle: 'CÓDIGO',
      readMe: 'LEEME',
      viewSource: 'Ver código',
      issuesTitle: 'ISSUES',
      noIssuesMessage: 'No hay issues',
      noOpenIssuesMessage: 'No hay issues abiertas',
      viewAllButton: 'Ver todo',
      newIssueButton: 'Nueva issue',
      pullRequestTitle: 'PULL REQUESTS',
      noPullRequestsMessage: 'No pull requests',
      noOpenPullRequestsMessage: 'No open pull requests',
      starsTitle: 'Stars',
      forksTitle: 'Forks',
      forkedFromMessage: 'forked from',
      starred: 'Favoritos',
      watching: 'Siguiendo',
      watchers: 'Seguidores',
    },
    codeList: {
      title: 'Código',
    },
    issueList: {
      title: 'Issues',
      openButton: 'Abiertas',
      closedButton: 'Cerradas',
      searchingMessage: 'Buscando {{query}}',
      noOpenIssues: '¡No se encontraron issues abiertas!',
      noClosedIssues: '¡No se encontraron issues cerradas!',
    },
    pullList: {
      title: 'Pull Requests',
      openButton: 'Abiertos',
      closedButton: 'Cerrados',
      searchingMessage: 'Buscando {{query}}',
      noOpenPulls: '¡No se encontraron pull requests abiertos!',
      noClosedPulls: '¡No se encontraron pull requests cerrados!',
    },
    pullDiff: {
      title: 'Diferencias',
      numFilesChanged: '{{numFilesChanged}} archivos',
      new: 'NUEVOS',
      deleted: 'ELIMINADOS',
      fileRenamed: 'Archivo renombrado sin cambios',
    },
    readMe: {
      readMeActions: 'Acciones README',
      noReadMeFound: 'No se ha encontrado README.md',
    },
  },
  organization: {
    main: {
      membersTitle: 'MIEMBROS',
      descriptionTitle: 'DESCRIPCIÓN',
    },
    organizationActions: 'Acciones de la organización',
  },
  issue: {
    settings: {
      title: 'Configuración',
      pullRequestType: 'Pull Request',
      issueType: 'Issues',
      applyLabelButton: 'Aplicar etiqueta',
      noneMessage: 'Ninguno todavía',
      labelsTitle: 'ETIQUETAS',
      assignYourselfButton: 'Asígnate a ti mismo',
      assigneesTitle: 'ASIGNADOS',
      actionsTitle: 'ACCIONES',
      unlockIssue: 'Desbloquear {{issueType}}',
      lockIssue: 'Bloquear {{issueType}}',
      closeIssue: 'Cerrar {{issueType}}',
      reopenIssue: 'Reabrir {{issueType}}',
      areYouSurePrompt: '¿Estás seguro?',
      applyLabelTitle: 'Asignar etiqueta a esta issue',
    },
    comment: {
      commentActions: 'Acciones de comentarios',
      editCommentTitle: 'Editar comentario',
      editAction: 'Editar',
      deleteAction: 'Eliminar',
    },
    main: {
      assignees: 'Assignees',
      mergeButton: 'Merge Pull Request',
      noDescription: 'No se ha proporcionado ninguna descripción.',
      lockedCommentInput: 'Bloqueado, pero todavía puedes comentar...',
      commentInput: 'Añade un comentario...',
      lockedIssue: 'La issue está bloqueada',
      states: {
        open: 'Abierta',
        closed: 'Cerrada',
        merged: 'Merged',
      },
      screenTitles: {
        issue: 'Issue',
        pullRequest: 'Pull Request',
      },
      openIssueSubTitle: '#{{number}} abiertas hace {{time}} por {{user}}',
      closedIssueSubTitle: '#{{number}} por {{user}} fue cerrada hace {{time}}',
      issueActions: 'Acciones de la Issue',
    },
    newIssue: {
      title: 'Nueva issue',
      missingTitleAlert: '¡Debes especificar un título para la issue!',
      issueTitle: 'Título de la issue',
      writeATitle: 'Escribe un título para la issue aquí',
      issueComment: 'Comentario de la issue',
      writeAComment: 'Escribe un comentario para tu issue aquí',
    },
    pullMerge: {
      title: 'Merge Pull Request',
      createMergeCommit: 'Crear un commit merge',
      squashAndMerge: 'Squash y merge',
      merge: 'merge',
      squash: 'squash',
      missingTitleAlert: '¡Debes especificar un título para el commit!',
      commitTitle: 'Título del commit',
      writeATitle: 'Escribe aquí un título para tu commit',
      commitMessage: 'Mensaje del commit',
      writeAMessage: 'Escribe aquí un mensaje para tu commit',
      mergeType: 'Tipo de merge',
      changeMergeType: 'Cambiar tipo de merge',
    },
  },
  common: {
    bio: 'BIO',
    stars: 'Estrellas',
    orgs: 'ORGANIZACIONES',
    noOrgsMessage: 'No hay organizaciones',
    info: 'INFORMACIÓN',
    company: 'Compañía',
    location: 'Ubicación',
    email: 'Email',
    website: 'Sitio web',
    repositories: 'Repositiorios',
    cancel: 'Cancelar',
    yes: 'Sí',
    ok: 'OK',
    submit: 'Enviar',
    relativeTime: {
      past: '%s',
      s: '%ds',
      m: '%dm',
      mm: '%dm',
      h: '%dh',
      hh: '%dh',
      d: '%dd',
      dd: '%dd',
      M: '%dmo',
      MM: '%dmo',
      y: '%dy',
      yy: '%dy',
    },
    abbreviations: {
      thousand: 'k',
    },
    openInBrowser: 'Abrir en el navegador',
  },
};
<|endoftext|>