[MM-56073] MMCTL delete post command (#27539)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {getAdminAccount} from 'tests/support/env';
|
||||
|
||||
// ***************************************************************
|
||||
// - [#] indicates a test step (e.g. # Go to a page)
|
||||
// - [*] indicates an assertion (e.g. * Check the title)
|
||||
@@ -8,10 +10,16 @@
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @messaging
|
||||
// Group: @channels @deleting_messages
|
||||
|
||||
describe('Message deletion', () => {
|
||||
before(() => {
|
||||
cy.apiUpdateConfig({
|
||||
ServiceSettings: {
|
||||
EnableAPIPostDeletion: true,
|
||||
},
|
||||
});
|
||||
|
||||
// # Login as test user and visit off-topic
|
||||
cy.apiInitSetup({loginAfter: true}).then(({offTopicUrl}) => {
|
||||
cy.visit(offTopicUrl);
|
||||
@@ -70,4 +78,17 @@ describe('Message deletion', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('Permanently delete a post and ensure it\'s reflected in the UI', () => {
|
||||
// # Post message in center.
|
||||
cy.postMessage('test message deletion');
|
||||
|
||||
cy.getLastPostId().then((parentMessageId) => {
|
||||
const admin = getAdminAccount();
|
||||
|
||||
cy.apiDeletePost(parentMessageId, admin, true);
|
||||
|
||||
cy.get(`#post_${parentMessageId}`).should('contain', '(message deleted)');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Ссылка в новой задаче
Block a user