[MM-56073] MMCTL delete post command (#27539)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
Ben Cooke
2024-10-08 10:45:31 -04:00
коммит произвёл GitHub
родитель a671f80d2c
Коммит b3c7ef0b97
39 изменённых файлов: 1246 добавлений и 152 удалений

Просмотреть файл

@@ -74,11 +74,11 @@ function apiCreatePost(channelId: string, message: string, rootId: string, props
Cypress.Commands.add('apiCreatePost', apiCreatePost);
function apiDeletePost(postId: string, user: User = getAdminAccount()): Cypress.Chainable<{status: number}> {
function apiDeletePost(postId: string, user: User = getAdminAccount(), permanent = false): Cypress.Chainable<{status: number}> {
return cy.externalRequest({
user,
method: 'delete',
path: `posts/${postId}`,
path: `posts/${postId}?permanent=${permanent}`,
}).then((response) => {
// * Validate that request was successful
expect(response.status).to.equal(200);