Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Nov 3, 2022
1 parent 245f9ab commit 1d8aa2d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cypress/e2e/context-menu.spec.ts
@@ -1,5 +1,6 @@
import { DATA_TEST } from '../../example/constants';
import { STYLE, theme, animation } from '../../src/constants';
import { STYLE } from '../../src/constants';
import { animation, theme } from '../fixtures/constant';

const builtInAnimationClasses = Object.keys(animation).map(k => ({
name: k,
Expand Down Expand Up @@ -118,7 +119,7 @@ describe('Context menu', () => {

it('Can disable animation', () => {
cy.getByDataTest(DATA_TEST.ANIMATION_SELECTOR).select('none');

builtInAnimationClasses.forEach(builtInAnimation => {
cy.getByDataTest(DATA_TEST.CONTEXT_MENU_TRIGGER).rightclick();
cy.getByDataTest(DATA_TEST.CONTEXT_MENU).should(
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/keyboard-navigation.spec.ts
@@ -1,5 +1,5 @@
import { DATA_TEST } from '../../example/constants';
import { STYLE, theme, animation } from '../../src/constants';
import { STYLE } from '../../src/constants';

const [, submenuClassName] = STYLE.submenu.split(' ');

Expand Down
11 changes: 11 additions & 0 deletions cypress/fixtures/constant.ts
@@ -0,0 +1,11 @@
export const animation = {
fade: 'fade',
flip: 'flip',
scale: 'scale',
slide: 'slide',
};

export const theme = {
light: 'light',
dark: 'dark',
};

0 comments on commit 1d8aa2d

Please sign in to comment.