jest + enzyme, using mount(), document.getElementById() returns null on component which appear after _method call
问题 I faced a problem with my jest+enzyme mount() testing. I am testing a function, which switches displaying components. Switch between components: when state.infoDisplayContent = 'mission' a missionControl component is mounted, when state.infoDisplayContent = 'profile' - other component steps in: _modifyAgentStatus () { const { currentAgentProfile, agentsDatabase } = this.state; const agentToMod = currentAgentProfile; if (agentToMod.status === 'Free') { this.setState({ infoDisplayContent: