-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qol 7331 reset feedback form.js (#265)
* QOL-7331 - Feedback on reset() function in feedback-form.js * QOL-7331 - Feedback on reset() function in feedback-form.js * QOL-7328 Page content is hidden on mobile view * fixed nested dropdown expand issue * added gh-pages deployment option for testing changes * reverted the content hiding * reverted the content hiding * updated tests and included header small screen test * updated circle ci config file
- Loading branch information
Showing
11 changed files
with
84 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const puppeteer = require('puppeteer'); | ||
const ct = require('../config/constants'); | ||
|
||
let browser; | ||
let page; | ||
beforeAll(async () => { | ||
browser = await puppeteer.launch({headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox']}); | ||
page = await browser.newPage(); | ||
await page.setViewport({ width: ct.BT_SM, height: ct.WH }); | ||
await page.goto(`${ct.APP_URL}/docs/components.html`, { waitUntil: 'networkidle0' }); | ||
}); | ||
|
||
describe('Header on small screen devices', () => { | ||
test('Should display the menu on clicking the menu icon', async () => { | ||
// main menu | ||
expect(await page.evaluate("document.querySelector('#qg-site-nav').getAttribute('class')")).not.toMatch(/collapse show/); | ||
(await page.$('#qg-show-menu')).click(); | ||
await page.waitFor(ct.WT); | ||
expect(await page.evaluate("document.querySelector('#qg-site-nav').getAttribute('class')")).toMatch(/collapse show/); | ||
|
||
// nested menu | ||
expect(await page.evaluate("document.querySelector('.mega-menu').getAttribute('class')")).not.toMatch(/dropdown-menu mega-menu show/); | ||
(await page.$('#qgPrimaryNavForQueenslanders')).click(); | ||
await page.waitFor(ct.WT); | ||
expect(await page.evaluate("document.querySelector('.mega-menu').getAttribute('class')")).toMatch(/dropdown-menu mega-menu show/); | ||
}, ct.TO); | ||
|
||
test('Should display the search on clicking search icon', async () => { | ||
expect(await page.evaluate("document.querySelector('#qg-global-search-form').getAttribute('class')")).not.toMatch(/qg-search-form qg-global-web-autocomplete collapse/); | ||
(await page.$('#qg-show-search')).click(); | ||
await page.waitFor(ct.WT); | ||
expect(await page.evaluate("document.querySelector('#qg-global-search-form').getAttribute('class')")).toMatch(/qg-search-form qg-global-web-autocomplete collapse/); | ||
}, ct.TO); | ||
|
||
afterAll(async () => { | ||
await browser.close(); | ||
}); | ||
}); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const ghpages = require('gulp/gh-pages'); | ||
const replace = require('replace-in-file'); | ||
|
||
replace.sync({ | ||
files: 'release/docs/**/*.html', | ||
from: /\/\/static/g, | ||
to: '//test-static', | ||
}); | ||
|
||
ghpages.publish('release/docs', function (err) { | ||
console.log(err); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 8 additions & 11 deletions
19
src/assets/_project/_blocks/layout/footer/feedback-form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters