// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. Cypress.Commands.add('apiGetCloudProducts', () => { return cy.request({ headers: {'X-Requested-With': 'XMLHttpRequest'}, url: '/api/v4/cloud/products', method: 'GET', }).then((response) => { expect(response.status).to.equal(200); return cy.wrap({products: response.body}); }); }); Cypress.Commands.add('apiGetCloudSubscription', () => { return cy.request({ headers: {'X-Requested-With': 'XMLHttpRequest'}, url: '/api/v4/cloud/subscription', method: 'GET', }).then((response) => { expect(response.status).to.equal(200); return cy.wrap({subscription: response.body}); }); });