Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 5f6ca6b

Browse files
committed
test: remove cypress
1 parent f0af97d commit 5f6ca6b

File tree

8 files changed

+25
-116
lines changed

8 files changed

+25
-116
lines changed

cypress.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

cypress/plugins.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

cypress/tests/basic.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

cypress/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

cypress/webpack.config.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@
4949
"devDependencies": {
5050
"@commitlint/cli": "^7.2.0",
5151
"@commitlint/config-conventional": "^7.1.2",
52-
"@cypress/webpack-preprocessor": "^4.0.2",
5352
"@types/mocha": "^5.2.6",
5453
"@types/node": "^10.12.22",
5554
"@types/selenium-webdriver": "^4.0.0",
5655
"@types/webpack": "^4.4.17",
57-
"cypress": "^3.1.4",
5856
"expect": "^24.7.1",
5957
"html-webpack-externals-plugin": "^3.8.0",
6058
"html-webpack-include-assets-plugin": "^1.0.6",

test/index.ts

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,30 @@ describe("client tests ", async function() {
1212
for (const os in capabilities) {
1313
for (const browser in capabilities[os]) {
1414
const cap: webdriver.Capabilities = capabilities[os][browser]
15-
describe(`${os} ${browser}`, async function(this) {
15+
describe(`${os} ${browser}`, function(this) {
1616
this.timeout(0)
17-
test(cap)
17+
let browser: webdriver.WebDriver = (null as any) as webdriver.WebDriver
18+
before(async function(this) {
19+
browser = await new webdriver.Builder()
20+
.usingServer("https://hub-cloud.browserstack.com/wd/hub")
21+
.withCapabilities(cap)
22+
.build()
23+
await browser.get(local_testing_site_url)
24+
expect(browser).not.toBeNull()
25+
})
26+
describe("something", () => {
27+
it("should have ScrollUtility", async function() {
28+
const scrollUtility = await browser.executeAsyncScript(() => {
29+
return window.ScrollUtility
30+
})
31+
expect(scrollUtility).toBeDefined()
32+
})
33+
testScenarios(() => browser)
34+
})
35+
after(async function() {
36+
await browser.quit()
37+
})
1838
})
1939
}
2040
}
2141
})
22-
23-
function test(cap: webdriver.Capabilities) {
24-
let browser: webdriver.WebDriver = (null as any) as webdriver.WebDriver
25-
before(async function() {
26-
// this.timeout(long_timeout)
27-
browser = await new webdriver.Builder()
28-
.usingServer("https://hub-cloud.browserstack.com/wd/hub")
29-
.withCapabilities(cap)
30-
.build()
31-
await browser.get(local_testing_site_url)
32-
expect(browser).toBeTruthy()
33-
})
34-
it("should have ScrollUtility", async function() {
35-
const scrollUtility = await browser.executeAsyncScript(() => {
36-
return window.ScrollUtility
37-
})
38-
expect(scrollUtility).toBeDefined()
39-
})
40-
testScenarios(() => browser)
41-
after(async function() {
42-
await browser.quit()
43-
})
44-
}

test/tests.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ declare const window: Window & { ScrollUtility: typeof ScrollUtility }
77
type TestScroll = [string, string, boolean, number, number]
88

99
function someTest(getBrowser: () => webdriver.WebDriver) {
10-
testScroll(getBrowser, "html", "scrollable", false, 0, 50)
10+
it("center element", async function() {
11+
await testScroll(getBrowser, "html", "#scrollable", false, 0, 50)
12+
})
1113
}
1214

1315
async function testScroll(browser: () => webdriver.WebDriver, ...args: TestScroll) {

0 commit comments

Comments
 (0)