package rocketboard;

import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.openqa.selenium.support.PageFactory;

import rocketboardPages.GitHub;
import rocketboardPages.GitHub.AuthorizePage;

public class ChangeAccessLevelTests extends AbstractRocketboardTests {
	@Test
	public void changeAccessLevel() throws Exception {
		givenTableroAccessToPrivateRepositories();

		assertTrue(whenChangesAccessToOnlyPublic().isAuthorizePage());
	}

	private AuthorizePage whenChangesAccessToOnlyPublic()
			throws InterruptedException {
		rocketboardPage.openChangeAccess();
		rocketboardPage.selectAccessToPublicReposOnly();

		return PageFactory.initElements(driver, GitHub.AuthorizePage.class);
	}

	private void givenTableroAccessToPrivateRepositories()
			throws Exception {
		rocketboardPage.waitingLoading();
	}
}

@@ -281,16 +281,18 @@
 Tests %7B%0A
+%09%0A
 %09@Test%0A%09
@@ -346,54 +346,8 @@
 n %7B%0A
-%09%09givenTableroAccessToPrivateRepositories();%0A%0A
 %09%09as
@@ -666,125 +666,7 @@
 ;%0A%09%7D
-%0A%0A%09private void givenTableroAccessToPrivateRepositories()%0A%09%09%09throws Exception %7B%0A%09%09rocketboardPage.waitingLoading();%0A%09%7D
 %0A%7D%0A

Remove unnecessary method on ChangeAccessLevelTests.