Skip to content

Instantly share code, notes, and snippets.

View giovanettid's full-sized avatar

Didier Giovanetti giovanettid

  • Didier Giovanetti
  • France
View GitHub Profile
@giovanettid
giovanettid / todoAdd-seleniumjs.js
Last active November 9, 2015 21:54
mocha chai test with seleniumjs page object
describe('Todo add scenario', function() {
before(function() {
return todo.before();
});
it('titre de la page', function() {
return expect(todo.title()).to.eventually.equal('TodoListWithBB');
});
@giovanettid
giovanettid / todoAdd.feature
Last active November 9, 2015 21:53
cucumberjs scenario
Feature: todo add feature
Scenario: add todos in todo list
When je saisis le todo "first todo"
And je saisis le todo "second todo"
Then le todo "first todo" est placé en position 1 dans la liste
And le todo "second todo" est placé en position 2 dans la liste
@giovanettid
giovanettid / todo-steps-zombiejs.js
Last active November 9, 2015 21:52
cucumberjs step with zombiejs page object
module.exports = function() {
this.Before(function (callback) {
todo.before(callback);
});
this.Given(/(\d+) todos dans la liste/, function (nbTodos, callback) {
for(var i=1;i<=parseInt(nbTodos);i++) {
todo.typeNew("todo "+i).enterNew();
@giovanettid
giovanettid / todo-steps-seleniumjs.js
Last active November 9, 2015 21:51
cucumberjs step with seleniumjs page object
module.exports = function() {
this.Before(function (callback) {
todo.before().then(function() {
callback();
});
});
this.After(function (callback) {
todo.after().then(function() {
package com.giovanetti;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate;
import org.springframework.http.HttpStatus;
package com.giovanetti.sample.batch.job;
import com.giovanetti.support.batch.configuration.GenericTestConfiguration;
import com.giovanetti.support.batch.rule.BatchProperties;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.ExpectedSystemExit;
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
package com.giovanetti.sample.batch.job.cucumber;
import com.giovanetti.support.batch.rule.BatchProperties;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(format = {"pretty", "html:target/cucumber-report"},
package com.giovanetti.sample.batch.job;
import com.giovanetti.support.batch.annotations.TechnicalDataSource;
import com.giovanetti.support.batch.function.Consumer;
import com.giovanetti.support.batch.function.Function;
import org.springframework.batch.core.explore.JobExplorer;
import org.springframework.batch.core.explore.support.JobExplorerFactoryBean;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.annotation.Value;
package com.giovanetti.sample.batch.job;
import com.giovanetti.support.batch.configuration.GenericTestConfiguration;
import com.giovanetti.support.batch.rule.BatchProperties;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.ExpectedSystemExit;
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
package com.giovanetti.sample.batch.job.cucumber;
import com.giovanetti.sample.batch.configuration.JobExtractionTestConfiguration;
import com.giovanetti.sample.batch.item.User;
import com.giovanetti.sample.batch.job.JobExtractionConfiguration;
import com.giovanetti.support.batch.annotations.FunctionalDataSource;
import com.ninja_squad.dbsetup.DbSetup;
import com.ninja_squad.dbsetup.destination.DataSourceDestination;
import com.ninja_squad.dbsetup.operation.Insert;