forked from cadence/breezewiki
		
	Test for proxy links with class image
This commit is contained in:
		
							parent
							
								
									2e6fa6088b
								
							
						
					
					
						commit
						9c05e95f07
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -52,7 +52,7 @@
 | 
			
		|||
                        (a (@ (data-test-wikilink) (href "https://test.fandom.com/wiki/Another_Page") (title "Another Page"))
 | 
			
		||||
                           "Another Page"))))
 | 
			
		||||
           (figure (@ (class "thumb tnone"))
 | 
			
		||||
                   (a (@ (href "https://static.wikia.nocookie.net/nice-image.png") (class "image"))
 | 
			
		||||
                   (a (@ (href "https://static.wikia.nocookie.net/nice-image.png") (class "image") (data-test-figure-a))
 | 
			
		||||
                      (img (@ (src "data:image/gif;base64,R0lGODlhAQABAIABAAAAAP///yH5BAEAAAEALAAAAAABAAEAQAICTAEAOw%3D%3D")
 | 
			
		||||
                              (data-src "https://static.wikia.nocookie.net/nice-image-thumbnail.png")
 | 
			
		||||
                              (class "thumbimage lazyload"))))
 | 
			
		||||
| 
						 | 
				
			
			@ -255,6 +255,11 @@
 | 
			
		|||
                                        (λ (t a c) (and (eq? t 'a) (has-class? "image-thumbnail" a)))
 | 
			
		||||
                                        transformed))))
 | 
			
		||||
                "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fnice-image.png")
 | 
			
		||||
  (check-equal? (get-attribute 'href (bits->attributes
 | 
			
		||||
                                      ((query-selector
 | 
			
		||||
                                        (λ (t a c) (member '(data-test-figure-a) a))
 | 
			
		||||
                                        transformed))))
 | 
			
		||||
                "/proxy?dest=https%3A%2F%2Fstatic.wikia.nocookie.net%2Fnice-image.png")
 | 
			
		||||
  ; check that noscript images are removed
 | 
			
		||||
  (check-equal? ((query-selector (λ (t a c) (eq? t 'noscript)) transformed)) #f))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue