Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update selenium version #1689

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,20 @@ jobs:

services:
hub:
image: selenium/hub:4.20.0-20240425
image: selenium/hub:4.23.0-20240727
ports:
- 4442:4442
- 4443:4443
- 4444:4444
firefox:
image: selenium/node-firefox:4.20.0-20240425
image: selenium/node-firefox:4.23.0-20240727
env:
SE_EVENT_BUS_HOST: hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
options: --shm-size="2g"
chrome:
image: selenium/node-chrome:4.20.0-20240425
image: selenium/node-chrome:4.23.0-20240727
env:
SE_EVENT_BUS_HOST: hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
Expand Down
82 changes: 49 additions & 33 deletions src/lib/adapters/NextcloudBookmarks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,41 +800,57 @@ export default class NextcloudBookmarksAdapter implements Adapter, BulkImportRes

Logger.log(`QUEUING ${verb} ${url}`)

if (Capacitor.getPlatform() !== 'web') {
return this.sendRequestNative(verb, url, type, body, returnRawResponse)
}
let i = 0
let isError = false

const authString = Base64.encode(
this.server.username + ':' + this.server.password
)
do {
try {
if (Capacitor.getPlatform() !== 'web') {
return this.sendRequestNative(verb, url, type, body, returnRawResponse)
}

try {
res = await this.fetchQueue.add(() => {
Logger.log(`FETCHING ${verb} ${url}`)
return Promise.race([
fetch(url, {
method: verb,
credentials: this.server.includeCredentials ? 'include' : 'omit',
headers: {
...(type && type !== 'multipart/form-data' && { 'Content-type': type }),
Authorization: 'Basic ' + authString,
},
signal: this.abortSignal,
...(body && !['get', 'head'].includes(verb.toLowerCase()) && { body }),
}),
new Promise((resolve, reject) =>
setTimeout(() => {
timedOut = true
reject(new RequestTimeoutError())
}, TIMEOUT)
),
])
})
} catch (e) {
if (timedOut) throw e
if (this.canceled) throw new CancelledSyncError()
console.log(e)
throw new NetworkError()
const authString = Base64.encode(
this.server.username + ':' + this.server.password
)

try {
res = await this.fetchQueue.add(() => {
Logger.log(`FETCHING ${verb} ${url}`)
return Promise.race([
fetch(url, {
method: verb,
credentials: this.server.includeCredentials ? 'include' : 'omit',
headers: {
...(type && type !== 'multipart/form-data' && { 'Content-type': type }),
Authorization: 'Basic ' + authString,
},
signal: this.abortSignal,
...(body && !['get', 'head'].includes(verb.toLowerCase()) && { body }),
}),
new Promise((resolve, reject) =>
setTimeout(() => {
timedOut = true
reject(new RequestTimeoutError())
}, TIMEOUT)
),
])
})
} catch (e) {
if (timedOut) throw e
if (this.canceled) throw new CancelledSyncError()
console.log(e)
throw new NetworkError()
}
isError = false
} catch (e) {
isError = e
await new Promise((resolve) => setTimeout(resolve, 1000 * 2 ** i))
}
i++
} while (i < 6 && isError)

if (isError) {
throw isError
}

Logger.log(`Receiving response for ${verb} ${url}`)
Expand Down
6 changes: 4 additions & 2 deletions src/ui/NativeApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ body {
padding-left: env(safe-area-inset-left);
padding-right: env(sage-area-inset-right);
background: v-bind(background);
font-size: 0.45cm !important;
font-size: 0.55cm !important;
font: -apple-system-body;
}

html {
font-size: 0.45cm !important;
font-size: 0.55cm !important;
font: -apple-system-body;
}

.v-navigation-drawer {
Expand Down
Loading