Skip to content

Commit 42419a1

Browse files
test: Adjusting the visual regression test ratios and fixing test bugs (#1528)
* test: Pushing the ratios higher * test: Updating tabs issues on snapshots, working through issues with overflow on the IE baselines; pfe-band bug? * test: Updating baselines * test: Revert pfe-band updates * test: Remove pfe-band dependency * test: Update baselines for pfe-tabs * Update elements/pfe-tabs/demo/demo.css * Remove interpolation and add IE11 fallback for surfaces * test: Pull out pfe-base updates into separate PR * test: Move broadcasted styles to demo.css in pfe-tabs instead of sourcing from base Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 84cb0b1 commit 42419a1

File tree

21 files changed

+575
-31
lines changed

21 files changed

+575
-31
lines changed

elements/pfe-badge/test/pfe-badge_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ describe(element, () => {
1010
});
1111

1212
it("should compare to the baseline", () => {
13-
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.6);
13+
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.85);
1414
});
1515
});

elements/pfe-codeblock/test/pfe-codeblock_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ describe(element, () => {
1111
});
1212

1313
it("should compare to the baseline", () => {
14-
expect(browser.checkFullPageScreen(element)).toBeLessThan(2.1);
14+
expect(browser.checkFullPageScreen(element)).toBeLessThan(2.2);
1515
});
1616
});

elements/pfe-collapse/test/pfe-collapse_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ describe(element, () => {
1616
});
1717

1818
it("should compare to the baseline", () => {
19-
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.25);
19+
expect(browser.checkFullPageScreen(element)).toBeLessThan(4.7);
2020
});
2121
});

elements/pfe-content-set/src/pfe-content-set.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ class PfeContentSet extends PFElement {
229229
constructor() {
230230
super(PfeContentSet, { type: PfeContentSet.PfeType });
231231

232-
this.isIE11 = /MSIE|Trident|Edge\//.test(window.navigator.userAgent);
233-
234232
this.build = this.build.bind(this);
235233

236234
this._mutationHandler = this._mutationHandler.bind(this);

elements/pfe-cta/test/pfe-cta_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ describe(element, () => {
1010
});
1111

1212
it("should compare to the baseline", () => {
13-
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.25);
13+
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.4);
1414
});
1515
});

elements/pfe-dropdown/test/pfe-dropdown_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ describe(element, () => {
2424
});
2525

2626
it("should compare to the baseline", () => {
27-
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.25);
27+
expect(browser.checkFullPageScreen(element)).toBeLessThan(1.45);
2828
});
2929
});

elements/pfe-icon-panel/test/pfe-icon-panel_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ describe(element, () => {
1111
});
1212

1313
it("should compare to the baseline", () => {
14-
expect(browser.checkFullPageScreen(element)).toBeLessThan(2.35);
14+
expect(browser.checkFullPageScreen(element)).toBeLessThan(2.4);
1515
});
1616
});

elements/pfe-icon/test/pfe-icon_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ const element = require("../package.json").pfelement.elementName;
33
describe(element, () => {
44
before(() => {
55
browser.url(`/elements/${element}/demo/index_e2e.html`);
6-
browser.pause(12000);
76
});
87

98
it("should take a screenshot", () => {
9+
browser.pause(15000);
1010
browser.saveFullPageScreen(element);
1111
});
1212

elements/pfe-modal/test/pfe-modal_e2e.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ describe(element, () => {
88

99
browser.execute(function () {
1010
window.scrollTo(0, 0);
11-
document.querySelector("pfe-modal").open();
11+
Promise.all([
12+
customElements.whenDefined("pfe-modal")
13+
]).then(function () {
14+
document.querySelector("pfe-modal").open();
15+
});
1216
});
1317

1418
browser.pause(1000);

elements/pfe-navigation/test/pfe-navigation_e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe(element, () => {
2222
});
2323

2424
browser.saveFullPageScreen(`${element}--desktop`);
25-
expect(browser.checkScreen(`${element}--desktop`)).toBeLessThan(5.76);
25+
expect(browser.checkScreen(`${element}--desktop`)).toBeLessThan(6);
2626
});
2727

2828
it("should validate a screenshot at mobile", () => {

0 commit comments

Comments
 (0)