Skip to content

Commit

Permalink
Merge pull request #2 from cedaniel200/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
cedaniel200 authored Sep 27, 2020
2 parents 09ce7ae + 87e0dc7 commit 11f79b8
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ La estructura completa del proyecto es la siguiente:

## Requerimientos

Para correr el proyecto se necesita Java JDK 1.8 y Gradle preferiblemente con la versión 4.3.
Para correr el proyecto se necesita Java JDK 1.8 y Gradle preferiblemente con la versión 4.8.1.

## Para correr el proyecto

Expand Down
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
group 'co.com.yourcompany.certification'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8

repositories {
mavenCentral()
mavenLocal()
jcenter()
}

buildscript {
repositories {
mavenCentral()
Expand All @@ -28,6 +13,21 @@ buildscript {
}
}

group 'co.com.yourcompany.certification'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8

repositories {
mavenCentral()
mavenLocal()
jcenter()
}

dependencies {
testImplementation "net.serenity-bdd:serenity-core:$rootProject.ext.serenityVersion"
testImplementation "net.serenity-bdd:serenity-junit:$rootProject.ext.serenityVersion"
Expand All @@ -42,7 +42,7 @@ dependencies {
}

tasks.withType(Test){
systemProperties = System.properties
systemProperties = System.properties as Map<String, ?>
maxParallelForks = Runtime.runtime.availableProcessors()
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Wed Mar 11 13:57:46 COT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
#Fri Sep 25 20:12:02 COT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,36 @@

public class SelectDropDownButton implements Interaction {

private final Target checkbox;
private final Target button;
private final Target filter;
private final String valueFilter;
private final String cssSelectorForElementSelected;

public SelectDropDownButton(Target button, Target filter, String valueFilter, String selectorForElementSelected) {
public SelectDropDownButton(Target checkbox, Target button, Target filter, String valueFilter, String selectorForElementSelected) {
this.checkbox = checkbox;
this.valueFilter = valueFilter;
this.button = button;
this.filter = filter;
this.cssSelectorForElementSelected = selectorForElementSelected;
}

public static SelectDropDownButton addGitIgnoreFilteringBy(GitIgnore valueFilter) {
return instrumented(SelectDropDownButton.class, ADD_GITIGNORE,
return instrumented(SelectDropDownButton.class, CHECKBOX_GITIGNORE, ADD_GITIGNORE,
FILTER_GITIGNORE, valueFilter.toString(),
SELECTOR_FORMAT_GITIGNORE);
}

public static SelectDropDownButton addLicenseFilteringBy(License valueFilter) {
return instrumented(SelectDropDownButton.class, ADD_LICENSE,
return instrumented(SelectDropDownButton.class, CHECKBOX_LICENSE, ADD_LICENSE,
FILTER_LICENSE, valueFilter.toString(),
String.format(SELECTOR_FORMAT_LICENSE, valueFilter));
}

@Override
@Step("{0} clicks on #button is filtered by #valueFilter and click on the resulting item")
public <T extends Actor> void performAs(T actor) {
checkbox.resolveFor(actor).click();
button.resolveFor(actor).click();
filter.resolveFor(actor).sendKeys(valueFilter);
Target selectedItem = Target.the("selected item").locatedBy(cssSelectorForElementSelected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,39 @@ public class CreateNewRepositoryPage {
.the("Initialize this repository with a README")
.located(By.id("repository_auto_init"));


public static final Target CHECKBOX_GITIGNORE = Target
.the("Checkbox .gitignore")
.located(By.id("repository_gitignore_template_toggle"));

public static final Target ADD_GITIGNORE = Target
.the("Add .gitignore")
.locatedBy(".my-3 > .select-menu > .btn");
.locatedBy(":nth-child(5) > .form-checkbox-details > .details-reset > .btn");

public static final Target FILTER_GITIGNORE = Target
.the("filter of the gitignore").located(By.id("context-ignore-filter-field"));

public static final String SELECTOR_FORMAT_GITIGNORE = ".filterable-active";


public static final Target CHECKBOX_LICENSE = Target
.the("checkbox a license")
.located(By.id("repository_license_template_toggle"));

public static final Target ADD_LICENSE = Target
.the("Add a license")
.locatedBy(".btn > .text-normal");
.locatedBy(" //*[contains(text(),'License:')]");

public static final Target FILTER_LICENSE = Target
.the("filter of the license")
.locatedBy(".SelectMenu-filter > .width-full");

public static final String SELECTOR_FORMAT_LICENSE = "//div[@class=\"SelectMenu-list\"]//span[contains(text(), '%s')]//ancestor::label";


public static final Target CREATE_REPOSITORY = Target
.the("Create repository")
.locatedBy("//*[@id=\"new_repository\"]/div[3]/button");
.locatedBy("div.js-with-permission-fields > .btn-primary");

public static final Target MESSAGE_REPOSITORY_ALREADY_EXISTS = Target
.the("Error message")
Expand Down

0 comments on commit 11f79b8

Please sign in to comment.