@Test
public void testLinks() throws Exception {
WebClient wc = startWebClient(false);
login(wc);
HtmlPage page = wc.getPage(url("/preferences/Preferences.action"));
HtmlAnchor changePreferredLocaleLink = page.getAnchorByText("Choose your preferred language");
changePreferredLocaleLink.click();
wc.waitForBackgroundJavaScript(10000L);
WebAssert.assertElementPresent(page, "changePreferredLocaleForm");
testBasics(page);
HtmlAnchor changePreferredTimeZoneLink = page.getAnchorByText("Choose your time zone");
changePreferredTimeZoneLink.click();
wc.waitForBackgroundJavaScript(10000L);
WebAssert.assertElementNotPresent(page, "changePreferredLocaleForm");
WebAssert.assertElementPresent(page, "changePreferredTimeZoneForm");
WebAssert.assertElementNotPresent(page, "changePasswordPreferencesForm");
WebAssert.assertElementNotPresent(page, "changePasswordGenerationPreferencesForm");
testBasics(page);
HtmlAnchor changePasswordPreferencesLink = page.getAnchorByText("Password preferences");
changePasswordPreferencesLink.click();
wc.waitForBackgroundJavaScript(10000L);
WebAssert.assertElementNotPresent(page, "changePreferredLocaleForm");
WebAssert.assertElementNotPresent(page, "changePreferredTimeZoneForm");
WebAssert.assertElementPresent(page, "changePasswordPreferencesForm");
WebAssert.assertElementNotPresent(page, "changePasswordGenerationPreferencesForm");
testBasics(page);
HtmlAnchor changePasswordGenerationPreferencesLink = page.getAnchorByText("Random password generation preferences");
changePasswordGenerationPreferencesLink.click();
wc.waitForBackgroundJavaScript(10000L);
WebAssert.assertElementNotPresent(page, "changePreferredLocaleForm");
WebAssert.assertElementNotPresent(page, "changePreferredTimeZoneForm");
WebAssert.assertElementNotPresent(page, "changePasswordPreferencesForm");
WebAssert.assertElementPresent(page, "changePasswordGenerationPreferencesForm");