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-ziele]').type('Git gud');
|
||||
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 {
|
||||
const data = store.readQuery({query: PROJECTS_QUERY});
|
||||
if (data.projects) {
|
||||
data.projects.edges.push({
|
||||
data.projects.edges.unshift({
|
||||
node: project,
|
||||
__typename: 'ProjectNode'
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class PortfolioQuery(object):
|
|||
projects = DjangoFilterConnectionField(ProjectNode)
|
||||
|
||||
def resolve_projects(self, info, **kwargs):
|
||||
return Project.objects.all()
|
||||
return Project.objects.all().order_by('-pk')
|
||||
|
||||
def resolve_project(self, info, **kwargs):
|
||||
return get_by_id_or_slug(Project, **kwargs)
|
||||
|
|
|
|||
Loading…
Reference in New Issue