Move /e2e -> /e2e-tests
Этот коммит содержится в:
18
e2e-tests/cypress/tests/plugins/post_incoming_webhook.js
Обычный файл
18
e2e-tests/cypress/tests/plugins/post_incoming_webhook.js
Обычный файл
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
const axios = require('axios');
|
||||
|
||||
module.exports = async ({url, data}) => {
|
||||
let response;
|
||||
|
||||
try {
|
||||
response = await axios({method: 'post', url, data});
|
||||
} catch (err) {
|
||||
if (err.response) {
|
||||
response = err.response;
|
||||
}
|
||||
}
|
||||
|
||||
return {status: response.status, data: response.data};
|
||||
};
|
||||
Ссылка в новой задаче
Block a user