@Feature(summary = "The user can change their API key",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void changeUsersApiKey() throws Exception {
DashboardClientTab dashboardClientTab = new LoginWorkFlow()
.signIn("translator", "translator")
.goToSettingsTab()
.goToSettingsClientTab();
String currentApiKey = dashboardClientTab.getApiKey();
dashboardClientTab = dashboardClientTab.pressApiKeyGenerateButton();
dashboardClientTab.waitForApiKeyChanged(currentApiKey);
assertThat(dashboardClientTab.getApiKey()).isNotEqualTo(currentApiKey)
.as("The user's api key is different");
assertThat(dashboardClientTab.getApiKey()).isNotEmpty()
.as("The user's api key is not empty");
assertThat(dashboardClientTab.getConfigurationDetails())
.contains("localhost.key="
.concat(dashboardClientTab.getApiKey()))
.as("The configuration api key matches the label");
}