import { getMinimalMe } from '../../../support/helpers';

describe('Duplicate Content Block', () => {
  beforeEach(() => {
    cy.setup();
  });
  it.skip('works', () => {
    // todo: does not work right now, as the cache does not seem to update for the 'inEditMode' local query. Need to
    // make this work for the test to work right.
    const operations = {
      MeQuery: getMinimalMe({ isTeacher: true }),
      UpdateLastModule: {},
      ModuleEditModeQuery: {
        module: {},
      },
      AssignmentQuery: {
        assignment: {
          title: 'Ein Assignment',
          assignment: 'Eine Beschreibung',
        },
      },
      ModuleDetailsQuery: {
        module: {
          chapters: [
            {
              contentBlocks: [
                {
                  type: 'normal',
                  title: 'Hello there',
                  contents: [
                    {
                      type: 'text_block',
                      value: {
                        text: '<p>Asdf</p>',
                      },
                    },
                    {
                      type: 'assignment',
                      value: {
                        title: 'Ein Auftrag',
                        assignment: 'Eine Beschreibung',
                        id: 'abcd',
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
      },
    };
    cy.mockGraphqlOps({
      operations,
    });
    cy.visit('/module/some-module');

    cy.getByDataCy('toggle-editing').click();
  });
});
