Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkiro committed Mar 13, 2024
1 parent 1207f93 commit 8342ba9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/example.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("My First Test", () => {
it("visits the app root url", () => {
cy.visit("/");
cy.get("a").contains("Start Game").click();
cy.get("button").contains("Start Game").click();
});
});
2 changes: 1 addition & 1 deletion src/components/FoundWordList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</template>

<script setup lang="ts">
import { computed, defineProps } from "vue";
import { computed } from "vue";
const props = defineProps({
foundWords: {
Expand Down
5 changes: 2 additions & 3 deletions src/components/GamePlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div>
<div class="user-input brutal-border">
<input autocomplete="off" placeholder="..." readonly size="1" type="text" v-model="userInput" />
<button :disabled="userInput.length < 2" @submit="submitWord" class="submit-btn brutal-border" type="submit">
<button :disabled="userInput.length < 2" @click="submitWord" class="submit-btn brutal-border" type="submit">
</button>
</div>
Expand Down Expand Up @@ -123,8 +123,7 @@ async function resetGame() {
for (let i = 0; i < letters.length; i += 1) {
animateWiggle(letters[i], colors[i % 4], { delay: 50 * i });
}
animateShake(".game-score", "ocean", { delay: 500 });
animateShake(".user-input", "ocean", { delay: 1000 });
animateShake(".user-input", "ocean", { delay: 800 });
}
function handleKeyboardEvents(event: KeyboardEvent) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/__tests__/GamePlay.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import GamePlay from "@/components/GamePlay.vue";
describe("", () => {
it("renders properly", () => {
const wrapper = mount(GamePlay);
expect(wrapper.text()).toContain("Submit");
expect(wrapper.text()).toContain("");
});
});

0 comments on commit 8342ba9

Please sign in to comment.