Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qae 222 #37

Open
wants to merge 53 commits into
base: rpmstats
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
321052e
Merge pull request #35 from tidepool-org/rpmstats
brian-tidepool Aug 6, 2024
fdf2c3f
add try catch suppressednotifaction
brian-tidepool Aug 6, 2024
4a8c625
add waitForElementVisible for dateselector
brian-tidepool Aug 7, 2024
0a1cdc4
add idletimeout to prdchrome section nightwatchconf.js
brian-tidepool Aug 7, 2024
cc79a17
troubleshoot timeout 1
brian-tidepool Aug 7, 2024
f4fe1f3
add try catch file exists
brian-tidepool Aug 7, 2024
7b37b5e
return error checkfileexists
brian-tidepool Aug 7, 2024
6b8831a
troubleshoot2
brian-tidepool Aug 7, 2024
c2f9005
increase idle timeout
brian-tidepool Aug 7, 2024
2faf95f
test access custodial user and checks landing page for upload and res…
brian-tidepool Aug 16, 2024
3ab984c
Merge branch 'supressednotificationstest' into qae-222
brian-tidepool Aug 16, 2024
3d3bbf8
add browser quit in catch statement
brian-tidepool Aug 16, 2024
47eaedc
troubleshoot
brian-tidepool Aug 16, 2024
331a0f8
troubleshoot
brian-tidepool Aug 16, 2024
73a3829
fix timeout error
brian-tidepool Aug 16, 2024
80ccd6f
Updated config.yml
brian-tidepool Aug 16, 2024
5260fe3
merge previous changes
brian-tidepool Aug 19, 2024
413cae2
tests for profile page - profile section
brian-tidepool Aug 20, 2024
3f53b41
update profile editing tests
brian-tidepool Aug 20, 2024
a986f76
rename test to include section name profile
brian-tidepool Aug 20, 2024
a5c055a
update accessCustodialUser tests
brian-tidepool Aug 20, 2024
9619963
add assertion for Clinician User Logs in with Existing Credentials
brian-tidepool Aug 20, 2024
86fd865
revert 1200 to 300 timeout
brian-tidepool Aug 20, 2024
a96e129
fix assertion error
brian-tidepool Aug 20, 2024
5fe1caf
function checkFile added to module and imported into rpmstats tests
brian-tidepool Aug 21, 2024
8fbb7be
merge previous changes
brian-tidepool Aug 19, 2024
3cda7e3
tests for profile page - profile section
brian-tidepool Aug 20, 2024
e524b59
update profile editing tests
brian-tidepool Aug 20, 2024
06689ef
rename test to include section name profile
brian-tidepool Aug 20, 2024
c0e38a9
update editcustodialuserprofile tests
brian-tidepool Aug 21, 2024
db7377c
Merge branch 'qae-223' of https://github.com/tidepool-org/WebUITests …
brian-tidepool Aug 21, 2024
3765646
add addtional edit/save steps to ensure new values are checked after …
brian-tidepool Aug 21, 2024
4184268
update bio
brian-tidepool Aug 21, 2024
33d8ee6
update documentation/utilFile function name
brian-tidepool Aug 21, 2024
ce26fd7
update checkfile to checkfileexistence function call
brian-tidepool Aug 21, 2024
5027c9a
update checkfile to checkfileexistence function call
brian-tidepool Aug 21, 2024
86c67da
update documentation/utilFile function name
brian-tidepool Aug 21, 2024
ad1db1b
add await to checkFileExistence callls
brian-tidepool Aug 23, 2024
7f002e6
Update modules/utilFile.js
brian-tidepool Aug 23, 2024
269a314
Merge branch 'qae-222' into qae-223
brian-tidepool Aug 23, 2024
f291027
move assert into callback
brian-tidepool Aug 24, 2024
3d973f8
delete extra empty line
brian-tidepool Aug 24, 2024
c6813ad
fix checkfileexistence fail on first attempt
brian-tidepool Aug 24, 2024
215cff6
debug attempts checkfile
brian-tidepool Aug 24, 2024
0b4887e
debug open file error
brian-tidepool Aug 24, 2024
7541f49
debug error
brian-tidepool Aug 24, 2024
d515ed4
This reverts commit f291027664d15e789451767fbeeff1016b835ac1.
brian-tidepool Aug 24, 2024
02d1f8c
fix errors
brian-tidepool Aug 24, 2024
b8edd6f
add back prdchrome
brian-tidepool Aug 24, 2024
c5bd6fb
add command selectDiagnosesAs
brian-tidepool Aug 25, 2024
b6b1f89
fix selectdiagnoseas error
brian-tidepool Aug 25, 2024
7d1886e
fix edit missing and add implicit waits to prevent not saving values
brian-tidepool Aug 25, 2024
d40f84f
add implicit wait saving too fast
brian-tidepool Aug 26, 2024
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
12 changes: 12 additions & 0 deletions modules/utilFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable linebreak-style */
exports.checkFile = async (browser, fileName, attemptsCheckFileExists) => {
try {
console.log(fileName);
const exists = await browser.checkFileExists(attemptsCheckFileExists, fileName);
browser.assert.strictEqual(exists, true, 'exported rpm csv file exists ');
} catch (error) {
console.log(error);
browser.quit();
browser.assert.strictEqual(false, true, 'exported rpm csv file exists ');
}
};
347 changes: 347 additions & 0 deletions nightwatch.conf.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,347 @@
//
// Refer to the online docs for more details:
// https://nightwatchjs.org/guide/configuration/nightwatch-configuration-file.html
//
// _ _ _ _ _ _ _
// | \ | |(_) | | | | | | | |
// | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__
// | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \
// | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |
// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
// __/ |
// |___/
//

module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: [],

// See https://nightwatchjs.org/guide/concepts/page-object-model.html
page_objects_path: ['node_modules/nightwatch/examples/pages/'],

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
custom_commands_path: ['node_modules/nightwatch/examples/custom-commands/'],

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
custom_assertions_path: '',

// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
plugins: [],

// See https://nightwatchjs.org/guide/concepts/test-globals.html#external-test-globals
globals_path : '',

webdriver: {},

test_workers: {
enabled: true,
workers: 'auto'
},

test_settings: {
default: {
disable_error_log: false,
launch_url: 'https://nightwatchjs.org',

screenshots: {
enabled: false,
path: 'screens',
on_failure: true
},

desiredCapabilities: {
browserName : 'firefox'
},

webdriver: {
start_process: true,
server_path: ''
}
},



firefox: {
desiredCapabilities : {
browserName : 'firefox',
acceptInsecureCerts: true,
'moz:firefoxOptions': {
args: [
// '-headless',
// '-verbose'
]
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// very verbose geckodriver logs
// '-vv'
]
}
},

chrome: {
desiredCapabilities : {
browserName : 'chrome',
'goog:chromeOptions' : {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: true,
args: [
//'--no-sandbox',
//'--ignore-certificate-errors',
//'--allow-insecure-localhost',
//'--headless'
]
}
},

webdriver: {
start_process: true,
server_path: '',
cli_args: [
// --verbose
]
}
},

edge: {
desiredCapabilities : {
browserName : 'MicrosoftEdge',
'ms:edgeOptions' : {
w3c: true,
// More info on EdgeDriver: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options
args: [
//'--headless'
]
}
},

webdriver: {
start_process: true,
// Download msedgedriver from https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/
// and set the location below:
server_path: '',
cli_args: [
// --verbose
]
}
},

//////////////////////////////////////////////////////////////////////////////////
// Configuration for when using cucumber-js (https://cucumber.io) |
// |
// It uses the bundled examples inside the nightwatch examples folder; feel free |
// to adapt this to your own project needs |
//////////////////////////////////////////////////////////////////////////////////
'cucumber-js': {
src_folders: ['examples/cucumber-js/features/step_definitions'],

test_runner: {
// set cucumber as the runner
type: 'cucumber',

// define cucumber specific options
options: {
//set the feature path
feature_path: 'node_modules/nightwatch/examples/cucumber-js/*/*.feature',

// start the webdriver session automatically (enabled by default)
// auto_start_session: true

// use parallel execution in Cucumber
// workers: 2 // set number of workers to use (can also be defined in the cli as --workers=2
}
}
},

//////////////////////////////////////////////////////////////////////////////////
// Configuration for when using the browserstack.com cloud service |
// |
// Please set the username and access key by setting the environment variables: |
// - BROWSERSTACK_USERNAME |
// - BROWSERSTACK_ACCESS_KEY |
// .env files are supported |
//////////////////////////////////////////////////////////////////////////////////
browserstack: {
selenium: {
host: 'hub.browserstack.com',
port: 443
},
// More info on configuring capabilities can be found on:
// https://www.browserstack.com/automate/capabilities?tag=selenium-4
desiredCapabilities: {
'bstack:options' : {
userName: '${BROWSERSTACK_USERNAME}',
accessKey: '${BROWSERSTACK_ACCESS_KEY}',
}
},

disable_error_log: true,
webdriver: {
timeout_options: {
timeout: 15000,
retry_attempts: 3
},
keep_alive: true,
start_process: false
}
},

'browserstack.local': {
extends: 'browserstack',
desiredCapabilities: {
'browserstack.local': true
}
},

'browserstack.chrome': {
extends: 'browserstack',
desiredCapabilities: {
browserName: 'chrome',
chromeOptions : {
w3c: true
}
}
},

'browserstack.firefox': {
extends: 'browserstack',
desiredCapabilities: {
browserName: 'firefox'
}
},

'browserstack.ie': {
extends: 'browserstack',
desiredCapabilities: {
browserName: 'internet explorer',
browserVersion: '11.0'
}
},

'browserstack.safari': {
extends: 'browserstack',
desiredCapabilities: {
browserName: 'safari'
}
},

'browserstack.local_chrome': {
extends: 'browserstack.local',
desiredCapabilities: {
browserName: 'chrome'
}
},

'browserstack.local_firefox': {
extends: 'browserstack.local',
desiredCapabilities: {
browserName: 'firefox'
}
},
//////////////////////////////////////////////////////////////////////////////////
// Configuration for when using the SauceLabs cloud service |
// |
// Please set the username and access key by setting the environment variables: |
// - SAUCE_USERNAME |
// - SAUCE_ACCESS_KEY |
//////////////////////////////////////////////////////////////////////////////////
saucelabs: {
selenium: {
host: 'ondemand.saucelabs.com',
port: 443
},
// More info on configuring capabilities can be found on:
// https://docs.saucelabs.com/dev/test-configuration-options/
desiredCapabilities: {
'sauce:options' : {
username: '${SAUCE_USERNAME}',
accessKey: '${SAUCE_ACCESS_KEY}',
screenResolution: '1280x1024'
// https://docs.saucelabs.com/dev/cli/sauce-connect-proxy/#--region
// region: 'us-west-1'
// https://docs.saucelabs.com/dev/test-configuration-options/#tunnelidentifier
// parentTunnel: '',
// tunnelIdentifier: '',
}
},
disable_error_log: false,
webdriver: {
start_process: false
}
},
'saucelabs.chrome': {
extends: 'saucelabs',
desiredCapabilities: {
browserName: 'chrome',
browserVersion: 'latest',
javascriptEnabled: true,
acceptSslCerts: true,
timeZone: 'London',
chromeOptions : {
w3c: true
}
}
},
'saucelabs.firefox': {
extends: 'saucelabs',
desiredCapabilities: {
browserName: 'firefox',
browserVersion: 'latest',
javascriptEnabled: true,
acceptSslCerts: true,
timeZone: 'London'
}
},
//////////////////////////////////////////////////////////////////////////////////
// Configuration for when using the Selenium service, either locally or remote, |
// like Selenium Grid |
//////////////////////////////////////////////////////////////////////////////////
selenium_server: {
// Selenium Server is running locally and is managed by Nightwatch
// Install the NPM package @nightwatch/selenium-server or download the selenium server jar file from https://github.com/SeleniumHQ/selenium/releases/, e.g.: selenium-server-4.1.1.jar
selenium: {
start_process: true,
port: 4444,
server_path: '', // Leave empty if @nightwatch/selenium-server is installed
command: 'standalone', // Selenium 4 only
cli_args: {
//'webdriver.gecko.driver': '',
//'webdriver.chrome.driver': ''
}
},
webdriver: {
start_process: false,
default_path_prefix: '/wd/hub'
}
},

'selenium.chrome': {
extends: 'selenium_server',
desiredCapabilities: {
browserName: 'chrome',
chromeOptions : {
w3c: true
}
}
},

'selenium.firefox': {
extends: 'selenium_server',
desiredCapabilities: {
browserName: 'firefox',
'moz:firefoxOptions': {
args: [
// '-headless',
// '-verbose'
]
}
}
}
}
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"testdev1Chrome": "nightwatch --env dev1chrome",
"testqa2ChromeClinician": "nightwatch --env qa2chrome --tag clinician",
"testqa2ChromeNotifications": "nightwatch --env qa2chrome --tag notifications",
"testqa2ChromeRpm": "nightwatch --env qa2chrome --tag rpm2",
"testprdChromeRpm": "nightwatch --env prdchrome --tag rpm2",
"testqa2ChromeRpm": "nightwatch --env qa2chrome --tag rpm1",
"testprdChromeRpm": "nightwatch --env prdchrome --tag rpm1",
"testprdChromeNotifications": "nightwatch --env prdchrome --tag notifications",
"testqa2ChromeTag": "nightwatch --env qa2chrome --tag clinician",
"testCustodial": "nightwatch --env prdchrome,qa2chrome --tag qae-222",
Expand Down
Loading