diff --git a/app/src/androidTest/java/space/hackenslacker/kanbn4droid/app/BoardsFlowTest.kt b/app/src/androidTest/java/space/hackenslacker/kanbn4droid/app/BoardsFlowTest.kt
index 42e5eb1..8b69bbf 100644
--- a/app/src/androidTest/java/space/hackenslacker/kanbn4droid/app/BoardsFlowTest.kt
+++ b/app/src/androidTest/java/space/hackenslacker/kanbn4droid/app/BoardsFlowTest.kt
@@ -2,7 +2,11 @@ package space.hackenslacker.kanbn4droid.app
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
+import androidx.test.espresso.ViewAction
import androidx.test.espresso.action.ViewActions.click
+import androidx.test.espresso.action.GeneralSwipeAction
+import androidx.test.espresso.action.Press
+import androidx.test.espresso.action.Swipe
import androidx.test.espresso.action.ViewActions.longClick
import androidx.test.espresso.action.ViewActions.replaceText
import androidx.test.espresso.action.ViewActions.swipeDown
@@ -16,6 +20,7 @@ import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
+import kotlin.math.roundToInt
import org.junit.After
import org.junit.Before
import org.junit.Test
@@ -117,6 +122,38 @@ class BoardsFlowTest {
onView(withText("Alpha")).check(matches(isDisplayed()))
}
+ @Test
+ fun drawerOpensAndShowsWorkspaceSection() {
+ MainActivity.dependencies.apiClientFactory = {
+ FakeBoardsApiClient(
+ boards = mutableListOf(BoardSummary("1", "Alpha")),
+ templates = emptyList(),
+ )
+ }
+
+ ActivityScenario.launch(BoardsActivity::class.java)
+
+ onView(withId(android.R.id.content)).perform(swipeFromLeftEdge())
+
+ onView(withText("Workspaces")).check(matches(isDisplayed()))
+ onView(withText("Alpha")).check(matches(isDisplayed()))
+ }
+
+ private fun swipeFromLeftEdge(): ViewAction {
+ return GeneralSwipeAction(
+ Swipe.FAST,
+ { view ->
+ val x = (view.width * 0.02f).roundToInt().toFloat()
+ floatArrayOf(x, view.height * 0.5f)
+ },
+ { view ->
+ val x = (view.width * 0.8f).roundToInt().toFloat()
+ floatArrayOf(x, view.height * 0.5f)
+ },
+ Press.FINGER,
+ )
+ }
+
private class InMemorySessionStore(
private var baseUrl: String? = null,
) : SessionStore {
diff --git a/app/src/main/res/layout/activity_boards.xml b/app/src/main/res/layout/activity_boards.xml
index cc31767..e292d47 100644
--- a/app/src/main/res/layout/activity_boards.xml
+++ b/app/src/main/res/layout/activity_boards.xml
@@ -1,60 +1,73 @@
-
-
+ android:layout_height="match_parent">
-
-
-
+ android:layout_height="wrap_content"
+ android:theme="@style/ThemeOverlay.MaterialComponents.ActionBar"
+ app:title="@string/boards_title" />
-
+
+
+ >
-
+
-
-
-
+
-
+
+
+
-
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_workspace_drawer.xml b/app/src/main/res/layout/item_workspace_drawer.xml
new file mode 100644
index 0000000..766684e
--- /dev/null
+++ b/app/src/main/res/layout/item_workspace_drawer.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/view_boards_drawer.xml b/app/src/main/res/layout/view_boards_drawer.xml
new file mode 100644
index 0000000..20dc677
--- /dev/null
+++ b/app/src/main/res/layout/view_boards_drawer.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..b851cec
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,4 @@
+
+
+ 360dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1eec35e..b3f4729 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -84,4 +84,11 @@
Add
Comment is required
Comment added
+ Settings
+ Workspaces
+ Log out
+ Retry
+ Profile unavailable
+ Workspaces unavailable
+ Loading...