webship-js 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,21 +13,23 @@ jobs:
13
13
  steps:
14
14
  - name: Install Chrome
15
15
  run: |
16
- sudo apt install libu2f-udev
16
+ sudo apt install libu2f-udev
17
17
  sudo apt-get install libappindicator1 fonts-liberation libgbm1 libgtk-3-0 xdg-utils
18
18
  export CHROME_BIN=/usr/bin/google-chrome
19
- CHROME_VERSION="120.0.6099.109-1"
19
+ CHROME_VERSION="121.0.6167.85-1"
20
20
  wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
21
21
  sudo dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb
22
22
  rm google-chrome-stable_${CHROME_VERSION}_amd64.deb
23
+
23
24
  - name: Install/Update Chrome Driver
24
25
  run: |
25
- CHROME_DRIVER_VERSION="114.0.5735.90";
26
+ CHROME_DRIVER_VERSION=$(wget -qO- chromedriver.storage.googleapis.com/LATEST_RELEASE);
26
27
  echo $CHROME_DRIVER_VERSION;
27
28
  wget http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip
28
29
  unzip chromedriver_linux64.zip
29
- sudo chmod +x chromedriver
30
- sudo mv -f chromedriver /usr/bin/
30
+ chmod +x chromedriver
31
+ mkdir -p $HOME/.composer/vendor/bin
32
+ mv -f chromedriver $HOME/.composer/vendor/bin/
31
33
  rm chromedriver_linux64.zip
32
34
 
33
35
  - uses: actions/checkout@v3
@@ -38,13 +40,16 @@ jobs:
38
40
 
39
41
  - name: Run Selenium Standalone server
40
42
  run: |
41
- wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/selenium-server-4.1.2.jar
42
- java -jar selenium-server-4.1.2.jar -role node -hub http://localhost:4444
43
-
44
-
43
+ wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/selenium-server-4.1.2.jar
44
+ java -jar selenium-server-4.1.2.jar -role node -hub http://localhost:4444
45
+
45
46
  - name: Install
46
47
  run: yarn install
47
48
  - name: Configure nightwatch.conf.js for Github
48
49
  run: node webship-init -ci github -os linux -b chrome
50
+ - name: Start virtual server
51
+ run: |
52
+ export NODE_OPTIONS=--openssl-legacy-provider
53
+ yarn start &
49
54
  - name: Test
50
55
  run: yarn test
@@ -36,7 +36,7 @@
36
36
  <label for="vehicle2"> I have a car</label><br>
37
37
  <input type="checkbox" id="boat" name="vehicle3" value="Boat">
38
38
  <label for="vehicle3"> I have a boat</label><br>
39
- <input type="checkbox" id="van" class="van" name="vehicle4a" value="Van">
39
+ <input type="checkbox" id="van" name="vehicle4" value="Van">
40
40
  <label for="vehicle4"> I have a van</label><br>
41
41
  </form>
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webship-js",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Webship JS automated functional testing.",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -9,7 +9,8 @@ Feature: An example to uncheck the checkbox
9
9
  And I check "#car"
10
10
  And I press "Submit"
11
11
  Then I should see "You have a Bike Car"
12
- When I check ".van"
12
+ When I check "#van"
13
+ And I press "Submit"
13
14
  Then I should see "You have a Bike Car Van"
14
15
  When I uncheck "#bike"
15
16
  And I press "Submit"
@@ -5,12 +5,6 @@ Feature: An example to click link
5
5
 
6
6
  Scenario: Check click link by link text
7
7
  Given I am on "/test--when--i-click-link.html"
8
- When I click "#aboutUsid"
8
+ When I click "About us link"
9
9
  And I wait max of 2 seconds
10
- Then I should see "About Us"
11
-
12
- Scenario: Check click link by link css class
13
- Given I am on "/test--when--i-click-link.html"
14
- When I click ".aboutUs"
15
- And I wait max of 2 seconds
16
- Then I should see "About Us"
10
+ Then I should see "About Us"
@@ -7,7 +7,7 @@ I want to be able to fill input text with value
7
7
  When I fill in "#uname" with "John Smith"
8
8
  When I fill in "#pword" with "1234"
9
9
  When I press "Login"
10
- Then I should see "You enter #uname: John Smith and Password: 1234"
10
+ Then I should see "You enter Username: John Smith and Password: 1234"
11
11
 
12
12
  Scenario: Check fill in input field with empty value
13
13
  Given I am on "/test--when--i-fill-in.html"
@@ -68,9 +68,7 @@ When(/^(I|we)* go to "([^"]*)?"$/, function (pronoundCase, url) {
68
68
  *
69
69
  */
70
70
  Then(/^(I|we)* should see "([^"]*)?"$/, function (pronoundCase, expectedText) {
71
- return this.shouldSee = function (browser) {
72
71
  browser.assert.textContains("html", expectedText);
73
- };
74
72
  });
75
73
 
76
74
  /**
@@ -81,9 +79,7 @@ Then(/^(I|we)* should see "([^"]*)?"$/, function (pronoundCase, expectedText) {
81
79
  *
82
80
  */
83
81
  Then(/^(I|we)* should not see "([^"]*)?"$/, function (pronoundCase, expectedText) {
84
- return this.shouldSee = function (browser) {
85
82
  browser.assert.not.textContains("html", expectedText);
86
- };
87
83
  });
88
84
 
89
85
  /**
@@ -111,7 +107,7 @@ When(/^(I|we)* move backward one page$/, function (pronoundCase) {
111
107
  *
112
108
  */
113
109
  When(/^(I|we)* press "([^"]*)?"$/, function (pronoundCase, element) {
114
- return browser.click('[value="' + element + '"]');
110
+ browser.click('[value="' + element + '"]');
115
111
  });
116
112
 
117
113
  /**
@@ -121,7 +117,7 @@ When(/^(I|we)* press "([^"]*)?"$/, function (pronoundCase, element) {
121
117
  *
122
118
  */
123
119
  When(/^(I|we)* click "([^"]*)?"$/, function (pronoundCase, item) {
124
- return browser.click(item);
120
+ return browser.click("link text", item);
125
121
  });
126
122
 
127
123
  /**
@@ -207,11 +203,8 @@ When(/^(I|we)* select "([^"]*)?" from "([^"]*)?"$/, function (pronoundCase, opti
207
203
  *
208
204
  */
209
205
  When(/^(I|we)* check "([^"]*)?"$/, function (pronoundCase, item) {
210
- browser.isSelected(item, function (result) {
211
- if (!result.value) {
212
- this.click(item);
213
- }
214
- });
206
+
207
+ browser.click(item);
215
208
  });
216
209
 
217
210
  /**
@@ -220,11 +213,8 @@ When(/^(I|we)* check "([^"]*)?"$/, function (pronoundCase, item) {
220
213
  *
221
214
  */
222
215
  When(/^(I|we)* uncheck "([^"]*)?"$/, function (pronoundCase, item) {
223
- browser.isSelected(item, function (result) {
224
- if (result.value) {
225
- this.click(item);
226
- }
227
- });
216
+
217
+ browser.click(item);
228
218
  });
229
219
 
230
220
  /**