webship-js 1.0.24 → 1.0.26

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.
@@ -47,7 +47,7 @@ commands:
47
47
  wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
48
48
  sudo dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb
49
49
  rm google-chrome-stable_${CHROME_VERSION}_amd64.deb
50
-
50
+
51
51
  ## Install/Update Chrome Driver.
52
52
  - run:
53
53
  name: Install/Update Chrome Driver
@@ -64,9 +64,9 @@ commands:
64
64
  - run:
65
65
  name: Run Selenium Standalone server
66
66
  command: |
67
- if [[ ! -f /home/circleci/selenium-server-4.1.2.jar ]]; then wget -O /home/circleci/selenium-server-4.1.2.jar https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/selenium-server-4.1.2.jar; fi
67
+ if [[ ! -f /home/circleci/selenium-server-4.4.0.jar ]]; then wget -O /home/circleci/selenium-server-4.4.0.jar https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.4.0/selenium-server-4.4.0.jar; fi
68
68
  cd /home/circleci/
69
- java -jar selenium-server-4.1.2.jar standalone
69
+ java -jar selenium-server-4.4.0.jar standalone
70
70
  background: true
71
71
 
72
72
  jobs:
@@ -13,21 +13,26 @@ jobs:
13
13
  steps:
14
14
  - name: Install Chrome
15
15
  run: |
16
- sudo apt install libu2f-udev
17
- sudo apt-get install libappindicator1 fonts-liberation libgbm1 libgtk-3-0 xdg-utils
18
- export CHROME_BIN=/usr/bin/google-chrome
19
- CHROME_VERSION="120.0.6099.109-1"
20
- wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
21
- sudo dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb
22
- rm google-chrome-stable_${CHROME_VERSION}_amd64.deb
16
+ sudo apt install libu2f-udev
17
+ sudo apt-get install libappindicator1 fonts-liberation libgbm1 libgtk-3-0 xdg-utils
18
+ export CHROME_BIN=/usr/bin/google-chrome
19
+ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
20
+ sudo apt-get clean
21
+ sudo apt-get update
22
+ sudo apt-get install dpkg
23
+ sudo dpkg -i google-chrome-stable_current_amd64.deb
24
+ rm google-chrome-stable_current_amd64.deb
25
+ google-chrome --version
26
+
23
27
  - name: Install/Update Chrome Driver
24
28
  run: |
25
- CHROME_DRIVER_VERSION="114.0.5735.90";
29
+ CHROME_DRIVER_VERSION=$(wget -qO- chromedriver.storage.googleapis.com/LATEST_RELEASE);
26
30
  echo $CHROME_DRIVER_VERSION;
27
31
  wget http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip
28
32
  unzip chromedriver_linux64.zip
29
- sudo chmod +x chromedriver
30
- sudo mv -f chromedriver /usr/bin/
33
+ chmod +x chromedriver
34
+ mkdir -p $HOME/.composer/vendor/bin
35
+ mv -f chromedriver $HOME/.composer/vendor/bin/
31
36
  rm chromedriver_linux64.zip
32
37
 
33
38
  - uses: actions/checkout@v3
@@ -38,13 +43,16 @@ jobs:
38
43
 
39
44
  - name: Run Selenium Standalone server
40
45
  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
-
46
+ wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.4.0/selenium-server-4.4.0.jar
47
+ java -jar selenium-server-4.4.0.jar -role node -hub http://localhost:4444
48
+
45
49
  - name: Install
46
50
  run: yarn install
47
51
  - name: Configure nightwatch.conf.js for Github
48
52
  run: node webship-init -ci github -os linux -b chrome
53
+ - name: Start virtual server
54
+ run: |
55
+ export NODE_OPTIONS=--openssl-legacy-provider
56
+ yarn start &
49
57
  - name: Test
50
58
  run: yarn test
package/.travis-ci.yml CHANGED
@@ -5,7 +5,7 @@ jdk:
5
5
  - openjdk-11-jre
6
6
 
7
7
  before_script:
8
- - docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-firefox:4.0.0-rc-1-prerelease-20210618
8
+ - docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-firefox:4.4.0-rc-1-prerelease-20210618
9
9
  - docker ps
10
10
 
11
11
  script:
@@ -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.26",
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
  /**