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>
|
<template>
|
||||||
<router-link
|
<router-link
|
||||||
:to="createProjectRoute"
|
:to="createProjectRoute"
|
||||||
class="button button--primary"
|
class="button button--primary">Projekt erstellen
|
||||||
data-cy="add-project-button">Projekt erstellen
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
Hier können Sie Projekte erstellen, um Ihre Gedanken festzuhalten oder Ihre Arbeit zu dokumentieren.
|
Hier können Sie Projekte erstellen, um Ihre Gedanken festzuhalten oder Ihre Arbeit zu dokumentieren.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<create-project-button />
|
<create-project-button data-cy="create-project-button-onboarding" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,7 @@
|
||||||
try {
|
try {
|
||||||
const data = store.readQuery({query: PROJECTS_QUERY});
|
const data = store.readQuery({query: PROJECTS_QUERY});
|
||||||
if (data.projects) {
|
if (data.projects) {
|
||||||
data.projects.edges.unshift({
|
data.projects.unshift(project);
|
||||||
node: project,
|
|
||||||
__typename: 'ProjectNode'
|
|
||||||
});
|
|
||||||
store.writeQuery({query: PROJECTS_QUERY, data});
|
store.writeQuery({query: PROJECTS_QUERY, data});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<h1 data-cy="page-title">Portfolio</h1>
|
<h1 data-cy="page-title">Portfolio</h1>
|
||||||
|
|
||||||
<create-project-button
|
<create-project-button
|
||||||
|
data-cy="create-project-button"
|
||||||
class="portfolio__create-button"
|
class="portfolio__create-button"
|
||||||
v-if="!isReadOnly" />
|
v-if="!isReadOnly" />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue