diff --git a/client/cypress/integration/frontend/instruments-page.spec.js b/client/cypress/integration/frontend/instruments-page.spec.js new file mode 100644 index 00000000..1a7cfa19 --- /dev/null +++ b/client/cypress/integration/frontend/instruments-page.spec.js @@ -0,0 +1,17 @@ +describe('Instruments Page', () => { + beforeEach(() => { + cy.setup(); + }); + + it('opens the instruments page', () => { + cy.mockGraphqlOps({ + operations: { + MeQuery: {}, + InstrumentsQuery: { + instruments: [] + } + } + }); + cy.visit('instruments/'); + }); +}); diff --git a/client/src/graphql/gql/queries/instrumentsByTypeQuery.gql b/client/src/graphql/gql/queries/instrumentsByTypeQuery.gql index 6024c799..aa84aca6 100644 --- a/client/src/graphql/gql/queries/instrumentsByTypeQuery.gql +++ b/client/src/graphql/gql/queries/instrumentsByTypeQuery.gql @@ -1,4 +1,4 @@ -query InstrumentQuery($type: String!){ +query InstrumentsQuery($type: String!){ instruments(type: $type) { edges { node { diff --git a/client/src/graphql/gql/queries/instrumentsQuery.gql b/client/src/graphql/gql/queries/instrumentsQuery.gql index bed2a520..c87588ba 100644 --- a/client/src/graphql/gql/queries/instrumentsQuery.gql +++ b/client/src/graphql/gql/queries/instrumentsQuery.gql @@ -1,13 +1,9 @@ -query InstrumentQuery { +query InstrumentsQuery { instruments { - edges { - node { - id - title - contents - slug - type - } - } + id + title + contents + slug + type } }