Skip to content

Instantly share code, notes, and snippets.

View tuliobluz's full-sized avatar

Túlio Luz tuliobluz

  • Berlin, Germany
View GitHub Profile
@tuliobluz
tuliobluz / spec.feature
Created June 11, 2018 17:41
spec.feature
Feature: Fill the name
Scenario: Fill the name to see with hello
Given The user go to "https://angularjs.org/"
When The user adds "Tulio" in the name field
Then The user should see Hello with the username
@tuliobluz
tuliobluz / spec.spec.js
Last active August 1, 2018 13:18
spec.spec.js
let specPage = require('../pages/spec.po.js');
let chai = require('chai');
let chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
let expect = chai.expect;
Before(function(){
specPage.init();
})
@tuliobluz
tuliobluz / spec.po.js
Last active November 15, 2018 10:21
spec.po.js
let nameInput,
greeting;
module.exports = {
init: () => {
nameInput = element(by.model('yourName'));
greeting = element(by.binding('yourName'));
},
get: (string) => {
@tuliobluz
tuliobluz / protractor.conf.js
Last active November 7, 2018 13:17
protractor.conf.js
/*
Basic configuration to run your cucumber
feature files and step definitions with protractor.
**/
exports.config = {
capabilities: {
//ignoreSynchronization: true,
browserName: 'chrome',
@tuliobluz
tuliobluz / spec.spec.js
Last active August 1, 2018 13:07
spec.spec.js
let specPage = require('../pages/spec.po.js');
describe('angularjs homepage', function() {
it('should greet the named user', function() {
specPage.init();
specPage.get();
specPage.setName('Julie');
expect(specPage.getGreetingText()).toEqual('Hello Julie!');
});
@tuliobluz
tuliobluz / spec.po.js
Last active August 1, 2018 13:02
spec.po.js
let nameInput,
greeting;
module.exports = {
init: () => {
nameInput = element(by.model('yourName'));
greeting = element(by.binding('yourName'));
},
get: (string) => {
@tuliobluz
tuliobluz / Dockerfile
Created October 8, 2018 15:56
Dockerfile
FROM ubuntu:16.04
RUN mkdir -p /usr/app/protractor
WORKDIR /usr/app/protractor
ADD . .
RUN apt-get update
RUN apt-get install -y curl wget dpkg
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
@tuliobluz
tuliobluz / package.json
Created October 8, 2018 15:58
package.json
{
"name": "tests",
"version": "1.0.0",
"description": "protractor with cucumber and pageobject",
"main": "index.js",
"scripts": {
"pree2e": "webdriver-manager start & sleep 5",
"webdriver-update": "./node_modules/protractor/bin/webdriver-manager update --versions.chrome 2.37",
"e2e": "protractor protractor.docker.conf.js"
},
@tuliobluz
tuliobluz / protractor.docker.conf.js
Last active November 19, 2018 15:28
protractor.docker.conf.js
/*
Basic configuration to run your cucumber
feature files and step definitions with protractor.
**/
exports.config = {
capabilities: {
//ignoreSynchronization: true,
browserName: 'chrome',
# Usage:
# docker-compose up --force-recreate
version: '2.1'
services:
#--------------#
zalenium:
image: "dosel/zalenium"
container_name: zalenium
hostname: zalenium