You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Apply prettier formatting
This commit is contained in:
@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
/// <reference types="cypress" />
|
||||
import { SnapshotOptions as PercySnapshotOptions } from '@percy/core';
|
||||
import { SnapshotOptions as PercySnapshotOptions } from "@percy/core";
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
@ -39,16 +39,16 @@ declare global {
|
||||
|
||||
Cypress.Commands.add("percySnapshotElement", { prevSubject: "element" }, (subject, name, options) => {
|
||||
cy.percySnapshot(name, {
|
||||
domTransformation: documentClone => scope(documentClone, subject.selector),
|
||||
domTransformation: (documentClone) => scope(documentClone, subject.selector),
|
||||
...options,
|
||||
});
|
||||
});
|
||||
|
||||
function scope(documentClone: Document, selector: string): Document {
|
||||
const element = documentClone.querySelector(selector);
|
||||
documentClone.querySelector('body').innerHTML = element.outerHTML;
|
||||
documentClone.querySelector("body").innerHTML = element.outerHTML;
|
||||
|
||||
return documentClone;
|
||||
}
|
||||
|
||||
export { };
|
||||
export {};
|
||||
|
Reference in New Issue
Block a user