When a firm has an online assessment as its second stage, will it still take into account the written application when deciding to move a candidate to the next stage, or will this mostly be determined by performance in the assessment?
As
@Abbie Whitlock mentioned, it can be both. If progression to the second stage is selective - ie they review your application before sending you the test, it is less likely your written application will be reviewed as thoroughly/weighed as heavily as in the case of automatic progression.
More likely, in the situation in which your application is initially screened and is one of the few to be progressed, the firm will only look at it again after you complete the test to take into account high-level information when making a decision, rather than repeating the first stage in their review.
That said, some firms operate a "benchmark" approach, which means they use the online tests simply to the percentage of candidates who meet it to be considered for progression, while the others are automatically rejected. Those that meet the threshold will then be more throughly reviewed and compared based on their written application. As Abbie suggested, you can sometimes glance whether a firm has this type of assessment method by looking in their FAQs section.