text: import puppeteer from 'puppeteer';
  import { VisualDiff } from '@brightspace-ui/visual-diff';
  
  describe('d2l-daylight-icon-library', () => {
  
  	const visualDiff = new VisualDiff('icon-library', import.meta.url);
  
  	let browser, page;
  
  	before(async() => {
  		browser = await puppeteer.launch();
  		page = await visualDiff.createPage(browser);
  		await page.setViewport({ width: 800, height: 10000, deviceScaleFactor: 2 });
  		await page.goto(`${visualDiff.getBaseUrl()}/test/visual-diff/icon-library.visual-diff.html`, { waitUntil: ['networkidle0', 'load'] });
  		await page.bringToFront();
  	});
  
  	beforeEach(async() => {
  		await visualDiff.resetFocus(page);
  	});
  
  	after(async() => {
  		await browser.close();
  	});
  
  	it('default', async function() {
  		const rect = await visualDiff.getRect(page, '#default');
  		await visualDiff.screenshotAndCompare(page, this.test.fullTitle(), { captureBeyondViewport: false, clip: rect });
  	});
  
  	it('search that all categories contain', async function() {
  		await page.$eval('#default', async(elem) => {
  			const search = elem.shadowRoot.querySelector('d2l-input-search');
  			search.value = 'an';
  			search.search();
  			await elem.updateComplete;
  		});
  		const rect = await visualDiff.getRect(page, '#default');
  		await visualDiff.screenshotAndCompare(page, this.test.fullTitle(), { captureBeyondViewport: false, clip: rect });
  	});
  
  	it('search that one category contains', async function() {
  		await page.$eval('#default', async(elem) => {
  			const search = elem.shadowRoot.querySelector('d2l-input-search');
  			search.value = 'important';
  			search.search();
  			await elem.updateComplete;
  		});
  		const rect = await visualDiff.getRect(page, '#default');
  		await visualDiff.screenshotAndCompare(page, this.test.fullTitle(), { captureBeyondViewport: false, clip: rect });
  	});
  
  	it('search that no category contains', async function() {
  		await page.$eval('#default', async(elem) => {
  			const search = elem.shadowRoot.querySelector('d2l-input-search');
  			search.value = 'asdf';
  			search.search();
  			await elem.updateComplete;
  		});
  		const rect = await visualDiff.getRect(page, '#default');
  		await visualDiff.screenshotAndCompare(page, this.test.fullTitle(), { captureBeyondViewport: false, clip: rect });
  	});
  });
  