|
1 |
| -// Vitest Snapshot v1 |
| 1 | +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
3 | 3 | exports[`generateOverlayTemplate > generates proper template 1`] = `
|
4 |
| -"<div class=\\"cp-visual-regression-diff-overlay runner\\" style=\\"position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column\\"> |
5 |
| - <header style=\\"position:static\\"> |
6 |
| - <nav style=\\"display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;\\"> |
| 4 | +"<div class="cp-visual-regression-diff-overlay runner" style="position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column"> |
| 5 | + <header style="position:static"> |
| 6 | + <nav style="display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;"> |
7 | 7 | <h2>some title - screenshot diff</h2>
|
8 |
| - <form style=\\"display:flex;align-items:center;gap:5px;text-align:right\\"> |
9 |
| - <button type=\\"submit\\"><i class=\\"fa fa-check\\"></i> Update screenshot</button> |
10 |
| - <button type=\\"button\\" data-type=\\"close\\"><i class=\\"fa fa-times\\"></i> Close</button> |
| 8 | + <form style="display:flex;align-items:center;gap:5px;text-align:right"> |
| 9 | + <button type="submit"><i class="fa fa-check"></i> Update screenshot</button> |
| 10 | + <button type="button" data-type="close"><i class="fa fa-times"></i> Close</button> |
11 | 11 | <form>
|
12 | 12 | </nav>
|
13 | 13 | </header>
|
14 |
| - <div style=\\"padding:15px;overflow:auto\\"> |
15 |
| - <div style=\\"display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px\\"> |
| 14 | + <div style="padding:15px;overflow:auto"> |
| 15 | + <div style="display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px"> |
16 | 16 | <div
|
17 |
| - style=\\"position:relative;background:#fff;border:solid 15px #fff\\" |
18 |
| - onmouseover=\\"this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1\\" |
19 |
| - onmouseleave=\\"this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0\\" |
| 17 | + style="position:relative;background:#fff;border:solid 15px #fff" |
| 18 | + onmouseover="this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1" |
| 19 | + onmouseleave="this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0" |
20 | 20 | >
|
21 | 21 | <h3>New screenshot (hover mouse away too see the old one):</h3>
|
22 |
| - <img style=\\"min-width:300px;width:100%;opacity:0\\" src=\\"data:image/png;base64,img-new-base64\\" /> |
23 |
| - <div style=\\"position:absolute;top:0;left:0;background:#fff\\"> |
| 22 | + <img style="min-width:300px;width:100%;opacity:0" src="data:image/png;base64,img-new-base64" /> |
| 23 | + <div style="position:absolute;top:0;left:0;background:#fff"> |
24 | 24 | <h3>Old screenshot (hover over to see the new one):</h3>
|
25 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-old-base64\\" /> |
| 25 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-old-base64" /> |
26 | 26 | </div>
|
27 | 27 | </div>
|
28 |
| - <div style=\\"background:#fff;border:solid 15px #fff\\"> |
| 28 | + <div style="background:#fff;border:solid 15px #fff"> |
29 | 29 | <h3>Diff between new and old screenshot</h3>
|
30 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-diff-base64\\" /> |
| 30 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-diff-base64" /> |
31 | 31 | </div>
|
32 | 32 | </div>
|
33 | 33 | </div>
|
34 | 34 | </div>"
|
35 | 35 | `;
|
36 | 36 |
|
37 | 37 | exports[`generateOverlayTemplate > generates proper template 2`] = `
|
38 |
| -"<div class=\\"cp-visual-regression-diff-overlay runner\\" style=\\"position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column\\"> |
39 |
| - <header style=\\"position:static\\"> |
40 |
| - <nav style=\\"display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;\\"> |
| 38 | +"<div class="cp-visual-regression-diff-overlay runner" style="position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column"> |
| 39 | + <header style="position:static"> |
| 40 | + <nav style="display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;"> |
41 | 41 | <h2>some title - screenshot diff</h2>
|
42 |
| - <form style=\\"display:flex;align-items:center;gap:5px;text-align:right\\"> |
| 42 | + <form style="display:flex;align-items:center;gap:5px;text-align:right"> |
43 | 43 | Image was already updated, rerun test to see new comparison
|
44 |
| - <button type=\\"button\\" data-type=\\"close\\"><i class=\\"fa fa-times\\"></i> Close</button> |
| 44 | + <button type="button" data-type="close"><i class="fa fa-times"></i> Close</button> |
45 | 45 | <form>
|
46 | 46 | </nav>
|
47 | 47 | </header>
|
48 |
| - <div style=\\"padding:15px;overflow:auto\\"> |
49 |
| - <div style=\\"display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px\\"> |
| 48 | + <div style="padding:15px;overflow:auto"> |
| 49 | + <div style="display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px"> |
50 | 50 | <div
|
51 |
| - style=\\"position:relative;background:#fff;border:solid 15px #fff\\" |
52 |
| - onmouseover=\\"this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1\\" |
53 |
| - onmouseleave=\\"this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0\\" |
| 51 | + style="position:relative;background:#fff;border:solid 15px #fff" |
| 52 | + onmouseover="this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1" |
| 53 | + onmouseleave="this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0" |
54 | 54 | >
|
55 | 55 | <h3>New screenshot (hover mouse away too see the old one):</h3>
|
56 |
| - <img style=\\"min-width:300px;width:100%;opacity:0\\" src=\\"data:image/png;base64,img-new-base64\\" /> |
57 |
| - <div style=\\"position:absolute;top:0;left:0;background:#fff\\"> |
| 56 | + <img style="min-width:300px;width:100%;opacity:0" src="data:image/png;base64,img-new-base64" /> |
| 57 | + <div style="position:absolute;top:0;left:0;background:#fff"> |
58 | 58 | <h3>Old screenshot (hover over to see the new one):</h3>
|
59 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-old-base64\\" /> |
| 59 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-old-base64" /> |
60 | 60 | </div>
|
61 | 61 | </div>
|
62 |
| - <div style=\\"background:#fff;border:solid 15px #fff\\"> |
| 62 | + <div style="background:#fff;border:solid 15px #fff"> |
63 | 63 | <h3>Diff between new and old screenshot</h3>
|
64 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-diff-base64\\" /> |
| 64 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-diff-base64" /> |
65 | 65 | </div>
|
66 | 66 | </div>
|
67 | 67 | </div>
|
68 | 68 | </div>"
|
69 | 69 | `;
|
70 | 70 |
|
71 | 71 | exports[`generateOverlayTemplate > generates proper template 3`] = `
|
72 |
| -"<div class=\\"cp-visual-regression-diff-overlay runner\\" style=\\"position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column\\"> |
73 |
| - <header style=\\"position:static\\"> |
74 |
| - <nav style=\\"display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;\\"> |
| 72 | +"<div class="cp-visual-regression-diff-overlay runner" style="position:fixed;z-index:10;top:0;bottom:0;left:0;right:0;display:flex;flex-flow:column"> |
| 73 | + <header style="position:static"> |
| 74 | + <nav style="display:flex;width:100%;align-items:center;justify-content:space-between;padding:10px 15px;"> |
75 | 75 | <h2>some title - screenshot diff</h2>
|
76 |
| - <form style=\\"display:flex;align-items:center;gap:5px;text-align:right\\"> |
| 76 | + <form style="display:flex;align-items:center;gap:5px;text-align:right"> |
77 | 77 |
|
78 |
| - <button type=\\"button\\" data-type=\\"close\\"><i class=\\"fa fa-times\\"></i> Close</button> |
| 78 | + <button type="button" data-type="close"><i class="fa fa-times"></i> Close</button> |
79 | 79 | <form>
|
80 | 80 | </nav>
|
81 | 81 | </header>
|
82 |
| - <div style=\\"padding:15px;overflow:auto\\"> |
83 |
| - <div style=\\"display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px\\"> |
| 82 | + <div style="padding:15px;overflow:auto"> |
| 83 | + <div style="display:flex;justify-content:space-evenly;align-items:flex-start;gap:15px"> |
84 | 84 | <div
|
85 |
| - style=\\"position:relative;background:#fff;border:solid 15px #fff\\" |
86 |
| - onmouseover=\\"this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1\\" |
87 |
| - onmouseleave=\\"this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0\\" |
| 85 | + style="position:relative;background:#fff;border:solid 15px #fff" |
| 86 | + onmouseover="this.querySelector('div').style.opacity=0,this.querySelector('img').style.opacity=1" |
| 87 | + onmouseleave="this.querySelector('div').style.opacity=1,this.querySelector('img').style.opacity=0" |
88 | 88 | >
|
89 | 89 | <h3>New screenshot (hover mouse away too see the old one):</h3>
|
90 |
| - <img style=\\"min-width:300px;width:100%;opacity:0\\" src=\\"data:image/png;base64,img-new-base64\\" /> |
91 |
| - <div style=\\"position:absolute;top:0;left:0;background:#fff\\"> |
| 90 | + <img style="min-width:300px;width:100%;opacity:0" src="data:image/png;base64,img-new-base64" /> |
| 91 | + <div style="position:absolute;top:0;left:0;background:#fff"> |
92 | 92 | <h3>Old screenshot (hover over to see the new one):</h3>
|
93 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-old-base64\\" /> |
| 93 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-old-base64" /> |
94 | 94 | </div>
|
95 | 95 | </div>
|
96 |
| - <div style=\\"background:#fff;border:solid 15px #fff\\"> |
| 96 | + <div style="background:#fff;border:solid 15px #fff"> |
97 | 97 | <h3>Diff between new and old screenshot</h3>
|
98 |
| - <img style=\\"min-width:300px;width:100%\\" src=\\"data:image/png;base64,img-diff-base64\\" /> |
| 98 | + <img style="min-width:300px;width:100%" src="data:image/png;base64,img-diff-base64" /> |
99 | 99 | </div>
|
100 | 100 | </div>
|
101 | 101 | </div>
|
|
0 commit comments