@@ -27,7 +27,6 @@ import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
2727import AuthToken from './AuthToken.vue'
2828import AuthTokenDeleteDialog from './AuthTokenDeleteDialog.vue'
2929import { TokenType , useAuthTokenStore } from '../store/authtoken.ts'
30- import { detect } from '../utils/userAgentDetect.ts'
3130
3231function makeToken ( overrides : Partial < IToken > = { } ) : IToken {
3332 return {
@@ -193,50 +192,3 @@ describe('AuthTokenDeleteDialog wipe-pending warning', () => {
193192 } )
194193} )
195194
196- describe ( 'Android Chrome detection' , ( ) => {
197- it ( 'modern Android Chrome (no Build/ string, post-2021) should match androidChrome' , ( ) => {
198- const ua = 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Mobile Safari/537.36'
199- expect ( detect ( ua ) ) . toEqual ( {
200- id : 'androidChrome' ,
201- version : '132' ,
202- } )
203- } )
204-
205- it ( 'legacy Android Chrome (with Build/ string, pre-2021) should match androidChrome' , ( ) => {
206- const ua = 'Mozilla/5.0 (Linux; Android 10; SM-G973F Build/QP1A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36'
207- expect ( detect ( ua ) ) . toEqual ( {
208- id : 'androidChrome' ,
209- version : '130' ,
210- } )
211- } )
212-
213- it ( 'Android Chrome on tablet (no "Mobile" in UA) should match androidChrome' , ( ) => {
214- const ua = 'Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'
215- expect ( detect ( ua ) ) . toEqual ( {
216- id : 'androidChrome' ,
217- version : '131' ,
218- } )
219- } )
220- } )
221-
222- describe ( 'Desktop Chrome regression tests' , ( ) => {
223- it ( 'Desktop Chrome on Linux should still match chrome' , ( ) => {
224- const ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36'
225- expect ( detect ( ua ) ) . toEqual ( {
226- id : 'chrome' ,
227- version : '132' ,
228- os : 'Linux' ,
229- } )
230- } )
231- } )
232-
233- describe ( 'Desktop Firefox regression tests' , ( ) => {
234- it ( 'Desktop Firefox on Linux should still match firefox' , ( ) => {
235- const ua = 'Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0'
236- expect ( detect ( ua ) ) . toEqual ( {
237- id : 'firefox' ,
238- version : '124' ,
239- os : 'Linux' ,
240- } )
241- } )
242- } )
0 commit comments