Skip to content

Commit

Permalink
test(vitest): Update browser provider
Browse files Browse the repository at this point in the history
update from webdriverio:chrome to playwright:chromium

Ref naver#3681
  • Loading branch information
netil authored and netil committed Aug 8, 2024
1 parent 051e821 commit f3fe40f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/api/axis-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* billboard.js project is licensed under the MIT license
*/
/* eslint-disable */
import {beforeEach, beforeAll, afterAll, describe, expect, it} from "vitest";
import {beforeAll, afterAll, describe, expect, it} from "vitest";
import {select as d3Select} from "d3-selection";
import util from "../assets/util";
import {$AXIS} from "../../src/config/classes";
Expand Down
1 change: 1 addition & 0 deletions test/api/chart-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ describe("API chart", () => {
expect(/^\(\)\s?=\>\s?\{/.test(chart[key].toString())).to.be.true;
});

// @ts-ignore
expect(bb.instance.indexOf(chart) === -1).to.be.true;

const el = <HTMLDivElement>document.getElementById("chart");
Expand Down
9 changes: 9 additions & 0 deletions test/api/export-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,21 @@ describe("API export", () => {
"gEMwIYvjgilxAsgoYFymZLtEoI4ACaBlzpB5Aqh4u1HAwik2LwOTAFo2",
"n3KPP7RFhvxMH97ZLyZpsgzMpjX2Qk8O3IUePj1WqYqk0kYkwz"
],

// pattern for webdriverio
[
"nSetJ0vvOG1XcoZ8BQEeD3w9CCB6BGIkmCiAIze",
"BhTIwMPCQiOxewt4m8Xj8HxSAQVGnnXoQ0J7YGzDD",
"ANwDC7nf6iqhRcXno2cQP2wnXM4qpFnSLACzpHlfYysmAV1jezaWxGgmFrai6bp9Y6Ryp2AaM"
],

// pattern for playwright
[
"B7Cbfl8qlXRFZsbD8ZBFa2Cf8o5AWAL4BQAvBrBalw2qe",
"exab0eqiYfoNPAthvDTS1zz2AXSqkxQ+54zjHiMj",
"BCgAjQ4PnSMBMwk0GbNwglKW81L6uE5alrpl8"
],

// pattern for CI: preserveFontStyle=false
[
"CZJgASaSGA5AGcAWG3wNiJg5ybawqZJgARsIEABaAPUclXqU3rWhk",
Expand Down
2 changes: 1 addition & 1 deletion test/internals/tooltip-position-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ describe("TOOLTIP Position", function() {

const {y} = chart.$.tooltip.node().getBoundingClientRect();

expect(y > 175).to.be.true;
expect(y >= 175).to.be.true;
});
});
});
4 changes: 2 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default defineConfig({
],
browser: {
enabled: true,
provider: "webdriverio",
name: "chrome",
provider: "playwright",
name: "chromium",
headless: true,
viewport: {
width: 800,
Expand Down

0 comments on commit f3fe40f

Please sign in to comment.