Fix non working non working migration script with cypress async magic

This commit is contained in:
Patrick Schwarz 2022-09-14 00:14:31 +02:00
parent 2b30b277e7
commit d10cf37bfd

View file

@ -40,14 +40,14 @@ describe('Migrate document', () => {
it('passes', async () => {
// Read list of pads to migrate
cy.fixture('pads').then( pads => {
cy.fixture('pads').then(async(pads) => {
if(pads.length === 0) {
console.log("Didn't find any pad urls to migrate");
}
for (const pad of pads) {
migrateDocument(pad.oldUrl, pad.newUrl);
await migrateDocument(pad.oldUrl, pad.newUrl);
}
})