|
|
@ -267,18 +267,15 @@ class BrowserFragmentTest {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
fun `WHEN isPullToRefreshEnabledInBrowser is disabled THEN pull down refresh is disabled`() {
|
|
|
|
fun `WHEN isPullToRefreshEnabledInBrowser is disabled THEN pull down refresh is disabled`() {
|
|
|
|
every { FeatureFlags.pullToRefreshEnabled } returns true
|
|
|
|
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns true
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns true
|
|
|
|
assertTrue(browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
assertTrue(browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
|
|
|
|
|
|
|
|
every { FeatureFlags.pullToRefreshEnabled } returns true
|
|
|
|
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns false
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns false
|
|
|
|
assertTrue(!browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
assertTrue(!browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
fun `WHEN in fullscreen THEN pull down refresh is disabled`() {
|
|
|
|
fun `WHEN in fullscreen THEN pull down refresh is disabled`() {
|
|
|
|
every { FeatureFlags.pullToRefreshEnabled } returns true
|
|
|
|
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns true
|
|
|
|
every { context.settings().isPullToRefreshEnabledInBrowser } returns true
|
|
|
|
assertTrue(browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
assertTrue(browserFragment.shouldPullToRefreshBeEnabled(false))
|
|
|
|
assertTrue(!browserFragment.shouldPullToRefreshBeEnabled(true))
|
|
|
|
assertTrue(!browserFragment.shouldPullToRefreshBeEnabled(true))
|
|
|
|