|
@@ -8,11 +8,15 @@ import {
|
|
|
describe('config: localAuth', function () {
|
|
describe('config: localAuth', function () {
|
|
|
this.timeout(30000) // Increase timeout to 30 seconds
|
|
this.timeout(30000) // Increase timeout to 30 seconds
|
|
|
|
|
|
|
|
|
|
+ let originalWindowRect
|
|
|
|
|
+
|
|
|
before(async function () {
|
|
before(async function () {
|
|
|
|
|
+ originalWindowRect = await webdriver.manage().window().getRect()
|
|
|
await runner.start('localAuth')
|
|
await runner.start('localAuth')
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
after(async () => {
|
|
after(async () => {
|
|
|
|
|
+ await webdriver.manage().window().setRect(originalWindowRect)
|
|
|
await runner.stop()
|
|
await runner.stop()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -99,4 +103,17 @@ describe('config: localAuth', function () {
|
|
|
console.log('Login form not found - skipping login test')
|
|
console.log('Login form not found - skipping login test')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ it('Header login link shows its text on narrow screens', async function () {
|
|
|
|
|
+ await webdriver.manage().window().setRect({ width: 400, height: 800 })
|
|
|
|
|
+ await webdriver.get(runner.baseUrl())
|
|
|
|
|
+
|
|
|
|
|
+ const loginLink = await webdriver.wait(until.elementLocated(By.css('header .login-link')), 10000)
|
|
|
|
|
+ await webdriver.wait(until.elementIsVisible(loginLink), 5000)
|
|
|
|
|
+
|
|
|
|
|
+ expect((await loginLink.getText()).trim()).to.equal('Login')
|
|
|
|
|
+
|
|
|
|
|
+ const linkSize = await loginLink.getRect()
|
|
|
|
|
+ expect(linkSize.width).to.be.greaterThan(30)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|