Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ jobs:
- uses: DevExpress/testcafe-build-system/actions/prepare@main

- uses: DevExpress/testcafe-build-system/actions/build@main


test:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: DevExpress/testcafe-build-system/actions/prepare@main

- uses: DevExpress/testcafe-build-system/actions/test-npm@main

- name: Install dependencies
shell: bash
run: npm ci --legacy-peer-deps

- name: Run tests
shell: bash
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
with:
task: test
run: npm run test
Comment on lines +28 to +33

22 changes: 15 additions & 7 deletions test/mocha/browser-names-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ describe('Browser names', function () {
'ie@10.0:Windows 8',
'ie@11.0:Windows 8.1',
'edge@15.0:Windows 10',
'iPhone SE 2020@13',
'iPhone XR@15',
'iPhone SE 2022@15',
'iPhone 12@14',
'Google Pixel 7@13.0'
];

Expand All @@ -40,15 +40,23 @@ describe('Browser names', function () {
'ie@10.0:Windows 8',
'ie@11.0:Windows 8.1',
'edge@15.0:Windows 10',
'iPhone 7@10',
'iPhone SE 2020@13',
'iPhone XR@15',
'iPhone 14@16',
'iPhone SE 2022@15',
'iPhone 12@14',
];

return browserStackProvider
.getBrowserList()
.then(function (list) {
expect(list).to.include.members(IS_AUTOMATE ? AUTOMATE_BROWSER_NAMES : REST_BROWSER_NAMES);
const expectedList = IS_AUTOMATE ? AUTOMATE_BROWSER_NAMES : REST_BROWSER_NAMES;
const missingItems = [];

for (const item of expectedList) {
if (!list.includes(item))
missingItems.push(item);
}

expect(missingItems, `Missing from browser list: ${missingItems.join(', ')}`).to.be.empty;
});
});

Expand All @@ -62,7 +70,7 @@ describe('Browser names', function () {
'ie@9.0:Windows 7': true,
'ie@10.0:Windows 8': true,
'ie@11.0:Windows 10': true,
'iPhone SE 2020': true,
'iPhone SE 2022': true,
'Google Pixel 7': true,
'ie@5.0': false,
'ie@11:os x': false
Expand Down
Loading