Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"0_select": "[data-qa='html-select']", | ||
"1_material_select_div": "[data-qa='material-select']", | ||
"2_li": "html=<div class=\"MuiPaper-root MuiMenu-paper MuiPopover-paper MuiPaper-elevation8 MuiPaper-rounded\" tabindex=\"-1\" style=\"opacity: 1; transform: none; min-width: 140px; transition: opacity 247ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 165ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; top: 59px; left: 443px; transform-origin: 0px 24.5px;\" qaw_innertext=\"Cat Dog Hedgehog\"><ul class=\"MuiList-root MuiMenu-list MuiList-padding\" role=\"listbox\" tabindex=\"-1\" aria-labelledby=\"label\" qaw_innertext=\"Cat Dog Hedgehog\"><li class=\"MuiButtonBase-root MuiListItem-root MuiMenuItem-root MuiMenuItem-gutters MuiListItem-gutters MuiListItem-button\" tabindex=\"-1\" role=\"option\" aria-disabled=\"false\" data-value=\"dog\" qaw_innertext=\"Dog\"></li></ul></div>", | ||
"3_material_select_select": "[data-qa='material-select-native'] select", | ||
"4_material_select_div": "[data-qa='material-select-multiple']", | ||
"5_li": "html=<div class=\"MuiPaper-root MuiMenu-paper MuiPopover-paper MuiPaper-elevation8 MuiPaper-rounded\" tabindex=\"-1\" style=\"opacity: 1; transform: none; min-width: 140px; transition: opacity 275ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 183ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; top: 188px; left: 443px; transform-origin: 0px 24.5px;\" qaw_innertext=\"Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><ul class=\"MuiList-root MuiMenu-list MuiList-padding\" role=\"listbox\" tabindex=\"-1\" aria-labelledby=\"label-multiple\" qaw_innertext=\"Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><li class=\"MuiButtonBase-root MuiListItem-root MuiMenuItem-root MuiMenuItem-gutters MuiListItem-gutters MuiListItem-button\" tabindex=\"0\" role=\"option\" aria-disabled=\"false\" data-value=\"Arya Stark\" qaw_innertext=\"Arya Stark\"></li></ul></div>", | ||
"6_li": "html=<div class=\"MuiPaper-root MuiMenu-paper MuiPopover-paper MuiPaper-elevation8 MuiPaper-rounded\" tabindex=\"-1\" style=\"opacity: 1; transform: none; min-width: 140px; transition: opacity 275ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 183ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; top: 188px; left: 443px; transform-origin: 0px 24.5px;\" qaw_innertext=\"Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><ul class=\"MuiList-root MuiMenu-list MuiList-padding\" role=\"listbox\" tabindex=\"-1\" aria-labelledby=\"label-multiple\" qaw_innertext=\"Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><li class=\"MuiButtonBase-root MuiListItem-root MuiMenuItem-root MuiMenuItem-gutters MuiListItem-gutters MuiListItem-button\" tabindex=\"-1\" role=\"option\" aria-disabled=\"false\" data-value=\"Jaime Lannister\" qaw_innertext=\"Jaime Lannister\"></li></ul></div>", | ||
"7_div": "html=<body style=\"overflow: hidden;\" qaw_innertext=\"Native HTML Best pet? Cat Dog Hedgehog Snake Material UI Best pet? Dog Favorite color? Blue Red Green Friends? Arya Stark, Jaime Lannister Semantic UI Country? Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><div role=\"presentation\" class=\"MuiPopover-root\" id=\"menu-\" style=\"position: fixed; z-index: 1300; right: 0px; bottom: 0px; top: 0px; left: 0px;\" qaw_innertext=\"Arya Stark Daenerys Targaryen Jaime Lannister Jon Snow Sansa Stark\"><div aria-hidden=\"true\" style=\"z-index: -1; position: fixed; right: 0px; bottom: 0px; top: 0px; left: 0px; background-color: transparent; -webkit-tap-highlight-color: transparent;\"></div></div></body>", | ||
"8_input": "[data-qa='semantic-select'] input", | ||
"9_div": "[data-qa='semantic-select']" | ||
} |
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,29 @@ | ||
const qawolf = require('qawolf'); | ||
const selectors = require('../selectors/selects.json'); | ||
const { TEST_URL } = require('./utils'); | ||
|
||
let browser; | ||
let page; | ||
|
||
beforeAll(async () => { | ||
browser = await qawolf.launch({ slowMo: 20 }); | ||
const context = await browser.newContext(); | ||
await qawolf.register(context); | ||
page = await context.newPage(); | ||
}); | ||
|
||
afterAll(() => browser.close()); | ||
|
||
test('selects', async () => { | ||
await page.goto(`${TEST_URL}selects`); | ||
await page.select("[data-qa='html-select']", 'cat'); | ||
await page.click("[data-qa='material-select']"); | ||
await page.click(selectors['2_li']); | ||
await page.select("[data-qa='material-select-native'] select", 'red'); | ||
await page.click("[data-qa='material-select-multiple']"); | ||
await page.click(selectors['5_li']); | ||
await page.click(selectors['6_li']); | ||
await page.click(selectors['7_div']); | ||
await page.click("[data-qa='semantic-select'] input"); | ||
await page.click("[data-qa='semantic-select']"); | ||
}); |
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 @@ | ||
module.exports.TEST_URL = process.env.TEST_URL || 'http://localhost:5000/'; |