Move /e2e -> /e2e-tests
Этот коммит содержится в:
14
e2e-tests/cypress/tests/support/notification.ts
Обычный файл
14
e2e-tests/cypress/tests/support/notification.ts
Обычный файл
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// Stub the browser notification API with the given name and permission
|
||||
export function spyNotificationAs(name: string, permission: NotificationPermission) {
|
||||
cy.window().then((win) => {
|
||||
win.Notification = Notification;
|
||||
win.Notification.requestPermission = () => Promise.resolve(permission);
|
||||
|
||||
cy.stub(win, 'Notification').as(name);
|
||||
});
|
||||
|
||||
cy.window().should('have.property', 'Notification');
|
||||
}
|
||||
Ссылка в новой задаче
Block a user