This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("should render a text box with no string inside if search string is not provided by store", () => { | |
const testState = { | |
showBox: { | |
search: "" | |
} | |
}; | |
const store = createMockStore(testState) | |
const component = shallowWithStore(<ConnectedShowBox />, store); | |
component.dive().find("form > div > input").simulate("change", { target: { value: "Site" } }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(component.find("").prop("value")).to.equal("") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('ConnectedShowBox', () => { | |
it("should render a text box with empty string inside if string is not provided by store", () => { | |
const testState = { | |
searchBox: { | |
search: "" | |
} | |
}; | |
const store = createMockStore(testState) | |
const component = shallowWithStore(<ConnectedSearchBox />, store); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('ConnectedShowBox', () => { | |
it("should render successfully if string is not provided by store", () => { | |
const testState = { | |
showBox: {} | |
}; | |
const store = createMockStore(testState) | |
const component = shallowWithStore(<ConnectedShowBox />, store); | |
expect(component).to.be.a('object'); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('ConnectedShowBox', () => { | |
it("should render a text box with empty string inside if string is not provided by store", () => { | |
const testState = { | |
searchBox: {} | |
}; | |
const store = createMockStore(testState) | |
const component = shallowWithStore(<ConnectedShowBox />, store); | |
expect(component).to.be.a('object'); | |
expect(component.dive().find("").prop("value")).to.equal("") | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { shallow } from 'enzyme'; | |
const shallowWithStore = (component, store) => { | |
const context = { | |
store, | |
}; | |
return shallow(component, { context }); | |
}; | |
export default shallowWithStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { connect } from 'react-redux' | |
import { submitValue } from '../store/modules/showBox' | |
export class ShowBox extends React.Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
searchString: this.props.search || "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$+h:: | |
GetKeyState, state, s, P ; D if CapsLock is ON or U otherwise. | |
if state = D | |
{ | |
if isCancelled != 1 | |
{ | |
isCancelled = 1 | |
Send {Shift down}{Left}{Shift up} | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Package generated configuration file | |
# See the sshd_config(5) manpage for details | |
# What ports, IPs and protocols we listen for | |
Port 22 | |
# Use these options to restrict which interfaces/protocols sshd will bind to | |
#ListenAddress :: | |
#ListenAddress 0.0.0.0 | |
Protocol 2 | |
# HostKeys for protocol version 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by visualskyrim on 17/01/20. | |
*/ | |
import org.apache.kafka.common.serialization.StringDeserializer | |
import org.apache.spark._ | |
import org.apache.spark.streaming._ | |
import org.apache.spark.streaming.kafka010._ | |
import org.apache.spark.streaming.kafka010.LocationStrategies.PreferConsistent | |
import org.apache.spark.streaming.kafka010.ConsumerStrategies.Subscribe |