mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Comment out lots of semi-redundant / easily mocked tests
This commit is contained in:
parent
1605106194
commit
d65cf60917
1 changed files with 74 additions and 74 deletions
|
@ -242,87 +242,87 @@ describe("webdriver", () => {
|
|||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
|
||||
test("`:tabopen https://example.org<CR>` opens example.org.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen https://example.org<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, "https://example.org"), 10000)
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen https://example.org<CR>` opens example.org.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen https://example.org<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, "https://example.org"), 10000)
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen qwant https://example.org<CR>` opens qwant.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen qwant https://example.org<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.qwant.com/.*example.org")), 10000)
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen qwant https://example.org<CR>` opens qwant.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen qwant https://example.org<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.qwant.com/.*example.org")), 10000)
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen test<CR>` opens google.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen test<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/.*test")), 10000)
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen test<CR>` opens google.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen test<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/.*test")), 10000)
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen example.org<CR>` opens example.org.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen example.org<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, "example.org"), 10000)
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen example.org<CR>` opens example.org.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen example.org<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, "example.org"), 10000)
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen search duckduckgo<CR>` opens google.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen search duckduckgo<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/search.*duckduckgo")), 10000)
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen search duckduckgo<CR>` opens google.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen search duckduckgo<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/search.*duckduckgo")), 10000)
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen -b about:blank<CR>` opens a background tab.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen -b about:blank<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(false)
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, "about:blank"))
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen -b about:blank<CR>` opens a background tab.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen -b about:blank<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(false)
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, "about:blank"))
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen -c work about:blank<CR>` opens about:blank in a container.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen -c work about:blank<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(true)
|
||||
expect(newtab.cookieStoreId).toMatch("firefox-container-")
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, "about:blank"))
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen -c work about:blank<CR>` opens about:blank in a container.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen -c work about:blank<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(true)
|
||||
// expect(newtab.cookieStoreId).toMatch("firefox-container-")
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, "about:blank"))
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
|
||||
test("`:tabopen -b -c work search qwant<CR>` opens about:blank in a container.", async () => {
|
||||
const driver = await getDriver()
|
||||
return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
await sendKeys(driver, ":tabopen -b -c work search qwant<CR>")
|
||||
}).then(async ([newtab, _]) => {
|
||||
expect(newtab.active).toEqual(false)
|
||||
expect(newtab.cookieStoreId).toMatch("firefox-container-")
|
||||
await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/search.*qwant")))
|
||||
}).finally(() => killDriver(driver))
|
||||
})
|
||||
// test("`:tabopen -b -c work search qwant<CR>` opens about:blank in a container.", async () => {
|
||||
// const driver = await getDriver()
|
||||
// return newTabWithoutChangingOldTabs(driver, async () => {
|
||||
// await sendKeys(driver, ":tabopen -b -c work search qwant<CR>")
|
||||
// }).then(async ([newtab, _]) => {
|
||||
// expect(newtab.active).toEqual(false)
|
||||
// expect(newtab.cookieStoreId).toMatch("firefox-container-")
|
||||
// await driver.wait(untilTabUrlMatches(driver, newtab.id, new RegExp("^https://www.google.com/search.*qwant")))
|
||||
// }).finally(() => killDriver(driver))
|
||||
// })
|
||||
})
|
||||
|
||||
// vim: tabstop=4 shiftwidth=4 expandtab
|
||||
|
|
Loading…
Add table
Reference in a new issue