[web] reduce log noise in CI (#27961)

* [web] reduce noise from CollectPayPalPastDueInvoiceTest

* [web] reduce noise for frontend tests that use Range.getClientRects

* [web] avoid nesting <li> elements in ProjectToolsMoreDropdownButton

RenameProjectMenuItem/CopyProjectMenuItem will return <li> elements.

* [web] avoid clicking on links that navigate away in JSDom

* [web] add mock for location change in JSDom

* [web] add fallback stripe subscription data for test

3.8k lines of log noise!

GitOrigin-RevId: 7adab182487a6c07ac9809c60802e498a0edb0ec
This commit is contained in:
Jakob Ackermann
2025-08-19 08:05:50 +00:00
committed by Copybot
parent 016fcffd56
commit d697f00525
6 changed files with 21 additions and 30 deletions
@@ -25,7 +25,7 @@ const handleAPIError = async (source, id, error) => {
* USERS_COLLECTED: string[],
* }>}
*/
const main = async () => {
export async function collectPastDueInvoices(DRY_RUN = false) {
const attemptInvoiceCollection = async invoice => {
const isPaypal = await isAccountUsingPaypal(invoice)
@@ -84,8 +84,6 @@ const main = async () => {
}
}
const argv = minimist(process.argv.slice(2))
const DRY_RUN = argv.n !== undefined
const INVOICES_COLLECTED = []
const INVOICES_COLLECTED_SUCCESS = []
const USERS_COLLECTED = []
@@ -105,19 +103,22 @@ const main = async () => {
}
} finally {
logger.info(
`DONE (DRY_RUN=${DRY_RUN}). ${INVOICES_COLLECTED.length} invoices collection attempts for ${USERS_COLLECTED.length} users. ${INVOICES_COLLECTED_SUCCESS.length} successful collections`
)
console.dir(
{
INVOICES_COLLECTED,
INVOICES_COLLECTED_SUCCESS,
USERS_COLLECTED,
},
{ maxArrayLength: null }
`DONE (DRY_RUN=${DRY_RUN}). ${INVOICES_COLLECTED.length} invoices collection attempts for ${USERS_COLLECTED.length} users. ${INVOICES_COLLECTED_SUCCESS.length} successful collections`
)
}
}
async function main() {
const argv = minimist(process.argv.slice(2))
const DRY_RUN = argv.n !== undefined
await collectPastDueInvoices(DRY_RUN)
}
if (fileURLToPath(import.meta.url) === process.argv[1]) {
try {
await scriptRunner(main)
@@ -128,5 +129,3 @@ if (fileURLToPath(import.meta.url) === process.argv[1]) {
process.exit(1)
}
}
export default { main }