Skip to content

Commit

Permalink
UI_LOCK中はソング・トーク切り替えができないように (VOICEVOX#1806)
Browse files Browse the repository at this point in the history
ui lock中はソング・トーク切り替えができないように
  • Loading branch information
Hiroshiba authored Jan 31, 2024
1 parent b052bbc commit 5152ee6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/TitleBarEditorSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<q-btn-toggle
:model-value="nowEditor"
unelevated
:disable="uiLocked"
dense
toggle-color="primary"
:options="[
Expand All @@ -21,8 +22,13 @@
<script setup lang="ts">
import { computed } from "vue";
import { useRouter } from "vue-router";
import { useStore } from "@/store";

const store = useStore();
const router = useRouter();

const uiLocked = computed(() => store.getters.UI_LOCKED);

const nowEditor = computed<"talk" | "song">(() => {
const path = router.currentRoute.value.path;
if (path === "/talk") return "talk";
Expand Down
11 changes: 11 additions & 0 deletions tests/e2e/browser/初回起動時.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@ test("起動したら「利用規約に関するお知らせ」が表示され
timeout: 90 * 1000,
});
});

test("利用規約同意前に各種UIが無効になっている", async ({ page }) => {
await expect(page.getByText("利用規約に関するお知らせ")).toBeVisible({
timeout: 90 * 1000,
});

// ソングボタン
const songButton = await page.getByText("ソング");
await expect(songButton).toBeVisible();
await expect(songButton).toBeDisabled();
});

0 comments on commit 5152ee6

Please sign in to comment.