Compare commits
No commits in common. "6364fc83741b20d9468b7e72a8ec573c485c389e" and "61a5a4e35e555a768cd973abcf07cf6fb813ecb6" have entirely different histories.
6364fc8374
...
61a5a4e35e
|
|
@ -87,7 +87,6 @@ describe('Bookmarks', () => {
|
|||
|
||||
it('should bookmark instrument', () => {
|
||||
cy.visit('/instrument/an-instrument');
|
||||
cy.wait('@InstrumentQuery');
|
||||
|
||||
cy.getByDataCy('content-component').first().as('contentComponent');
|
||||
|
||||
|
|
@ -111,12 +110,10 @@ describe('Bookmarks', () => {
|
|||
});
|
||||
|
||||
cy.get('[data-cy=modal-save-button]').click();
|
||||
cy.wait('@InstrumentQuery');
|
||||
});
|
||||
|
||||
it('should bookmark module', () => {
|
||||
cy.visit('/module/lohn-und-budget/');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
cy.getByDataCy('module-bookmark-actions').as('moduleBookmark');
|
||||
|
||||
cy.get('@moduleBookmark').within(() => {
|
||||
|
|
@ -139,12 +136,10 @@ describe('Bookmarks', () => {
|
|||
});
|
||||
|
||||
cy.get('[data-cy=modal-save-button]').click();
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
});
|
||||
|
||||
it('should bookmark chapter', () => {
|
||||
cy.visit('/module/lohn-und-budget/');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
cy.getByDataCy('chapter-bookmark-actions').as('chapterBookmark');
|
||||
|
||||
|
|
@ -168,12 +163,10 @@ describe('Bookmarks', () => {
|
|||
});
|
||||
|
||||
cy.get('[data-cy=modal-save-button]').click();
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
});
|
||||
|
||||
it('should bookmark content block', () => {
|
||||
cy.visit('/module/lohn-und-budget/');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
cy.getByDataCy('content-component').contains('Das folgende Interview').parent().parent().as('interviewContent');
|
||||
|
||||
|
|
@ -197,6 +190,5 @@ describe('Bookmarks', () => {
|
|||
});
|
||||
|
||||
cy.get('[data-cy=modal-save-button]').click();
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ describe('Instruments on Module page', () => {
|
|||
value: {
|
||||
description:
|
||||
'<p>Ein Interview dient dazu, durch Befragung Informationen zu ermitteln. Bei journalistischen Interviews werden oft Expertinnen und Experten befragt, aber auch Personen.</p>',
|
||||
slug: 'interview',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -291,8 +291,6 @@ describe('Highlights', () => {
|
|||
});
|
||||
cy.visit('/module/my-module');
|
||||
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText();
|
||||
|
||||
const highlightedText = 'es ist ein';
|
||||
|
|
@ -333,8 +331,6 @@ describe('Highlights', () => {
|
|||
|
||||
cy.visit('/module/my-module');
|
||||
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText();
|
||||
});
|
||||
|
||||
|
|
@ -349,7 +345,6 @@ describe('Highlights', () => {
|
|||
});
|
||||
|
||||
cy.visit('/module/my-module');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText();
|
||||
cy.getByDataCy('highlight-note').click();
|
||||
|
|
@ -363,7 +358,6 @@ describe('Highlights', () => {
|
|||
operations,
|
||||
});
|
||||
cy.visit('/module/my-module');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText();
|
||||
const highlightedText = 'es ist ein';
|
||||
|
|
@ -381,7 +375,6 @@ describe('Highlights', () => {
|
|||
operations: getOperations('ChapterNode'),
|
||||
});
|
||||
cy.visit('/module/my-module');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText('chapter-intro');
|
||||
const highlightedText = 'is is some';
|
||||
|
|
@ -400,7 +393,6 @@ describe('Highlights', () => {
|
|||
operations,
|
||||
});
|
||||
cy.visit('/module/my-module');
|
||||
cy.wait('@ModuleDetailsQuery');
|
||||
|
||||
markText('module-intro');
|
||||
const highlightedText = 'troducing';
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ describe('Projects page', () => {
|
|||
operations,
|
||||
});
|
||||
cy.visit('/portfolio');
|
||||
cy.wait('@ProjectsQuery');
|
||||
cy.getByDataCy('page-title').should('contain', 'Portfolio');
|
||||
cy.getByDataCy('portfolio-onboarding-illustration').should('exist');
|
||||
cy.getByDataCy('portfolio-onboarding-subtitle').should('contain', 'Woran denken Sie gerade');
|
||||
|
|
@ -54,7 +53,6 @@ describe('Projects page', () => {
|
|||
operations,
|
||||
});
|
||||
cy.visit('/portfolio');
|
||||
cy.wait('@ProjectsQuery');
|
||||
cy.getByDataCy('page-title').should('contain', 'Portfolio');
|
||||
cy.getByDataCy('create-project-button').should('exist');
|
||||
cy.getByDataCy('project-list').should('exist');
|
||||
|
|
@ -101,7 +99,6 @@ describe('Projects page', () => {
|
|||
});
|
||||
|
||||
cy.visit('/portfolio');
|
||||
cy.wait('@ProjectsQuery');
|
||||
|
||||
cy.getByDataCy('project').should('have.length', 1);
|
||||
|
||||
|
|
@ -126,7 +123,6 @@ describe('Projects page', () => {
|
|||
});
|
||||
cy.viewport('iphone-8');
|
||||
cy.visit('/portfolio');
|
||||
cy.wait('@ProjectsQuery');
|
||||
|
||||
cy.getByDataCy('page-title').should('exist');
|
||||
cy.getByDataCy('create-project-button').should('not.exist');
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { inject, onMounted, ref, computed, onUnmounted } from 'vue';
|
||||
import { defineAsyncComponent, inject, onMounted, ref, computed, onUnmounted } from 'vue';
|
||||
|
||||
import { useMutation } from '@vue/apollo-composable';
|
||||
import AddContentButton from '@/components/AddContentButton.vue';
|
||||
|
|
@ -109,7 +109,6 @@ import UserWidget from '@/components/UserWidget.vue';
|
|||
import VisibilityAction from '@/components/visibility/VisibilityAction.vue';
|
||||
import PopoverLink from '@/components/ui/PopoverLink.vue';
|
||||
import CopyLink from '@/components/CopyLink.vue';
|
||||
import ContentComponent from '@/components/content-blocks/ContentComponent.vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { hidden } from '@/helpers/visibility';
|
||||
import { insertAtIndex, removeAtIndex } from '@/graphql/immutable-operations';
|
||||
|
|
@ -145,6 +144,8 @@ export interface Props {
|
|||
editMode?: boolean;
|
||||
}
|
||||
|
||||
const ContentComponent = defineAsyncComponent(() => import('@/components/content-blocks/ContentComponent.vue'));
|
||||
|
||||
const { me, schoolClass } = getMe();
|
||||
|
||||
const contentBlockDiv = ref<HTMLElement | null>(null);
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ export interface Props {
|
|||
saved: boolean;
|
||||
placeholder: string;
|
||||
action: string;
|
||||
readOnly?: boolean;
|
||||
spellcheck?: boolean;
|
||||
spellcheckLoading?: boolean;
|
||||
readOnly: boolean;
|
||||
spellcheck: boolean;
|
||||
spellcheckLoading: boolean;
|
||||
sharedMsg: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
<textarea
|
||||
:placeholder="placeholder"
|
||||
:readonly="readonly"
|
||||
:value="inputText"
|
||||
:class="{ 'submission-form__textarea--readonly': readonly }"
|
||||
data-cy="submission-textarea"
|
||||
rows="1"
|
||||
class="borderless-textarea"
|
||||
v-model="editText"
|
||||
v-auto-grow
|
||||
@input="input"
|
||||
/>
|
||||
|
|
@ -27,8 +27,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, ref, watch } from 'vue';
|
||||
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
const TickCircleIcon = defineAsyncComponent(() => import('@/components/icons/TickCircleIcon.vue'));
|
||||
const LoadingIcon = defineAsyncComponent(() => import('@/components/icons/LoadingIcon.vue'));
|
||||
|
||||
|
|
@ -39,37 +38,12 @@ interface Props {
|
|||
placeholder: string;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
withDefaults(defineProps<Props>(), {
|
||||
placeholder: 'Ergebnis erfassen',
|
||||
});
|
||||
|
||||
const editText = ref(props.inputText);
|
||||
|
||||
const emit = defineEmits(['input']);
|
||||
|
||||
const containsEmoji = (text: string) => {
|
||||
if (!text) {
|
||||
return false
|
||||
}
|
||||
const lastCharacter = Array.from(text)[Array.from(text).length - 1];
|
||||
|
||||
if (lastCharacter && lastCharacter.charCodeAt(0)> 55000) //fix for the hand symbol 🖐️
|
||||
return true
|
||||
const emojiRegex = /\p{Emoji}/u;
|
||||
return emojiRegex.test(lastCharacter);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.inputText,
|
||||
(newValue) => {
|
||||
// TODO: Lorenz this is an ugly fix!
|
||||
if (containsEmoji(newValue)) {
|
||||
editText.value = newValue;
|
||||
emit('input', editText.value);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const input = (e: Event) => {
|
||||
const value = (e.target as HTMLInputElement).value;
|
||||
emit('input', value);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export interface Props {
|
|||
showDelete: boolean;
|
||||
}
|
||||
|
||||
const emit = defineEmits(['close', 'confirm', 'choose-color', 'delete', 'note']);
|
||||
const emit = defineEmits(['close', 'confirm', 'choose-color', 'delete']);
|
||||
defineProps<Props>();
|
||||
const confirmDelete = () => {
|
||||
modal
|
||||
|
|
|
|||
Loading…
Reference in New Issue