editor.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Cypress.on('window:before:load', (win) => {
  2. cy.spy(win.console, 'error');
  3. cy.spy(win.console, 'warn');
  4. });
  5. afterEach(() => {
  6. cy.window().then((win) => {
  7. expect(win.console.error).to.have.callCount(0);
  8. expect(win.console.warn).to.have.callCount(0);
  9. });
  10. });
  11. Cypress.on('fail', (err, runnable) => {
  12. return true;
  13. });
  14. describe('Editor manipulations', () => {
  15. it('Create New Symbol', () => {
  16. cy.visit('/edit');
  17. cy.viewport(1280, 720);
  18. cy.wait(3000); // tmp hack for loading
  19. // https://framagit.org/aktivisda/aktivisda/-/issues/127
  20. cy.get('#new-symbol-button').click({ force: true });
  21. cy.get('.image-input-components').then((elements) => {
  22. expect(elements.length).to.be.equal(1);
  23. });
  24. cy.wait(3000); // tmp hack for loading
  25. // Download a symbol
  26. // https://framagit.org/aktivisda/aktivisda/-/issues/171
  27. cy.get('.download-symbol-button').should('have.attr', 'href').and('not.equal', '[object Promise]');
  28. cy.wait(3000); // tmp hack for loading
  29. });
  30. });