-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2 Add 'Open Project Catalog' Feature
- Add: openProjectCatalog.feature, ContentInformationSteps, CatalogPage - Enhance: HomePage - Edit: lockArchiveMetadata.feature, uploadFile.feature
- Loading branch information
Showing
6 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package ui.pages; | ||
|
||
import static io.cucumber.spring.CucumberTestContext.SCOPE_CUCUMBER_GLUE; | ||
|
||
import org.openqa.selenium.WebDriver; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Lazy; | ||
import org.springframework.context.annotation.Scope; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* Page Object encapsulates the Catalog page. | ||
* | ||
* @author helk | ||
* | ||
*/ | ||
@Lazy | ||
@Component | ||
@Scope(SCOPE_CUCUMBER_GLUE) | ||
public class CatalogPage extends BasePage { | ||
|
||
@Autowired | ||
public CatalogPage(WebDriver driver) { | ||
super(driver); | ||
} | ||
|
||
public String getTitle() { | ||
return driver.getTitle(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/test/java/stepdefinitions/ContentInformationSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package stepdefinitions; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.openqa.selenium.WebDriver; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Lazy; | ||
|
||
import io.cucumber.java.en.Then; | ||
import io.cucumber.java.en.When; | ||
import ui.pages.CatalogPage; | ||
import ui.pages.HomePage; | ||
|
||
/** | ||
* Test Steps: Content Information domain | ||
* | ||
* @author helk | ||
* | ||
*/ | ||
public class ContentInformationSteps { | ||
|
||
@Autowired | ||
WebDriver driver; | ||
|
||
@Lazy | ||
@Autowired | ||
HomePage homePage; | ||
|
||
@Lazy | ||
@Autowired | ||
CatalogPage catalogPage; | ||
|
||
@When("Open Project Catalog") | ||
public void openProjectCatalog() { | ||
homePage.openProjectCatalog(); | ||
} | ||
|
||
@Then("Project Catalog Page is opened") | ||
public void projectCatalogPageIsOpened() { | ||
assertThat(catalogPage.getTitle()).isEqualTo("Catalog - KEEPER"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Feature: Open Project Catalog | ||
Logged in user can open the Project Catalog. | ||
|
||
@KP-20 | ||
@openProjectCatalog | ||
Scenario: Open Project Catalog | ||
Given Logged in as User | ||
When Open Project Catalog | ||
Then Project Catalog Page is opened | ||
#TODO: Project Catalog is displayed correctly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters