From 5b40122b0e805652df02d939edcfeecd6d9ec848 Mon Sep 17 00:00:00 2001 From: elweyn Date: Thu, 8 Jun 2023 09:44:11 +0200 Subject: [PATCH] Remove async of cypress command and add contribution default value to post edit _id. --- cypress/support/commands.js | 3 +-- webapp/pages/post/edit/_id.vue | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 88836b4f1..2c3826f78 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -49,9 +49,8 @@ Cypress.Commands.add( 'mutate', { prevSubject: true }, (graphQLClient, mutation, variables, response) => { - return new Cypress.Promise(async (resolve, reject) => { + return new Cypress.Promise((resolve, reject) => { graphQLClient.request(mutation, variables).then(() => resolve(graphQLClient)) - }) }) diff --git a/webapp/pages/post/edit/_id.vue b/webapp/pages/post/edit/_id.vue index 7d17babd1..9bdde55da 100644 --- a/webapp/pages/post/edit/_id.vue +++ b/webapp/pages/post/edit/_id.vue @@ -41,7 +41,11 @@ export default { }), }, data() { - return { contribution: {} } + return { + contribution: { + postType: ['Article'], + } + } }, async asyncData(context) { const {