mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
50bd5b9080
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
18 lines
612 B
TypeScript
18 lines
612 B
TypeScript
type CyGetOptions = Parameters<(typeof cy)['get']>[1];
|
|
|
|
/**
|
|
* Getters
|
|
*/
|
|
export const successToast = () => cy.get('.el-notification:has(.el-notification--success)');
|
|
export const warningToast = () => cy.get('.el-notification:has(.el-notification--warning)');
|
|
export const errorToast = (options?: CyGetOptions) =>
|
|
cy.get('.el-notification:has(.el-notification--error)', options);
|
|
export const infoToast = () => cy.get('.el-notification:has(.el-notification--info)');
|
|
|
|
/**
|
|
* Actions
|
|
*/
|
|
export const clearNotifications = () => {
|
|
successToast().find('.el-notification__closeBtn').click({ multiple: true });
|
|
};
|