summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hintz <t@thintz.com>2020-04-29 07:32:57 -0700
committerThomas Hintz <t@thintz.com>2020-04-29 07:32:57 -0700
commit802a0efcbb399e16bec6d791d33d6e81e1b072c0 (patch)
treed5a28da4f26e4e23093903b14edf3c2cf70ceb33
parent856ab034d5c7b73e0fd86c4e1a3e9d8af92f3d00 (diff)
downloadfarm-802a0efcbb399e16bec6d791d33d6e81e1b072c0.tar.gz
Adding testing function.
-rw-r--r--src/components/farm/Board.jsx13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx
index 3c63962..8c1e2fd 100644
--- a/src/components/farm/Board.jsx
+++ b/src/components/farm/Board.jsx
@@ -53,6 +53,17 @@ import { buy, roll, endTurn, loan, trade, submitTradeAccept,
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) {
return ((player.assets.hay + player.assets.grain) * 2000) +
(player.assets.fruit * 5000) +
@@ -1377,7 +1388,7 @@ class Harvest extends React.Component {
</div>
{isCurrentPlayer || this.props.currentPlayer.ai ? (
<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>
) : (<Fragment />)}
</div>