1 async function browserSleep (amount: number) {
2 await browser.pause(amount)
5 function isMobileDevice () {
6 const platformName = (browser.capabilities['platformName'] || '').toLowerCase()
8 return platformName === 'android' || platformName === 'ios'
11 function isSafari () {
12 return browser.capabilities['browserName'] &&
13 browser.capabilities['browserName'].toLowerCase() === 'safari'
17 return isMobileDevice() && isSafari()
20 async function go (url: string) {
21 await browser.url(url)
23 // Hide notifications that could fail tests when hiding buttons
24 await browser.execute(() => {
25 const style = document.createElement('style')
26 style.innerHTML = 'p-toast { display: none }'
27 document.head.appendChild(style)
31 async function waitServerUp () {
32 await browser.waitUntil(async () => {
34 await browserSleep(500)
36 return $('<my-app>').isDisplayed()
37 }, { timeout: 20 * 1000 })