Fix cypress test for new project
This commit is contained in:
parent
117e8bf0d8
commit
d36bbafb04
|
|
@ -8,6 +8,6 @@ describe('New project', () => {
|
||||||
cy.get('[data-cy=page-form-input-beschreibung]').type('This description rocks');
|
cy.get('[data-cy=page-form-input-beschreibung]').type('This description rocks');
|
||||||
cy.get('[data-cy=page-form-input-ziele]').type('Git gud');
|
cy.get('[data-cy=page-form-input-ziele]').type('Git gud');
|
||||||
cy.get('[data-cy=save-project-button]').click();
|
cy.get('[data-cy=save-project-button]').click();
|
||||||
cy.get('.project-widget:first-of-type').contains('rocks');
|
cy.get('.project-widget:first').contains('random');
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,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.push({
|
data.projects.edges.unshift({
|
||||||
node: project,
|
node: project,
|
||||||
__typename: 'ProjectNode'
|
__typename: 'ProjectNode'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class PortfolioQuery(object):
|
||||||
projects = DjangoFilterConnectionField(ProjectNode)
|
projects = DjangoFilterConnectionField(ProjectNode)
|
||||||
|
|
||||||
def resolve_projects(self, info, **kwargs):
|
def resolve_projects(self, info, **kwargs):
|
||||||
return Project.objects.all()
|
return Project.objects.all().order_by('-pk')
|
||||||
|
|
||||||
def resolve_project(self, info, **kwargs):
|
def resolve_project(self, info, **kwargs):
|
||||||
return get_by_id_or_slug(Project, **kwargs)
|
return get_by_id_or_slug(Project, **kwargs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue