wisemapping-frontend/packages/editor/cypress/e2e/topicIcon.cy.ts

24 lines
618 B
TypeScript
Raw Permalink Normal View History

2023-01-15 09:10:27 +01:00
/// <reference types="cypress" />
describe('Topic Icon Suite', () => {
beforeEach(() => {
cy.visit('/editor.html');
cy.waitEditorLoaded();
});
it('Open panel', () => {
cy.onClickToolbarButton('Add Icon');
2023-01-30 05:10:57 +01:00
// Icon images must be loaded. No better solution than wait.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000);
2023-01-15 09:10:27 +01:00
cy.matchImageSnapshot('icons-pannel');
});
it('Add new icon', () => {
cy.focusTopicById(3);
cy.onClickToolbarButton('Add Icon');
cy.get('[aria-label="grinning"]').click();
cy.matchImageSnapshot('add-new-icon');
});
});