<commit_before>function testMarkerType(test, imgFileName, expectedNumber, expectedName) {
  casper.then(function() {
    this.waitUntilVisible("img[src=\"img/" + imgFileName + "\"]", function() {
      this.click("img[src=\"img/" + imgFileName + "\"]")
    });
  });

  casper.then(function() {
    console.log(this.fetchText(".leaflet-popup-content"));
    test.assertElementCount("img[src=\"img/" + imgFileName + "\"]", expectedNumber);
    test.assertVisible(".leaflet-popup-content");
  });
}


//And the tests begin!
casper.options.waitTimeout = 10000;
casper.test.begin("Testing markers and popups", 17, function(test) {
  casper.start("https://preview.c9.io/avgp/zueri2go/Zueri2Go/www/index.html");

  // Loading the markers manually (as we don't have geolocation available)
  casper.then(function() {
    this.evaluate(function() {
      var pos = {coords: { latitude: 47.376786, longitude: 8.494556 }};
      loadPanoramicViews(pos, {});
      loadPlaygrounds(pos, {});
      loadToilets(pos, {});
      loadRestaurants(pos, {});
    });
  });

  testMarkerType(test, "panoramicview.png", 2);

  testMarkerType(test, "playground.png", 27);<commit_msg>Trying to fix the weird test failures with fixing the language.<commit_after>function testMarkerType(test, imgFileName, expectedNumber, expectedName) {
  casper.then(function() {
    this.waitUntilVisible("img[src=\"img/" + imgFileName + "\"]", function() {
      this.click("img[src=\"img/" + imgFileName + "\"]")
    });
  });

  casper.then(function() {
    console.log(this.fetchText(".leaflet-popup-content"));
    test.assertElementCount("img[src=\"img/" + imgFileName + "\"]", expectedNumber);
    test.assertVisible(".leaflet-popup-content");
  });
}


//And the tests begin!
casper.options.waitTimeout = 10000;
casper.test.begin("Testing markers and popups", 17, function(test) {
  casper.start("https://preview.c9.io/avgp/zueri2go/Zueri2Go/www/index.html?setLng=de");

  // Loading the markers manually (as we don't have geolocation available)
  casper.then(function() {
    this.evaluate(function() {
      var pos = {coords: { latitude: 47.376786, longitude: 8.494556 }};
      loadPanoramicViews(pos, {});
      loadPlaygrounds(pos, {});
      loadToilets(pos, {});
      loadRestaurants(pos, {});
    });
  });

  testMarkerType(test, "panoramicview.png", 2);

  testMarkerType(test, "playground.png", 27);
{'fraction_non_alphanumeric': 0.18025210084033613, 'fraction_numerical': 0.023529411764705882, 'mean_word_length': 4.109442060085837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1719621', 'n_tokens_mistral': 842, 'n_tokens_neox': 777, 'n_words': 127}