Skip to content

Instantly share code, notes, and snippets.

View wlsf82's full-sized avatar
👨‍💻

Walmyr wlsf82

👨‍💻
View GitHub Profile
describe("Home page", () => {
beforeEach(() => cy.exec("npm run drop-db"));
context("With items state", () => {
const min = 6;
const max = 54;
beforeEach(() => {
cy.exec("npm run seed-db");
cy.visit("/");
##|12:09:54.366 [go] Job Started: 2018-02-06 12:09:54 UTC
##|12:09:54.366
pr|12:09:54.366 [go] Start to prepare webfrontend-periodic-tests-prod/1282/protractor-tests/2/e2e-tests-chrome on ip-172-31-22-172 [/var/lib/go-agent]
pr|12:09:54.369 [go] Start to update materials.
pr|12:09:54.369
pr|12:09:54.370 [go] Start updating files at revision b38cedbde0666c9c8673ba69bee77b5df2b50ec4 from git@github.com:appearin/appearin-webfrontend.git
pr|12:09:54.473 [GIT] Fetching changes
pr|12:09:55.789 [GIT] Performing git gc
pr|12:09:55.792 [GIT] Reset working directory pipelines/webfrontend-periodic-tests-prod
pr|12:09:55.792 [GIT] Cleaning all unversioned files in working copy
// .gitignore
node_modules
// package.json
{
"name": "protractor-tests",
"version": "0.0.2",
"devDependencies": {
"jasmine-spec-reporter": "^2.4.0",
"protractor": "5.2.0",
// sayHi.js
const sayHi = (name) => (typeof name !== "string" || name === "" || name === " ") ? "Hi!" : "Hi, " + name + "!"
// sayHi.spec.js
let assert = require("chai").assert;
describe("chai tests for sayHi function", () => {
it("should say hi to Chai", () => assert.equal(sayHi("Chai"), "Hi, Chai!"));
it("should say hi to Walmyr", () => assert.equal(sayHi("Walmyr"), "Hi, Walmyr!"));
import React, { Component } from 'react';
import './App.css';
const DEFAULT_QUERY = "redux";
const PATH_BASE = "https://hn.algolia.com/api/v1";
const PATH_SEARCH = "/search";
const PARAM_SEARCH = "query=";
const isSearched = (searchTerm) => (item) =>
"use strict";
const AppearInRoom = require("../page-objects/appearInRoom");
const Helper = require("../helper");
const RoomActivity = require("../page-objects/roomActivity");
const shortid = require("shortid");
describe("Activity list", () => {
const appearInRoom = new AppearInRoom();
const helper = new Helper();
// And here is the solution I'm trying to implement
// page object file
"use strict";
const defaultTimeout = 10000;
class RoomActivity {
constructor () {
// This is how the test is today.
"use strict";
const AppearInRoom = require("../page-objects/appearInRoom");
const Helper = require("../helper");
const RoomActivity = require("../page-objects/roomActivity");
const shortid = require("shortid");
describe("Activity list", () => {
// helper.js file
"use strict";
const expectedConditionTimeout = 10000;
function elementWithAttributeHasValue(htmlElement, attribute, value) {
return htmlElement.getAttribute(attribute).then((elementAttribute) => {
return elementAttribute.includes(value);
});
@wlsf82
wlsf82 / plugin-github.oauth.login.log
Created December 21, 2016 08:28
Error when trying to login using gocd-oauth-login plugin
2016-12-21 08:18:59,551 ERROR [qtp423385352-25] OAuthLoginPlugin:77 - Error occurred while OAuth authenticate.
org.brickred.socialauth.exception.SocialAuthException: Verification code is null
at org.brickred.socialauth.oauthstrategy.OAuth2.verifyResponse(OAuth2.java:148)
at org.brickred.socialauth.provider.GitHubImpl.doVerifyResponse(GitHubImpl.java:151)
at org.brickred.socialauth.provider.GitHubImpl.verifyResponse(GitHubImpl.java:141)
at org.brickred.socialauth.SocialAuthManager.connect(SocialAuthManager.java:184)
at com.tw.go.plugin.OAuthLoginPlugin.handleAuthenticateWebRequest(OAuthLoginPlugin.java:249)
at com.tw.go.plugin.OAuthLoginPlugin.handle(OAuthLoginPlugin.java:106)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:190)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$2.execute(DefaultPluginManager.java:185)