fix(editor): Fix workflow moving E2E tests (#13396)

Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
Csaba Tuncsik
2025-02-20 16:35:15 +01:00
committed by GitHub
parent ca76ef4bc2
commit 073b05b10c
2 changed files with 36 additions and 19 deletions

View File

@@ -13,10 +13,12 @@ export const infoToast = () => cy.get('.el-notification:has(.el-notification--in
* Actions
*/
export const clearNotifications = () => {
const buttons = successToast().find('.el-notification__closeBtn');
buttons.then(($buttons) => {
if ($buttons.length) {
buttons.click({ multiple: true });
const notificationSelector = '.el-notification:has(.el-notification--success)';
cy.get('body').then(($body) => {
if ($body.find(notificationSelector).length) {
cy.get(notificationSelector)
.find('.el-notification__closeBtn')
.click({ multiple: true, force: true });
}
});
};