Skip to content

Commit

Permalink
fixed js and ts examples refers to create-nightwatch issue 99 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsinghsandhu authored Oct 25, 2023
1 parent 82cb8ad commit 84ab350
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions assets/js-examples-new/examples/basic/duckDuckGo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('duckduckgo example', function() {
.waitForElementVisible('input[name=q]')
.sendKeys('input[name=q]', ['Nightwatch.js'])
.click('*[type="submit"]')
.assert.visible('.results--main')
.assert.textContains('.results--main', 'Nightwatch.js');
.assert.visible('#react-layout')
.assert.textContains('#react-layout', 'Nightwatch.js');
});
});
2 changes: 1 addition & 1 deletion assets/js-examples-new/page-objects/google/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {

elements: {
searchBar: {
selector: 'input[name=q]'
selector: 'textarea[name=q]'
},

submitButton: {
Expand Down
4 changes: 2 additions & 2 deletions assets/js-examples/duckDuckGo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('duckduckgo example', function() {
.waitForElementVisible('#search_form_input_homepage')
.sendKeys('#search_form_input_homepage', ['Nightwatch.js'])
.click('#search_button_homepage')
.assert.visible('.results--main')
.assert.textContains('.results--main', 'Nightwatch.js');
.assert.visible('#react-layout')
.assert.textContains('#react-layout', 'Nightwatch.js');
});
});
4 changes: 2 additions & 2 deletions assets/ts-examples/duckDuckGo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('duckduckgo example', function(this: ExtendDescribeThis<CustomThis>) {
.waitForElementVisible(this.searchBox!)
.sendKeys(this.searchBox!, ['Nightwatch.js'])
.click(this.submitButton!)
.assert.visible('.react-results--main')
.assert.textContains('.react-results--main', 'Nightwatch.js');
.assert.visible('#react-layout')
.assert.textContains('#react-layout', 'Nightwatch.js');
});
});
2 changes: 1 addition & 1 deletion assets/ts-examples/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const home: NightwatchTests = {
.waitForElementVisible('div[data-testid="results-list"]:first-child')
.assert.textContains(
'div[data-testid="results-list"]:first-child',
'End-to-end testing framework written in Node.js and using the W3C Webdriver API'
'Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API'
);
},

Expand Down

0 comments on commit 84ab350

Please sign in to comment.