Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #758 from zanata/fix-some-texts
Browse files Browse the repository at this point in the history
Rename Obsolete to Archived in UI and tests
  • Loading branch information
djansen-redhat committed Apr 1, 2015
2 parents 4b1baa5 + 4fa9e01 commit e033111
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
Expand Up @@ -44,8 +44,8 @@ public class VersionGroupsPage extends BasePage {
private By groupTable = By.id("groupForm:groupTable");
private By infomsg = By.className("infomsg.icon-info-circle-2");
private By createGroupButton = By.id("group-create");
private By toggleObsolete = By.id("groupForm:showObsolete");
private By obsoleteLink = By.className("obsolete_link");
private By toggleArchived = By.id("groupForm:showObsolete");
private By archiveLink = By.className("obsolete_link");

public VersionGroupsPage(WebDriver driver) {
super(driver);
Expand All @@ -68,16 +68,16 @@ public VersionGroupPage goToGroup(String groupName) {
return new VersionGroupPage(getDriver());
}

public VersionGroupsPage toggleObsolete(final boolean show) {
WebElement showObsolete = waitForWebElement(toggleObsolete);
if (show != showObsolete.isSelected()) {
showObsolete.click();
public VersionGroupsPage toggleArchived(final boolean show) {
WebElement showArchived = waitForWebElement(toggleArchived);
if (show != showArchived.isSelected()) {
showArchived.click();
}
waitForAMoment().until(new Predicate<WebDriver>() {
@Override
public boolean apply(WebDriver input) {
return waitForWebElement(groupTable)
.findElements(obsoleteLink)
.findElements(archiveLink)
.isEmpty() == !show;
}
});
Expand Down
Expand Up @@ -42,7 +42,7 @@ public class ProjectsPage extends BasePage {
private By projectTable = By.id("main_content:form:projectList");
private By activeCheckBox = By.xpath("//*[@data-original-title='Filter active projects']");
private By readOnlyCheckBox = By.xpath("//*[@data-original-title='Filter read-only projects']");
private By obsoleteCheckBox = By.xpath("//*[@data-original-title='Filter obsolete projects']");
private By archivedCheckBox = By.xpath("//*[@data-original-title='Filter archived projects']");

public ProjectsPage(final WebDriver driver) {
super(driver);
Expand Down Expand Up @@ -119,11 +119,11 @@ public ProjectsPage setReadOnlyFilterEnabled(final boolean enabled) {
return new ProjectsPage(getDriver());
}

public ProjectsPage setObsoleteFilterEnabled(boolean enabled) {
log.info("Click to set Obsolete filter enabled to {}", enabled);
WebElement obsoleteCheckbox = waitForWebElement(obsoleteCheckBox);
if (obsoleteCheckbox.isSelected() != enabled) {
obsoleteCheckbox.click();
public ProjectsPage setArchivedFilterEnabled(boolean enabled) {
log.info("Click to set Archived filter enabled to {}", enabled);
WebElement archivedCheckbox = waitForWebElement(archivedCheckBox);
if (archivedCheckbox.isSelected() != enabled) {
archivedCheckbox.click();
}
return new ProjectsPage(getDriver());
}
Expand Down
Expand Up @@ -71,7 +71,7 @@ public void setAProjectToReadOnly() throws Exception {
.goToProjects()
.setActiveFilterEnabled(true)
.setReadOnlyFilterEnabled(false)
.setObsoleteFilterEnabled(false)
.setArchivedFilterEnabled(false)
.waitForProjectVisibility("about fedora", false);

assertThat(projectsPage.getProjectNamesOnCurrentPage())
Expand All @@ -80,7 +80,7 @@ public void setAProjectToReadOnly() throws Exception {

projectsPage = projectsPage.setActiveFilterEnabled(false)
.setReadOnlyFilterEnabled(true)
.setObsoleteFilterEnabled(false)
.setArchivedFilterEnabled(false)
.waitForProjectVisibility("about fedora", true);

assertThat(projectsPage.getProjectNamesOnCurrentPage())
Expand All @@ -101,7 +101,7 @@ public void setAProjectToWritable() throws Exception {
.goToProjects()
.setActiveFilterEnabled(false)
.setReadOnlyFilterEnabled(true)
.setObsoleteFilterEnabled(false)
.setArchivedFilterEnabled(false)
.waitForProjectVisibility("about fedora", true)
.getProjectNamesOnCurrentPage())
.contains("about fedora")
Expand All @@ -117,7 +117,7 @@ public void setAProjectToWritable() throws Exception {
.goToProjects()
.setActiveFilterEnabled(true)
.setReadOnlyFilterEnabled(false)
.setObsoleteFilterEnabled(false)
.setArchivedFilterEnabled(false)
.waitForProjectVisibility("about fedora", true);

assertThat(projectsPage.getProjectNamesOnCurrentPage())
Expand Down
Expand Up @@ -24,10 +24,10 @@ public class SetProjectVisibilityTest extends ZanataTestCase {
@Rule
public SampleProjectRule sampleProjectRule = new SampleProjectRule();

@Feature(summary = "The administrator can set a project to obsolete",
@Feature(summary = "The administrator can set a project to archived",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 135846)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void setAProjectObsolete() throws Exception {
public void setAProjectArchived() throws Exception {
ProjectsPage projectsPage = new LoginWorkFlow()
.signIn("admin", "admin")
.goToProjects()
Expand All @@ -43,7 +43,7 @@ public void setAProjectObsolete() throws Exception {

projectsPage = projectsPage.setActiveFilterEnabled(false)
.setReadOnlyFilterEnabled(false)
.setObsoleteFilterEnabled(true);
.setArchivedFilterEnabled(true);

projectsPage.waitForProjectVisibility("about fedora", true);

Expand All @@ -58,14 +58,14 @@ public void setAProjectObsolete() throws Exception {
.goToProjects()
.getProjectNamesOnCurrentPage())
.doesNotContain("about fedora")
.as("User cannot navigate to the obsolete project");
.as("User cannot navigate to the archived project");
}

@Feature(summary = "The administrator can set an obsolete project " +
@Feature(summary = "The administrator can set an archived project " +
"to active",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void setAnObsoleteProjectAsActive() throws Exception {
public void setAnArchivedProjectAsActive() throws Exception {
ProjectGeneralTab projectGeneralTab = new LoginWorkFlow()
.signIn("admin", "admin")
.goToProjects()
Expand All @@ -74,7 +74,7 @@ public void setAnObsoleteProjectAsActive() throws Exception {
.gotoSettingsGeneral()
.archiveProject()
.goToProjects()
.setObsoleteFilterEnabled(true)
.setArchivedFilterEnabled(true)
.goToProject("about fedora")
.gotoSettingsTab()
.gotoSettingsGeneral()
Expand Down
Expand Up @@ -83,10 +83,10 @@ public void unsuccessfulProjectSearch() throws Exception {
.as("No projects are displayed");
}

@Feature(summary = "The user cannot search for Obsolete projects",
@Feature(summary = "The user cannot search for Archived projects",
tcmsTestPlanIds = 5316, tcmsTestCaseIds = 0)
@Test(timeout = ZanataTestCase.MAX_SHORT_TEST_DURATION)
public void normalUserCannotSearchObsolete() throws Exception {
public void normalUserCannotSearchArchived() throws Exception {
new LoginWorkFlow().signIn("admin", "admin")
.goToProjects()
.goToProject("about fedora")
Expand All @@ -102,7 +102,7 @@ public void normalUserCannotSearchObsolete() throws Exception {

assertThat(basePage.getProjectSearchAutocompleteItems())
.doesNotContain("About Fedora")
.as("User cannot see the obsolete project");
.as("User cannot see the archived project");
}

}
14 changes: 7 additions & 7 deletions zanata-war/src/main/resources/messages.properties
Expand Up @@ -7,7 +7,7 @@ jsf.Active=Active
! project/version status
jsf.ReadOnly=Read-only
! project/version status
jsf.Obsolete=Obsolete
jsf.Obsolete=Archived

! this is shown when trying to access a project, version or other item that does not exist in the system.
! e.g. navigate to a project, then change the project slug in the URL to make it invalid and press enter.
Expand Down Expand Up @@ -92,7 +92,7 @@ jsf.auth.KerberosNotice.label=It looks like you don't have a valid Kerberos tick
#--- Project search (all pages) ---
jsf.SearchProjects=Search Projects
jsf.SearchProjectsAndPeople=Search Projects and People
jsf.project.search.IncludeObsoleteTooltip=Include Obsolete Projects in Search
jsf.project.search.IncludeObsoleteTooltip=Include Archived Projects in Search

#--- Footer (all pages) ---
jsf.About=About
Expand Down Expand Up @@ -228,7 +228,7 @@ jsf.Language.useGlobal=Use default languages
jsf.CreateProject=Create project
jsf.FilterActiveProjects=Filter active projects
jsf.FilterReadOnlyProjects=Filter read-only projects
jsf.FilterObsoleteProjects=Filter obsolete projects
jsf.FilterObsoleteProjects=Filter archived projects
jsf.ProjectName=Project Name
jsf.NoProjectExists=No project exists.

Expand Down Expand Up @@ -275,7 +275,7 @@ jsf.ValidationHelp=Validation options
jsf.Off=Off
jsf.ValidationStateHelpOff=Validation disabled by default in editor. Translator is able to enable/disable the validation. No restriction on saving translation.
jsf.ValidationStateHelpWarning=Validation enabled by default in editor. Translator is able to enable/disable the validation. No restriction on saving translation.
jsf.ValidationStateHelpError=Validation enabled and locked in editor. Translation with validation error can only be save as fuzzy.
jsf.ValidationStateHelpError=Validation enabled and locked in editor. Translations with validation error can only be saved as fuzzy.
jsf.ArchiveThisProject=Archive this project
jsf.UnArchiveThisProject=Unarchive this project
jsf.project.readonly=Make this project read only
Expand Down Expand Up @@ -304,7 +304,7 @@ jsf.webhook.response.state={0}% {1}

#------ [home] > Projects > [project-id] ------
jsf.ReadOnlyVersions=Read-only versions
jsf.ObsoleteVersions=Obsolete versions
jsf.ObsoleteVersions=Archived versions
jsf.DocumentCount=Documents:
jsf.TranslateLinks=Translate Links
! tooltip for an icon that launches the translation editor, with editing enabled.
Expand Down Expand Up @@ -696,7 +696,7 @@ jsf.upload.UploadedBytesExceedFileSize=Uploaded bytes exceed file size
#------ [home] > Groups ------
jsf.NoGroups=No groups
jsf.groups.ShowActiveGroups=Show active groups
jsf.groups.ShowObsoleteGroups=Show obsolete groups
jsf.groups.ShowObsoleteGroups=Show archived groups
jsf.TotalSourceContains=Total source content:
jsf.AddLanguages=Add languages
jsf.AddALanguage=Add a Language
Expand Down Expand Up @@ -725,7 +725,7 @@ jsf.ProjectMissingLanguage={0} project missing for this language
jsf.ProjectsMissingLanguage={0} projects missing for this language
jsf.LanguageMissingProject={0} language missing for this project
jsf.LanguagesMissingProject={0} languages missing for this project
jsf.ArchiveGroupMessage=This will set the group's status to obsolete and remove it from the public groups list, you will still be able to access it and unarchive it later.
jsf.ArchiveGroupMessage=This will set the group's status to archived and remove it from the public groups list, you will still be able to access it and unarchive it later.
jsf.ActivateGroupMessage=This will set the group's status to active and make it visible in the public groups list.

jsf.Missing=missing
Expand Down

0 comments on commit e033111

Please sign in to comment.