Skip to content

Commit

Permalink
test(e2e): add info label tests (SAP#4989)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOlkhovskyi authored Mar 30, 2021
1 parent aa46a87 commit f605ad5
Show file tree
Hide file tree
Showing 26 changed files with 46 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions e2e/wdio/core/pages/info-label.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { CoreBaseComponentPo } from './core-base-component.po';
import { waitForPresent, waitForElDisplayed } from '../../driver/wdio';

export class InfoLabelPo extends CoreBaseComponentPo {
url = '/info-label';
readonly root = '#page-content';

defaultLabel = 'fd-info-label-default-example fd-info-label';

open(): void {
super.open(this.url);
waitForElDisplayed(this.root);
waitForPresent(this.defaultLabel);
}

getScreenshotFolder(): object {
return super.getScreenshotFolder(this.url);
}

saveExampleBaselineScreenshot(specName: string = 'info-label'): void {
super.saveExampleBaselineScreenshot(specName, this.getScreenshotFolder());
}

compareWithBaseline(specName: string = 'info-label'): any {
return super.compareWithBaseline(specName, this.getScreenshotFolder());
}
}
19 changes: 19 additions & 0 deletions e2e/wdio/core/tests/info-label.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { InfoLabelPo } from '../pages/info-label.po';

describe('Info Label component test suite', () => {
const infoLabelPage = new InfoLabelPo();

beforeEach(() => {
infoLabelPage.open();
}, 2);

it('should check LTR and RTL orientation', () => {
infoLabelPage.checkRtlSwitch();
});

it('should check examples basic visual regression', () => {
infoLabelPage.saveExampleBaselineScreenshot();
expect(infoLabelPage.compareWithBaseline()).toBeLessThan(3);
});

});

0 comments on commit f605ad5

Please sign in to comment.