@@ -15,10 +15,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
1515 } )
1616 }
1717
18- afterEach ( ( ) => {
19- cy . percySnapshot ( )
20- } )
21-
2218 it ( 'renders with functional browser menu when show-browsers prop is true' , ( ) => {
2319 cy . mountFragment ( HeaderBar_HeaderBarContentFragmentDoc , {
2420 render : ( gqlVal ) => < div class = "border-current border-1 h-700px resize overflow-auto" > < HeaderBarContent gql = { gqlVal } show-browsers = { true } /> </ div > ,
@@ -65,6 +61,10 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
6561 } )
6662
6763 describe ( 'breadcrumbs' , ( ) => {
64+ afterEach ( ( ) => {
65+ cy . percySnapshot ( )
66+ } )
67+
6868 context ( 'with current project' , ( ) => {
6969 const currentProject = {
7070 title : 'app' ,
@@ -142,6 +142,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
142142 cy . percySnapshot ( )
143143 cy . get ( 'body' ) . click ( )
144144 cy . contains ( 'a' , text . docsMenu . firstTest ) . should ( 'not.be.visible' )
145+ cy . percySnapshot ( 'after click' )
145146 } )
146147
147148 it ( 'docs menu has expected links with no current project' , ( ) => {
@@ -166,6 +167,8 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
166167 cy . wrap ( Object . keys ( expectedDocsLinks ) ) . each ( ( linkName : string ) => {
167168 cy . contains ( 'a' , linkName ) . should ( 'have.attr' , 'href' , expectedDocsLinks [ linkName ] )
168169 } )
170+
171+ cy . percySnapshot ( )
169172 } )
170173
171174 context ( 'responsive design' , ( ) => {
@@ -182,6 +185,10 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
182185 } )
183186 } )
184187
188+ afterEach ( ( ) => {
189+ cy . percySnapshot ( )
190+ } )
191+
185192 // https://github.com/cypress-io/cypress/issues/21842
186193 it ( 'shows docs menu correctly on small viewports' , ( ) => {
187194 // Simulate the small viewport.
@@ -226,6 +233,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
226233 } )
227234
228235 cy . contains ( 'a' , '8.7.0' ) . should ( 'be.visible' ) . and ( 'have.attr' , 'href' , 'https://on.cypress.io/changelog#8-7-0' )
236+ cy . percySnapshot ( )
229237 } )
230238
231239 it ( 'shows hint and modal to upgrade to latest version of cypress' , ( ) => {
@@ -323,6 +331,7 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
323331 cy . contains ( cloudViewer . fullName ) . should ( 'be.visible' )
324332 cy . contains ( cloudViewer . email ) . should ( 'be.visible' )
325333 cy . findByRole ( 'button' , { name : text . login . actionLogout } ) . should ( 'be.visible' )
334+ cy . percySnapshot ( )
326335 } )
327336
328337 it ( 'Shows a page name instead of project when a page name is provided' , ( ) => {
@@ -332,9 +341,14 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
332341
333342 cy . contains ( 'Project' ) . should ( 'not.exist' )
334343 cy . contains ( 'Test Page' ) . should ( 'be.visible' )
344+ cy . percySnapshot ( )
335345 } )
336346
337347 describe ( 'prompts' , ( ) => {
348+ afterEach ( ( ) => {
349+ cy . percySnapshot ( )
350+ } )
351+
338352 describe ( 'the CI prompt' , ( ) => {
339353 context ( 'opens on click' , ( ) => {
340354 beforeEach ( ( ) => {
0 commit comments