Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions customConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"settings": {
"throttling": {
"rttMs": 0,
"throughputKbps": 20480,
"requestLatencyMs": 0,
"downloadThroughputKbps": 20480,
"uploadThroughputKbps": 20480,
"cpuSlowdownMultiplier": 1
},
"formFactor": "desktop",
"screenEmulation": {
"mobile": false,
"width": 1920,
"height": 1080,
"deviceScaleFactor": 1,
"disabled": false
}
}
}
32 changes: 17 additions & 15 deletions docker/v12.7.1/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docker/v12.7.1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"crawl": "node crawler/crawler.js"
},
"dependencies": {
"lh-pptr-framework": "1.1.2",
"lh-pptr-framework": "1.2.0",
"lighthouse": "^12.7.1",
"puppeteer": "^24.12.0",
"chai": "^5.2.0",
"puppeteer": "^24.12.1",
"chai": "^5.2.1",
"es-main": "^1.3.0",
"express": "^5.1.0",
"logform": "^2.7.0",
Expand Down
32 changes: 17 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"crawl": "node crawler/crawler.js"
},
"dependencies": {
"lh-pptr-framework": "1.1.2",
"lh-pptr-framework": "1.2.0",
"lighthouse": "^12.7.1",
"puppeteer": "^24.12.0",
"chai": "^5.2.0",
"puppeteer": "^24.12.1",
"chai": "^5.2.1",
"es-main": "^1.3.0",
"express": "^5.1.0",
"logform": "^2.7.0",
Expand Down
13 changes: 7 additions & 6 deletions pages/demoqa/buttonsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ButtonsPage extends Page {

init(page) {
super.init(page)
this.pageValidate = new Element("//button[text()='Click Me']", page)
this.clickBtn = new Button("//button[text()='Click Me']", page)
this.clickVerify = new Element("#dynamicClickMessage", page)
this.doubleClickBtn = new Button("//button[text()='Double Click Me']", page)
Expand All @@ -25,8 +26,8 @@ export default class ButtonsPage extends Page {
// Then: I wait for click message to appear
// And: I measure action time performance of the page
*/
async simpleClickButton(browser) {
await browser.timespan("Simple click button", async () => {
async simpleClickButton(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.clickBtn.click()
await this.clickVerify.find()
await browser.waitTillRendered()
Expand All @@ -40,8 +41,8 @@ export default class ButtonsPage extends Page {
// Then: I wait for click message to appear
// And: I measure action time performance of the page
*/
async doubleClickButton(browser) {
await browser.timespan("Double click button", async () => {
async doubleClickButton(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.doubleClickBtn.doubleClick()
await this.doubleClickVerify.find()
await browser.waitTillRendered()
Expand All @@ -55,8 +56,8 @@ export default class ButtonsPage extends Page {
// Then: I wait for click message to appear
// And: I measure action time performance of the page
*/
async rightClickButton(browser) {
await browser.timespan("Right click button", async () => {
async rightClickButton(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.rightClickBtn.rightClick()
await this.rightClickVerify.find()
await browser.waitTillRendered()
Expand Down
13 changes: 7 additions & 6 deletions pages/demoqa/checkBoxPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class CheckBoxPage extends Page {

init(page) {
super.init(page)
this.pageValidate = new Element("//*[@id='tree-node']//span[text()='Desktop']", page)
this.homeCheckBox = new Button("label[for='tree-node-home']", page)
this.homeSelectVerify = new Element("//*[@id='result']/span[text()='home']", page)
this.checkBoxExpandHome = new Button("#tree-node > ol > li > span > button", page)
Expand All @@ -25,8 +26,8 @@ export default class CheckBoxPage extends Page {
// Then: I wait for 'Home' checkbox to be selected
// And: I measure action time performance of the page
*/
async selectHomeCheckbox(browser) {
await browser.timespan("Select 'Home' checkBox", async () => {
async selectHomeCheckbox(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.homeCheckBox.click()
await this.homeSelectVerify.find()
await browser.waitTillRendered()
Expand All @@ -40,8 +41,8 @@ export default class CheckBoxPage extends Page {
// Then: I wait for 'Home' treeNode to be expanded
// And: I measure action time performance of the page
*/
async expandHomeTreeNode(browser) {
await browser.timespan("Expand 'Home' treeNode", async () => {
async expandHomeTreeNode(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.checkBoxExpandHome.click()
await this.checkBoxSelectVerify.find()
await browser.waitTillRendered()
Expand All @@ -56,8 +57,8 @@ export default class CheckBoxPage extends Page {
// Then: I wait for 'Desktop' checkbox to be deselected
// And: I measure action time performance of the page
*/
async deselectDesktopCheckbox(browser) {
await browser.timespan("Deselect 'Desktop' checkBox", async () => {
async deselectDesktopCheckbox(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.desktopCheckbox.click()
await this.desktopCheckboxVerify.findHidden()
await browser.waitTillRendered()
Expand Down
6 changes: 4 additions & 2 deletions pages/demoqa/homePage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Page from "lh-pptr-framework/core/page.js";
import Element from "lh-pptr-framework/core/elements/element.js";
import Button from "lh-pptr-framework/core/elements/button.js";
import TextField from "lh-pptr-framework/core/elements/textField.js";

Expand All @@ -10,6 +11,7 @@ export default class HomePage extends Page {

init(page) {
super.init(page)
this.pageValidate = new Element('//h5[text()="Elements"]', page)
this.elements = new Button('//h5[text()="Elements"]', page)
this.forms = new Button('//h5[text()="Forms"]', page)
this.alertsFrameWindows = new Button('//h5[text()="Alerts, Frame & Windows"]', page)
Expand All @@ -26,8 +28,8 @@ export default class HomePage extends Page {
// Then: I wait for the new page to be rendered
// And: I stop measuring action time performance of the page
*/
async clickOnElements(browser) {
await browser.timespan("Click on 'Elements'", async () => {
async clickOnElements(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.elements.count()
await this.elements.click()
await browser.waitTillRendered()
Expand Down
5 changes: 3 additions & 2 deletions pages/demoqa/textBoxPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class TextBoxPage extends Page {

init(page) {
super.init(page)
this.pageValidate = new Element("input[id='userName']", page)
this.fullName = new TextField("input[id='userName']", page)
this.userEmail = new TextField("input[id='userEmail']", page)
this.currentAddress = new TextField("textarea[id='currentAddress']", page)
Expand All @@ -27,13 +28,13 @@ export default class TextBoxPage extends Page {
// And: I wait for "textBoxVerify" to be visible
// And: I stop measuring action time performance of the page
*/
async submitTextForm(browser) {
async submitTextForm(browser, testContext) {
await this.fullName.type("UI TESTER")
await this.userEmail.type("ui_tester@gmail.com")
await this.currentAddress.type("mars, musk st., 39 apt., twitter")
await this.permanentAddress.type("earth, UK, cotswolds, clarkson's farm")

await browser.timespan("Submit text box form", async () => {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.submit.click()
await this.textBoxVerify.find()
await browser.waitTillRendered()
Expand Down
9 changes: 5 additions & 4 deletions pages/demoqa/uploadDownloadPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class UploadDownloadPage extends Page {

init(page) {
super.init(page)
this.pageValidate = new Element("input[id='uploadFile']", page)
this.uploadFile = new UploadField("input[id='uploadFile']", page)
this.uploadVerify = new Element("//*[@id='uploadedFilePath' and contains(text(),'uploadTest.txt')]", page)
}
Expand All @@ -21,11 +22,11 @@ export default class UploadDownloadPage extends Page {
// Then: I wait for upload verification message to appear
// And: I measure action time performance of the page
*/
async uploadFileIntoInput(browser) {
await browser.timespan("Upload file into 'Choose File'", async () => {
await this.uploadFile.upload("/testdata/files/uploadTest.txt")
async uploadFileIntoInput(browser, testContext) {
await browser.timespan(`${testContext?.test?.title}`, async () => {
await this.uploadFile.upload("/testdata/files/uploadTest.txt") // Windows requires full path
await this.uploadVerify.find()
await browser.waitTillRendered() //TODO it fails with "RESULT_CODE_KILLED_BAD_MESSAGE"
await browser.waitTillRendered()
})
}

Expand Down
Loading