Skip to content

Commit c52d6cd

Browse files
authored
Merge pull request #2003 from floccusaddon/fix/nocache-tests
fix(tests): Make tests pass with noCache condition
2 parents e810ee6 + 192eaa6 commit c52d6cd

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

src/test/test.js

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6011,7 +6011,8 @@ describe('Floccus', function() {
60116011
})
60126012
]
60136013
}),
6014-
false
6014+
false,
6015+
!ACCOUNT_DATA.noCache,
60156016
)
60166017

60176018
// Move one tab out of the group
@@ -6043,7 +6044,8 @@ describe('Floccus', function() {
60436044
})
60446045
]
60456046
}),
6046-
false
6047+
false,
6048+
!ACCOUNT_DATA.noCache,
60476049
)
60486050
})
60496051

@@ -6113,7 +6115,8 @@ describe('Floccus', function() {
61136115
})
61146116
]
61156117
}),
6116-
false
6118+
false,
6119+
!ACCOUNT_DATA.noCache,
61176120
)
61186121

61196122
// Reorder the tabs and groups
@@ -6154,7 +6157,8 @@ describe('Floccus', function() {
61546157
})
61556158
]
61566159
}),
6157-
false
6160+
false,
6161+
!ACCOUNT_DATA.noCache,
61586162
)
61596163
})
61606164

@@ -6164,6 +6168,10 @@ describe('Floccus', function() {
61646168
return this.skip()
61656169
}
61666170

6171+
if (ACCOUNT_DATA.noCache) {
6172+
return this.skip()
6173+
}
6174+
61676175
// Create two tabs
61686176
await browser.tabs.create({
61696177
url: TEST_URL + '#test1'
@@ -6193,7 +6201,8 @@ describe('Floccus', function() {
61936201
})
61946202
]
61956203
}),
6196-
false
6204+
false,
6205+
!ACCOUNT_DATA.noCache,
61976206
)
61986207

61996208
// Create a tab group on the server by modifying the bookmarks tree
@@ -6250,7 +6259,8 @@ describe('Floccus', function() {
62506259
})
62516260
]
62526261
}),
6253-
false
6262+
false,
6263+
!ACCOUNT_DATA.noCache,
62546264
)
62556265
console.log('localTree ok')
62566266

@@ -6275,7 +6285,8 @@ describe('Floccus', function() {
62756285
})
62766286
]
62776287
}),
6278-
false
6288+
false,
6289+
!ACCOUNT_DATA.noCache,
62796290
)
62806291
})
62816292

@@ -6285,6 +6296,10 @@ describe('Floccus', function() {
62856296
return this.skip()
62866297
}
62876298

6299+
if (ACCOUNT_DATA.noCache) {
6300+
return this.skip()
6301+
}
6302+
62886303
// Create two tabs
62896304
const tab1 = await browser.tabs.create({
62906305
url: TEST_URL + '#test1'
@@ -6330,7 +6345,8 @@ describe('Floccus', function() {
63306345
})
63316346
]
63326347
}),
6333-
false
6348+
false,
6349+
!ACCOUNT_DATA.noCache,
63346350
)
63356351

63366352
// Rename the tab group on the server
@@ -6377,7 +6393,8 @@ describe('Floccus', function() {
63776393
})
63786394
]
63796395
}),
6380-
false
6396+
false,
6397+
!ACCOUNT_DATA.noCache,
63816398
)
63826399

63836400
// Verify the server state
@@ -6401,7 +6418,8 @@ describe('Floccus', function() {
64016418
})
64026419
]
64036420
}),
6404-
false
6421+
false,
6422+
!ACCOUNT_DATA.noCache,
64056423
)
64066424
})
64076425

@@ -6410,6 +6428,9 @@ describe('Floccus', function() {
64106428
if (typeof browser.tabGroups === 'undefined') {
64116429
return this.skip()
64126430
}
6431+
if (ACCOUNT_DATA.noCache) {
6432+
return this.skip()
6433+
}
64136434

64146435
// Create two tabs
64156436
const tab1 = await browser.tabs.create({
@@ -6456,7 +6477,8 @@ describe('Floccus', function() {
64566477
})
64576478
]
64586479
}),
6459-
false
6480+
false,
6481+
!ACCOUNT_DATA.noCache,
64606482
)
64616483

64626484
// Move tabs out of the group on the server
@@ -6503,7 +6525,8 @@ describe('Floccus', function() {
65036525
})
65046526
]
65056527
}),
6506-
false
6528+
false,
6529+
!ACCOUNT_DATA.noCache,
65076530
)
65086531

65096532
// Verify the server state
@@ -6522,7 +6545,8 @@ describe('Floccus', function() {
65226545
})
65236546
]
65246547
}),
6525-
false
6548+
false,
6549+
!ACCOUNT_DATA.noCache,
65266550
)
65276551
})
65286552
})

0 commit comments

Comments
 (0)