-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Masked input test #56
Draft
sahilSingh-sapient
wants to merge
151
commits into
audit-2024
Choose a base branch
from
masked-input-test
base: audit-2024
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
c31cef2
Initial commit, Added input masking test, Added tests for masking fun…
sahilSingh-sapient 11dc9e4
Updated input-masking tests. Added keyboard interaction test
sahilSingh-sapient 4eba83a
Fix spelling in text content
a092667
Replace gremlin characters
07d888a
Fix spelling within meta info
5ebfe12
Improve scripts to use localhost if IP is blocked by firewall
5ec98a7
Switch the colours for npm notifications and do not use
7ce6950
Add a hover style to drawer button controls
1ca90a7
Add File work-in-progress comments and add to meta info
1071cb2
Update HTML closures
96eea04
Add npm file comment
0f47e77
Remove wip meta for pages linked in menu
54120b6
Add the .vscode folder to the .gitignore
d09603c
Improve sentences
773e444
Improve sentences on home page
13efdea
Merge pull request #64 from alisonhall/minor-html-comment-improvements
zoltan-dulac 00fc8f0
Merge pull request #57 from alisonhall/fix-spelling
zoltan-dulac 2783a0f
Merge pull request #60 from alisonhall/improve-script-for-firewall
zoltan-dulac cf25a11
Merge pull request #61 from alisonhall/switch-notification-colours
zoltan-dulac 34f4f9b
Merge pull request #62 from alisonhall/hover-style-on-drawers
zoltan-dulac dd8d9cc
Update the sitemap with content previously work-in-progres
2500953
Update spelling and text on the code quality page
87e1d26
Clean up the unit test code that is shown on the code quality page
e759c99
Added test cases for keyboard and mouse interactions & input validati…
sahilSingh-sapient 171ea28
Merge pull request #69 from alisonhall/update-sitemap
zoltan-dulac ded8acd
Minor grammar change
450259b
Merge pull request #70 from alisonhall/updates-to-code-quality-page
zoltan-dulac 653c3e3
Corrected labels for mark tag tests.
zoltan-dulac 4688c89
Standardize JS/Javascript/javascript to JavaScript
84b8005
Fix the NPM instruction notification text
3108c20
Fix spelling in animated-gif-with-pause-button
d5e55de
Fix and clarify the content about disabled buttons
3f7d7d6
Add an aria and JS disabled button example
0b91b5c
Improve text content for the button page
9e42185
Add package script to run ESLint tests
a582f56
Add GitHub Actions for pull request to main
f59ae8f
Only have basic ESLint action
68f7b88
Update eslint settings
95f3405
Rename actions file, add job for automation tests
277b78e
Fix ESLint issue
aea1419
Start server and run tests concurrently in actions
0d9a8a0
Install Chrome in GitHub Actions
ef369bd
Alow downgrades of Chrome
1de9f38
Fix carousel-init code
e50f30e
Debug the Chrome version
f7df1c9
Temporarily skip Pa11y tests
5e67425
Re-enable pa11y tests, add configs, use localhost
68773c2
Add Google Chrome path, use IP
920863f
Upgrade the pa11y-ci package version
ea5fd73
Update the pa11y config
ae2df7a
Set the pa11y executable path for Linux only
fb85859
Fix command
b4e9208
Try to separate starting the server from running the tests
72a835e
Cleanup actions
e116f46
Add installation comments
b374405
Update ESLint settings to match current code
7fe208f
Add a script command to run the ESLint tests
9acd534
Fix linting issues
165dcc0
Upgrade the pa11y-ci npm package version
6db6c4b
Add a GitHub action on push to run the ESLint scan
4fa498f
Add a GitHub action on push to run the automated tests
9cd2734
Update the pa11y config with an optional Chrome exec path
bf6c16e
Add additional options for installing Lynx and PHP on Linux
1997be5
Add a callout about updating the GitHub Actions if the prerequisites …
27e20ac
Add comments to github actions file
320d352
Install prettier related packages
e1c816e
Add basic prettier configuration
92f8cc9
Add filetype to callInAllWebComponents file
9382388
Update prettier config, integrate it with eslint
98626df
Add the husky and git-format-staged packages for git hooks
75caaec
Add a default editorconfig file for 4 spaces as the indent
028b48e
Update the husky prepare script to not install on prod or CI
09b7f21
Add a command to check if prettier needs to fix anything
d3846d6
Add a precommit hook to run prettier on staged lines of files
43202aa
Merge pull request #71 from alisonhall/update-button-page-content
zoltan-dulac efd04c6
Merge pull request #72 from alisonhall/add-github-actions-on-push
zoltan-dulac c3d06f2
Merge branch 'main' into add-automatic-formatting
b65e289
Fix file reference issue from Switch.js to switch.js
zoltan-dulac dbfbaf5
Merge pull request #77 from PublicisSapient/switch-case-sensitive-iss…
zoltan-dulac a1168f8
Merge branch 'main' into add-automatic-formatting
3b2cf19
Added option to choose different tab selected on load by looking at w…
zoltan-dulac 8dc612c
Made the selected tab coded with a data attribute, since we don't wan…
zoltan-dulac 23b4d58
Added documentation on selecting first tab functionality.
zoltan-dulac 580088b
Merge pull request #78 from PublicisSapient/tabs-choose-select-on-load
zoltan-dulac ba9dfa7
- Fix docs for hamburger flyout menu.
zoltan-dulac ca2998c
update carousel unit test.
zoltan-dulac ea3709b
Adding carousel unit test fix.
zoltan-dulac b76417f
Fix the carousel
zoltan-dulac 0b402c9
Add latest google chrome in push-actions.yml
zoltan-dulac 61e0b4e
Force Chrome version update to 124.0 in push-actions.yml
zoltan-dulac 651478a
Fix defect in push-actions.yml chrome install script.
zoltan-dulac 89e37c8
Fix false positive on the 2nd carousel in axe.
zoltan-dulac 02e3761
Added comment about why axe test was excluded for 2nd carousel example.
zoltan-dulac 74e721d
Merge pull request #80 from PublicisSapient/hamburger-menu-documentation
zoltan-dulac f7089bb
Added instructions for Github Actions.
zoltan-dulac 082441a
Merge pull request #81 from PublicisSapient/update-unit-test-docs-2024
zoltan-dulac 71a0ac4
Updated image.
zoltan-dulac f86b6ac
Merge branch 'main' into add-automatic-formatting
zoltan-dulac b7ce0b8
Update package-lock
36ccd95
Add comments around formatting and commits
0f63630
Merge pull request #85 from PublicisSapient/add-automatic-formatting-2
zoltan-dulac 75f9248
Add README info about contributing and PRs
a4438bd
Apply automatic formatting to all files
58395b0
Merge pull request #87 from PublicisSapient/apply-automatic-formatting
zoltan-dulac 62e488a
Merge branch 'main' into add-pr-info-to-readme
zoltan-dulac 521677a
Merge pull request #86 from PublicisSapient/add-pr-info-to-readme
alisonhall e2c816d
Adding npm publish information.
zoltan-dulac 7854e1c
Merge pull request #105 from PublicisSapient/dev-notes-2024
zoltan-dulac 6e58fca
Use the automatically changed CSS file formatting
b315e36
Merge pull request #107 from PublicisSapient/update-css-formatting
alisonhall 121c5a9
Fixed #67: Needed to make folder for cache if not there.
AbsentSemicolon b980505
Merge pull request #111 from PublicisSapient/fix-marquee-demo
zoltan-dulac 69cc56e
Fixed PHP binPath for windows users
lunarias 213880c
Fix the command to format files on pre-commit
a40e337
Format existing files
3987b17
Fix the link comment format
8d2cfbe
Merge pull request #114 from PublicisSapient/fix-format-precommit
alisonhall 2ec0b8e
test commit for readme file
josiahwilliams 6e56402
test commit for new github userid
josiahwilliams f0275bf
Adding additional instructions for Java install
josiahwilliams e3fe8b8
Updates info for testing
josiahwilliams 3843530
Updates Java install instructions. Clarifies local server for tests
josiahwilliams fbae215
removing : and space between asterik
Neha-Singla 4ef405f
Merge pull request #115 from PublicisSapient/chore/update-readme
josiahwilliams eea84f0
Merge branch 'main' into binPath-fixed
josiahwilliams 37979f9
Merge pull request #112 from PublicisSapient/binPath-fixed
lunarias 2458cbe
commiting asterik space fix
Neha-Singla d738a6b
Merge branch 'main' into 89-vd-change-form-error-checking-page
Neha-Singla 4739fb3
PR comments
Neha-Singla 49b87fa
Merge branch '89-vd-change-form-error-checking-page' of https://githu…
Neha-Singla fc3fd5d
feat: Adding icons next to headings to have summarized info
shiprarawal 2202040
Fix prettier precommit for images
b7744a4
Merge pull request #129 from PublicisSapient/add-image-to-heading
alisonhall b124b90
updating with main
Neha-Singla 9bf2d4e
updating with main
Neha-Singla ff0c5d2
Merge branch 'main' of https://github.com/PublicisSapient/enable-a11y…
Neha-Singla f1ab975
Merge pull request #119 from PublicisSapient/89-vd-change-form-error-…
Neha-Singla cc4e4d7
Merge branch 'main' into fix-precommit-for-images
alisonhall 490a831
Merge pull request #132 from PublicisSapient/fix-precommit-for-images
alisonhall 6f1b4a1
Merge branch 'main' of ssh://ssh.github.com:443/PublicisSapient/enabl…
zoltan-dulac f3ac314
Adding mouseSelection.png
zoltan-dulac 5e8a32b
I think I added the right dependency for robotjs ... let's see.
zoltan-dulac 771a561
Attempt 2 to get robotjs running on CI/CD pipeline: Installing Xvfb
zoltan-dulac f2edc86
Attempt 3 for CI/CD fix: installing libpng++-dev
zoltan-dulac 7186308
Attempt #4
zoltan-dulac 715cea4
Attempt #4a
zoltan-dulac 175eaf7
commiting css change in .less file also
Neha-Singla eeb1ba8
Merge pull request #137 from PublicisSapient/89-vd-change-form-error-…
Neha-Singla 8e4924d
Attempt #5 -- ensuring the ESLINT npm ci is done after ensuring X11 l…
zoltan-dulac 4ebcd9d
Merge branch 'main' of ssh://ssh.github.com:443/PublicisSapient/enabl…
zoltan-dulac 6e9fbb0
Merge with main.
zoltan-dulac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
"use strict"; | ||
|
||
import config from "./test-config.js"; | ||
import testHelpers from "./test-helpers.js"; | ||
import puppeteer from "puppeteer"; | ||
let mobileBrowser, desktopBrowser; | ||
|
||
describe("Input mask test suite", () => { | ||
beforeAll(async () => { | ||
mobileBrowser = await testHelpers.getMobileBrowser(); | ||
desktopBrowser = await testHelpers.getDesktopBrowser(); | ||
}); | ||
afterAll(async () => { | ||
await testHelpers.pause(); | ||
mobileBrowser.close(); | ||
desktopBrowser.close(); | ||
}); | ||
// Masking functionality tests | ||
it("Testing the masking functionality", async () => { | ||
const page = await desktopBrowser.newPage(); | ||
await page.goto(`${config.BASE_URL}/input-mask.php`); | ||
await page.type("#tel", "1234567890"); | ||
const maskedTelephone = await page.$eval( | ||
"span.enable-input-mask__mask-pre-val", | ||
(span) => span.textContent | ||
); | ||
expect(maskedTelephone).toBe("123-456-7890"); | ||
}); | ||
it("should render winkey masked correctly", async () => { | ||
const page = await desktopBrowser.newPage(); | ||
await page.goto(`${config.BASE_URL}/input-mask.php`); | ||
await page.type("#winkey", "abcdefghijklmnopqrstuvwxy"); | ||
const maskedWinKey = await page.$$eval( | ||
"span.enable-input-mask__mask-pre-val", | ||
(spans) => spans[1].textContent | ||
); | ||
expect(maskedWinKey).toBe("ABCDE-FGHIJ-KLMNO-PQRST-UVWXY"); | ||
}); | ||
it("should render cc masked correctly (non Amex)", async () => { | ||
const page = await desktopBrowser.newPage(); | ||
await page.goto(`${config.BASE_URL}/input-mask.php`); | ||
await page.type("#cc", "5555555555555555"); | ||
const maskedWinKey = await page.$$eval( | ||
"span.enable-input-mask__mask-pre-val", | ||
(spans) => spans[2].textContent | ||
); | ||
expect(maskedWinKey).toBe("5555 5555 5555 5555"); | ||
}); | ||
it("should render cc masked correctly (Amex)", async () => { | ||
const page = await desktopBrowser.newPage(); | ||
await page.goto(`${config.BASE_URL}/input-mask.php`); | ||
await page.type("#cc", "3455555555555555"); | ||
const maskedWinKey = await page.$$eval( | ||
"span.enable-input-mask__mask-pre-val", | ||
(spans) => spans[2].textContent | ||
); | ||
expect(maskedWinKey).toBe("3455 555555 55555"); | ||
}); | ||
//Simulate keyboard interaction | ||
|
||
it("should render formatted value correctly post keyboard interaction", async () => { | ||
const page = await desktopBrowser.newPage(); | ||
await page.goto(`${config.BASE_URL}/input-mask.php`, { | ||
waitUntil: "domcontentloaded", | ||
}); | ||
|
||
const telInput = "#tel"; | ||
await page.focus(telInput); | ||
await page.keyboard.type("1234567890"); | ||
await page.keyboard.press("Backspace"); | ||
await page.keyboard.press("ArrowLeft"); | ||
await page.keyboard.type("1"); | ||
const maskedTelephone = await page.$eval( | ||
"span.enable-input-mask__mask-pre-val", | ||
(span) => span.textContent | ||
); | ||
expect(maskedTelephone).toBe("123-456-781"); | ||
}); | ||
}); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are great so far! Thank you.
I would also like to ensure we test the mouse functionality as well:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy, will work on getting these in.