Skip to content

Commit bea2579

Browse files
committed
os platform fix
1 parent 6cb2616 commit bea2579

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bin/accessibility-automation/cypress/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ Cypress.on('test:after:run', (attributes, runnable) => {
3636
console.log("Error while validating test case for accessibility before scanning. Error : ", error);
3737
}
3838
}
39+
let os_data;
40+
if (Cypress.env("OS")) {
41+
os_data = Cypress.env("OS");
42+
} else {
43+
os_data = Cypress.platform === 'linux' ? 'mac' : "win"
44+
}
3945
const dataForExtension = {
4046
"saveResults": shouldScanTestForAccessibility,
4147
"testDetails": {
@@ -48,7 +54,7 @@ Cypress.on('test:after:run', (attributes, runnable) => {
4854
]
4955
},
5056
"platform": {
51-
"os_name": Cypress.platform === "darwin" ? "mac" : "windows",
57+
"os_name": os_data,
5258
"os_version": Cypress.env("OS_VERSION"),
5359
"browser_name": Cypress.browser.name,
5460
"browser_version": Cypress.browser.version

bin/accessibility-automation/plugin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const browserstackAccessibility = (on, config) => {
3434
})
3535
config.env.ACCESSIBILITY_EXTENSION_PATH = process.env.ACCESSIBILITY_EXTENSION_PATH
3636
config.env.OS_VERSION = process.env.OS_VERSION
37-
config.env.OS = process.env.SESSION_OS
37+
config.env.OS = process.env.OS
3838

3939
config.env.IS_ACCESSIBILITY_EXTENSION_LOADED = browser_validation.toString()
4040

0 commit comments

Comments
 (0)