mattermost/e2e-tests/cypress/tests/support/api/brand.js
2023-03-28 18:10:00 +02:00

20 lines
746 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// *****************************************************************************
// Brand
// https://api.mattermost.com/#tag/brand
// *****************************************************************************
Cypress.Commands.add('apiDeleteBrandImage', () => {
return cy.request({
headers: {'X-Requested-With': 'XMLHttpRequest'},
url: '/api/v4/brand/image',
method: 'DELETE',
failOnStatusCode: false,
}).then((response) => {
// both deleted and not existing responses are valid
expect(response.status).to.be.oneOf([200, 404]);
return cy.wrap(response);
});
});