Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
tapioca24 committed Jun 24, 2021
1 parent a87091d commit f3a9564
Show file tree
Hide file tree
Showing 2 changed files with 497 additions and 2 deletions.
34 changes: 34 additions & 0 deletions test/helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const contentClassName = 'vjs-logo-content';
const hideClassName = 'vjs-logo-hide';

export const getContent = (player) => {
return player.contentEl().getElementsByClassName(contentClassName)[0];
};

export const getImage = (content) => {
return content.getElementsByTagName('img')[0];
};

export const getAnchor = (content) => {
return content.getElementsByTagName('a')[0];
};

export const isTop = (content) => {
return content.style.top !== '' && content.style.bottom === '';
};

export const isBottom = (content) => {
return content.style.top === '' && content.style.bottom !== '';
};

export const isLeft = (content) => {
return content.style.left !== '' && content.style.right === '';
};

export const isRight = (content) => {
return content.style.left === '' && content.style.right !== '';
};

export const isShown = (content) => {
return !content.classList.contains(hideClassName);
};
Loading

0 comments on commit f3a9564

Please sign in to comment.