Record completed gateway and native OEE acceptance
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"url": "http://127.0.0.1:18088/data/perspective/client/UIThemeFixture/native/states",
|
||||
"width": 390,
|
||||
"scrollWidth": 390,
|
||||
"platformFontsFor85Percent": {
|
||||
"fonts": [
|
||||
{
|
||||
"familyName": "IBM Plex Sans SemiBold",
|
||||
"postScriptName": "IBMPlexSans-SemiBold",
|
||||
"isCustomFont": true,
|
||||
"glyphCount": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"actions": "Read-only state render; no seed/save/navigation action invoked",
|
||||
"assets": [
|
||||
{
|
||||
"name": "ibm-plex-sans-400.woff2",
|
||||
"http": 200,
|
||||
"canonicalSha256": "db71f8a28ad8501544fb4e7668e3c6d0b731760b6f20de3525ebaeba597f1922"
|
||||
},
|
||||
{
|
||||
"name": "ibm-plex-sans-600.woff2",
|
||||
"http": 200,
|
||||
"canonicalSha256": "31535a91ce3f6b8ed3ddedadab1e49957e2220263a640df1a3f14f6fdfe15eb6"
|
||||
},
|
||||
{
|
||||
"name": "ibm-plex-mono-500.woff2",
|
||||
"http": 200,
|
||||
"canonicalSha256": "756026ff72eb76fd971ac4b7504cec55eef62109d2684c2cad8da32170b80b37"
|
||||
}
|
||||
],
|
||||
"errors": []
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
import json,hashlib
|
||||
from pathlib import Path
|
||||
OUT=Path(__file__).resolve().parent
|
||||
with sync_playwright() as p:
|
||||
b=p.chromium.launch(channel='chromium',headless=True);page=b.new_page(viewport={'width':390,'height':844});errors=[];page.on('pageerror',lambda e:errors.append(str(e)));page.goto('http://127.0.0.1:18088/data/perspective/client/UIThemeFixture/native/states');value=page.get_by_text('85.0%',exact=True).first;value.wait_for();page.evaluate('document.fonts.ready');value.evaluate('e=>e.dataset.peerFontProbe="true"');cdp=page.context.new_cdp_session(page);cdp.send('DOM.enable');cdp.send('CSS.enable');doc=cdp.send('DOM.getDocument');node=cdp.send('DOM.querySelector',{'nodeId':doc['root']['nodeId'],'selector':'[data-peer-font-probe]'});fonts=cdp.send('CSS.getPlatformFontsForNode',{'nodeId':node['nodeId']});assert any(f['isCustomFont'] and 'Plex' in f['familyName'] for f in fonts['fonts']);assets=[]
|
||||
for name in ['ibm-plex-sans-400.woff2','ibm-plex-sans-600.woff2','ibm-plex-mono-500.woff2']:
|
||||
r=page.request.get('http://127.0.0.1:18088/data/perspective/fonts/'+name);assert r.status==200 and r.body()==(Path('/Users/dohertj2/Desktop/ignitionoee/registry/src/Registry.Host/wwwroot/fonts')/name).read_bytes();assets.append({'name':name,'http':200,'canonicalSha256':hashlib.sha256(r.body()).hexdigest()})
|
||||
assert not errors;assert page.evaluate('document.documentElement.scrollWidth<=innerWidth');(OUT/'oee-native-peer.json').write_text(json.dumps({'url':page.url,'width':page.evaluate('innerWidth'),'scrollWidth':page.evaluate('document.documentElement.scrollWidth'),'platformFontsFor85Percent':fonts,'actions':'Read-only state render; no seed/save/navigation action invoked','assets':assets,'errors':errors},indent=2));print(fonts);b.close()
|
||||
Reference in New Issue
Block a user