Skip to content

Commit 7629f91

Browse files
committed
test(cypress): clear cache after running OCC commands
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent ac9b794 commit 7629f91

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cypress/support/commands.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,11 @@ Cypress.Commands.add('userFileExists', (user: string, path: string) => {
246246
return cy.runCommand(`stat --printf="%s" "data/${user}/files/${path}"`, { failOnNonZeroExit: true })
247247
.then((exec) => Number.parseInt(exec.stdout || '0'))
248248
})
249+
250+
Cypress.Commands.overwrite('runOccCommand', (original, command: string, options?: Partial<Cypress.ExecOptions>) => {
251+
original(command, options)
252+
.then((context) => {
253+
cy.wait(3000) // OCC cannot clear the APCu cache
254+
return context
255+
})
256+
})

0 commit comments

Comments
 (0)