Add test for and fix bug in projects page
This commit is contained in:
parent
96b5fcbcd5
commit
a2ecbdd3b4
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<router-link
|
||||
:to="createProjectRoute"
|
||||
class="button button--primary"
|
||||
data-cy="add-project-button">Projekt erstellen
|
||||
class="button button--primary">Projekt erstellen
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
Hier können Sie Projekte erstellen, um Ihre Gedanken festzuhalten oder Ihre Arbeit zu dokumentieren.
|
||||
</p>
|
||||
|
||||
<create-project-button />
|
||||
<create-project-button data-cy="create-project-button-onboarding" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,10 +39,7 @@
|
|||
try {
|
||||
const data = store.readQuery({query: PROJECTS_QUERY});
|
||||
if (data.projects) {
|
||||
data.projects.edges.unshift({
|
||||
node: project,
|
||||
__typename: 'ProjectNode'
|
||||
});
|
||||
data.projects.unshift(project);
|
||||
store.writeQuery({query: PROJECTS_QUERY, data});
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<h1 data-cy="page-title">Portfolio</h1>
|
||||
|
||||
<create-project-button
|
||||
data-cy="create-project-button"
|
||||
class="portfolio__create-button"
|
||||
v-if="!isReadOnly" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue