Skip to content

Commit

Permalink
ci: Trying to find out if browser in Github Actions supports full ICU
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed Mar 26, 2020
1 parent e4fb8f6 commit 221e4c5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.target }}
name: ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
Expand Down
25 changes: 25 additions & 0 deletions src/tests/full-icu.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { APP_INDEX_URL } from './constants.js';
import {
ok,
} from './helpers/typed-assert.js';

describe('timezones', () => {
before(async () => {
await browser.url(APP_INDEX_URL);
});

function hasFullICU() {
try {
const january = new Date(9e8);
const spanish = new Intl.DateTimeFormat('es', { month: 'long' });
return spanish.format(january) === 'enero';
} catch (err) {
return false;
}
}

it(`supports full ICU`, () => {
ok(hasFullICU());
});

});
3 changes: 2 additions & 1 deletion src/tests/wdio.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import type { WdioConfig } from './custom_wdio.js';
export const config: WdioConfig = {
runner: 'local',
specs: [
'./dist/tests/**/*.spec.js',
'./dist/tests/**/full-icu.spec.js',
// './dist/tests/**/*.spec.js',
// './dist/tests/app-datepicker/tests.js',
// './dist/tests/app-datepicker-dialog/tests.js',
],
Expand Down
3 changes: 2 additions & 1 deletion src/tests/wdio.sl.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const baseCapability: SauceLabsCapability = {
screenResolution: '800x600',
seleniumVersion: '3.141.59',
},
specs: ['./dist/tests/**/*.spec.js'],
specs: ['./dist/tests/**/full-icu.spec.js'],
// specs: ['./dist/tests/**/*.spec.js'],
// specs: ['./dist/tests/app-datepicker/tests.js'],
// specs: ['./dist/tests/app-datepicker-dialog/tests.js'],
browserName: 'googlechrome',
Expand Down

0 comments on commit 221e4c5

Please sign in to comment.