feat(web): add light client memory block and scroll animations
This commit is contained in:
parent
769e25a705
commit
e865df33a4
8 changed files with 311 additions and 6 deletions
|
|
@ -37,6 +37,8 @@ with sync_playwright() as p:
|
|||
page.locator('#service-status').filter(has_text='отвечает').wait_for()
|
||||
page.screenshot(path=str(artifacts / 'desktop-hero.png'))
|
||||
page.screenshot(path=str(artifacts / 'desktop-full.png'), full_page=True)
|
||||
page.locator('#light').scroll_into_view_if_needed()
|
||||
page.wait_for_function("document.querySelector('.count').textContent === '120'")
|
||||
page.locator('[data-tab="voice"]').click()
|
||||
assert page.locator('.voice-orbit').count() == 1
|
||||
page.locator('[data-tab="voice"]').press('ArrowRight')
|
||||
|
|
@ -57,7 +59,16 @@ with sync_playwright() as p:
|
|||
page.set_viewport_size({'width': width, 'height': 844})
|
||||
assert not page.evaluate('document.documentElement.scrollWidth > innerWidth'), (locale, width)
|
||||
page.set_viewport_size({'width': 390, 'height': 844})
|
||||
page.evaluate("document.querySelectorAll('.reveal').forEach(e => e.classList.add('in'))")
|
||||
page.screenshot(path=str(artifacts / 'mobile-full.png'), full_page=True)
|
||||
reduced = browser.new_context(viewport={'width': 390, 'height': 844}, reduced_motion='reduce')
|
||||
rp = reduced.new_page()
|
||||
rp.goto(args.url)
|
||||
rp.locator('.light-section').wait_for()
|
||||
assert not rp.evaluate("document.documentElement.classList.contains('motion')")
|
||||
assert rp.locator('.count').inner_text() == '120'
|
||||
assert rp.evaluate("getComputedStyle(document.querySelector('.reveal')).opacity") == '1'
|
||||
reduced.close()
|
||||
page.goto(args.url + '/account')
|
||||
page.locator('.github-login[href="/v1/auth/github/start"]').wait_for()
|
||||
assert page.locator('.github-login').get_attribute('aria-disabled') is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue