<commit_before>package com.maven8919.index;

import java.util.concurrent.TimeUnit;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class IndexIntegrationTest {

	private static FirefoxDriver browser;

	@Value("${local.server.port}")
	private int port;

	@BeforeClass
	public static void openBrowser() {
		browser = new FirefoxDriver();
		browser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	}

	@Test
	public void testIndexPageShouldHaveALinkWithStartGameText() {
		String baseUrl = "http://localhost:" + port;
		browser.get(baseUrl);
		assertEquals("Start game", browser.findElementsByTagName("a").get(0).getText());
	}
	
	@Test
	public void testIndexPageStartGameLinkShouldGoToGameCreationPage() {
		String baseUrl = "http://localhost:" + port;
		browser.get(baseUrl);
		browser.findElement(By.cssSelector("a[href*='game']")).click();
	}

	@AfterClass
	public static void closeBrowser() {
		browser.quit();
	}

}<commit_msg>Add currentUrl check after clicking on start game<commit_after>package com.maven8919.index;

import java.util.concurrent.TimeUnit;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class IndexIntegrationTest {

	private static FirefoxDriver browser;

	@Value("${local.server.port}")
	private int port;

	@BeforeClass
	public static void openBrowser() {
		browser = new FirefoxDriver();
		browser.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	}

	@Test
	public void testIndexPageShouldHaveALinkWithStartGameText() {
		String baseUrl = "http://localhost:" + port;
		browser.get(baseUrl);
		assertEquals("Start game", browser.findElementsByTagName("a").get(0).getText());
	}
	
	@Test
	public void testIndexPageStartGameLinkShouldGoToGameCreationPage() {
		String baseUrl = "http://localhost:" + port;
		browser.get(baseUrl);
		browser.findElement(By.cssSelector("a[href*='game']")).click();
		assertEquals(baseUrl + "/game", browser.getCurrentUrl());
	}

	@AfterClass
	public static void closeBrowser() {
		browser.quit();
	}

}
{'fraction_non_alphanumeric': 0.12394274560832791, 'fraction_numerical': 0.00520494469746259, 'mean_word_length': 6.252358490566038, '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': '6125391', 'n_tokens_mistral': 975, 'n_tokens_neox': 925, 'n_words': 168}