Adding testing function.

master
Thomas Hintz 5 years ago
parent 856ab034d5
commit 802a0efcbb

@ -53,6 +53,17 @@ import { buy, roll, endTurn, loan, trade, submitTradeAccept,
const showScreenDelay = 2000; const showScreenDelay = 2000;
function test() {
if (!document.querySelector('.show-for-large .action-item')) {
setTimeout(test, 500);
} else {
document.querySelector('.show-for-large .action-item').click();
setTimeout(test, 100);
}
}
window.test = test;
function netWorth(player) { function netWorth(player) {
return ((player.assets.hay + player.assets.grain) * 2000) + return ((player.assets.hay + player.assets.grain) * 2000) +
(player.assets.fruit * 5000) + (player.assets.fruit * 5000) +
@ -1377,7 +1388,7 @@ class Harvest extends React.Component {
</div> </div>
{isCurrentPlayer || this.props.currentPlayer.ai ? ( {isCurrentPlayer || this.props.currentPlayer.ai ? (
<div className='center spacer'> <div className='center spacer'>
<Button onClick={() => this.nextView('operating-expense')}>Draw Operating Expense</Button> <Button className="action-item" onClick={() => this.nextView('operating-expense')}>Draw Operating Expense</Button>
</div> </div>
) : (<Fragment />)} ) : (<Fragment />)}
</div> </div>

Loading…
Cancel
Save