Move /e2e -> /e2e-tests
Этот коммит содержится в:
21
e2e-tests/cypress/tests/integration/channels/plugins/helpers.js
Обычный файл
21
e2e-tests/cypress/tests/integration/channels/plugins/helpers.js
Обычный файл
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import * as TIMEOUTS from '../../../fixtures/timeouts';
|
||||
|
||||
export function waitForAlertMessage(pluginId, message) {
|
||||
const checkFn = () => {
|
||||
cy.log(`Waiting for ${message}`);
|
||||
return cy.findByTestId(pluginId).scrollIntoView().then((pluginEl) => {
|
||||
return pluginEl[0].innerText.includes(message);
|
||||
});
|
||||
};
|
||||
|
||||
const options = {
|
||||
timeout: TIMEOUTS.TWO_MIN,
|
||||
interval: TIMEOUTS.FIVE_SEC,
|
||||
errorMsg: `Expected "${message}" to be in plugin status but not found.`,
|
||||
};
|
||||
|
||||
return cy.waitUntil(checkFn, options);
|
||||
}
|
||||
Ссылка в новой задаче
Block a user