import {multiline} from '../../support/test-utils'; import type {StyleExpectations} from '../globals'; async function loadBasicPage() { await loadTestPage({ '/': multiline( '', '', '', ' ', '', '', '

E2E test page

', '

Text

', ' Link', '', '', ), }); } async function expectStyles(styles: StyleExpectations) { await expectPageStyles(expect, styles); } describe('Modifying config via Developer tools', () => { it('Modifying config', async () => { await loadBasicPage(); await expectStyles([ ['document', 'background-color', 'rgb(24, 26, 27)'], ['document', 'color', 'rgb(232, 230, 227)'], ['body', 'background-color', 'rgb(24, 26, 27)'], ['body', 'color', 'rgb(232, 230, 227)'], ['h1', 'color', 'rgb(255, 26, 26)'], ['a', 'color', 'rgb(51, 145, 255)'], ]); await devtoolsUtils.paste([ '*', '', 'CSS', 'h1 {', ' background: black;', ' color: white;', '}', '', '============================', '', 'nonexistent.com', '', 'CSS', 'h1 {', ' color: red;', '}', '', ].join('\n')); await expectStyles([ ['document', 'background-color', 'rgb(24, 26, 27)'], ['document', 'color', 'rgb(232, 230, 227)'], ['body', 'background-color', 'rgb(24, 26, 27)'], ['body', 'color', 'rgb(232, 230, 227)'], ['h1', 'background-color', 'rgb(0, 0, 0)'], ['h1', 'color', 'rgb(255, 255, 255)'], ['a', 'color', 'rgb(51, 145, 255)'], ]); await devtoolsUtils.reset(); await expectStyles([ ['document', 'background-color', 'rgb(24, 26, 27)'], ['document', 'color', 'rgb(232, 230, 227)'], ['body', 'background-color', 'rgb(24, 26, 27)'], ['body', 'color', 'rgb(232, 230, 227)'], ['h1', 'color', 'rgb(255, 26, 26)'], ['a', 'color', 'rgb(51, 145, 255)'], ]); }); });