const operations = {
  ModulesQuery: {},
  AssignmentWithSubmissions: {
    assignment: {
      title: 'Ein Auftragstitel',
      solution: '<p>Eine Lösung</p>',
      assignment: 'Ein Auftrag',
      submissions: []
    }
  },
  MeQuery: {
    me: {
      onboardingVisited: true
    },
  },
};

describe('Assignments', () => {
  before(() => {
    cy.task('getSchema').then(schema => {
      cy.mockGraphql({
        schema,
        mocks: {},
        operations,
      });
    });
  });

  it('it does not display HTML tags', () => {
    cy.server();
    cy.viewport('macbook-15');
    cy.fakeLogin('nico.zickgraf', 'test');
    cy.visit('/module/lohn-und-budget/submissions/QXNzaWdubWVudE5vZGU6MQ==');
    cy.getByDataCy('assignment-solution').should('have.text', 'Eine Lösung');
  });
});
