Skip to content

Commit

Permalink
added test for screenshot component (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
SohaibMagrabi authored Jun 5, 2024
1 parent 8beb22a commit b0a0611
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions nightwatch/components/screenshot.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import GlobalStyles from '../../src/components/GlobalStyles';
import Screenshot from '../../src/components/Screenshot';

export default {
title: "ScreenshotComponent",
component: Screenshot
};


export const ScreenshotComponent = () => (
<>
<GlobalStyles />
<Screenshot />
</>
);

ScreenshotComponent.test = async (browser,{component}) => {

browser.expect(component).to.be.present.before(1000);


browser.getCssProperty(component, 'height', function(result) {
this.assert.ok(result.value !== '0px', 'Check if Screenshot height is not zero');
});

};

0 comments on commit b0a0611

Please sign in to comment.