Skip to content

Instantly share code, notes, and snippets.

View wlsf82's full-sized avatar
👨‍💻

Walmyr wlsf82

👨‍💻
View GitHub Profile
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
roomActivity.listItems.count().then((numberOfItemsAfterRemoval) => {
expect(numberOfItemsAfterRemoval).toEqual(numberOfItemsBeforeRemoval - 1);
});
roomActivity.listItems.filter((elem) => {
return elem.getText().then((text) => {
return text === randomRoomName.toLowerCase();
});
}).click();
// Inside page object file
this.languageLinks = element.all(by.css('.language a'));
// Inside spec file
it('languages', function() {
var languagesArray = [
'Españolskldfjsldfjsl',
'English'
];
@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)
// helper.js file
"use strict";
const expectedConditionTimeout = 10000;
function elementWithAttributeHasValue(htmlElement, attribute, value) {
return htmlElement.getAttribute(attribute).then((elementAttribute) => {
return elementAttribute.includes(value);
});
// 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", () => {
// And here is the solution I'm trying to implement
// page object file
"use strict";
const defaultTimeout = 10000;
class RoomActivity {
constructor () {
"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();
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) =>