From d3d7688bbb5ed2e58d1e0c5a06f9165e9fb73988 Mon Sep 17 00:00:00 2001 From: JC Franco Date: Tue, 31 Oct 2023 12:14:28 -0700 Subject: [PATCH 01/15] fix(accordion-item): update expanded chevron color (#8087) # Adopted https://github.com/Esri/calcite-design-system/pull/8083 cc @abp6318 --- **Related Issue:** https://github.com/Esri/calcite-design-system/issues/7710 ## Summary Updated the chevron color for accordion items to use `ui-text-3` ## Video https://github.com/Esri/calcite-design-system/assets/60486980/1cb2302a-d869-4536-8ae5-59753a3f37c1 Co-authored-by: Aaron Putterman <60486980+abp6318@users.noreply.github.com> --- .../src/components/accordion-item/accordion-item.scss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/calcite-components/src/components/accordion-item/accordion-item.scss b/packages/calcite-components/src/components/accordion-item/accordion-item.scss index 86e6d868452..f214f886e3d 100644 --- a/packages/calcite-components/src/components/accordion-item/accordion-item.scss +++ b/packages/calcite-components/src/components/accordion-item/accordion-item.scss @@ -123,7 +123,7 @@ } :host([expanded]) .expand-icon { - @apply text-color-1; + @apply text-color-3; transform: rotate(var(--calcite-accordion-item-active-icon-rotation)); } @@ -176,9 +176,6 @@ & .icon { @apply text-color-1; } - & .expand-icon { - @apply text-color-1; - } & .description { @apply text-color-2; } From a9c7ed6b9e99997bbb8b308980002c8709c02aba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 31 Oct 2023 19:40:00 +0000 Subject: [PATCH 02/15] chore: release next --- package-lock.json | 14 +++++++------- packages/calcite-components-react/CHANGELOG.md | 4 ++++ packages/calcite-components-react/package.json | 4 ++-- packages/calcite-components/CHANGELOG.md | 6 ++++++ packages/calcite-components/package.json | 4 ++-- packages/calcite-design-tokens/CHANGELOG.md | 4 ++++ packages/calcite-design-tokens/package-lock.json | 4 ++-- packages/calcite-design-tokens/package.json | 2 +- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac341fa8451..377965dbf0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40936,7 +40936,7 @@ }, "packages/calcite-components": { "name": "@esri/calcite-components", - "version": "1.10.0", + "version": "1.10.1-next.0", "license": "SEE LICENSE.md", "dependencies": { "@floating-ui/dom": "1.5.3", @@ -40952,7 +40952,7 @@ "timezone-groups": "0.8.0" }, "devDependencies": { - "@esri/calcite-design-tokens": "^1.1.0", + "@esri/calcite-design-tokens": "^1.1.1-next.0", "@esri/calcite-ui-icons": "3.24.9", "@esri/eslint-plugin-calcite-components": "^0.2.3-next.4", "@stencil-community/eslint-plugin": "0.5.0", @@ -40964,10 +40964,10 @@ }, "packages/calcite-components-react": { "name": "@esri/calcite-components-react", - "version": "1.10.0", + "version": "1.10.1-next.0", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^1.10.0" + "@esri/calcite-components": "^1.10.1-next.0" }, "peerDependencies": { "react": ">=16.7", @@ -40976,7 +40976,7 @@ }, "packages/calcite-design-tokens": { "name": "@esri/calcite-design-tokens", - "version": "1.1.0" + "version": "1.1.1-next.0" }, "packages/eslint-plugin-calcite-components": { "name": "@esri/eslint-plugin-calcite-components", @@ -43188,7 +43188,7 @@ "@esri/calcite-components": { "version": "file:packages/calcite-components", "requires": { - "@esri/calcite-design-tokens": "^1.1.0", + "@esri/calcite-design-tokens": "^1.1.1-next.0", "@esri/calcite-ui-icons": "3.24.9", "@esri/eslint-plugin-calcite-components": "^0.2.3-next.4", "@floating-ui/dom": "1.5.3", @@ -43212,7 +43212,7 @@ "@esri/calcite-components-react": { "version": "file:packages/calcite-components-react", "requires": { - "@esri/calcite-components": "^1.10.0" + "@esri/calcite-components": "^1.10.1-next.0" } }, "@esri/calcite-design-tokens": { diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index cc9c60335ca..fc072a28786 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.10.1-next.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.10.0...@esri/calcite-components-react@1.10.1-next.0) (2023-10-31) + +**Note:** Version bump only for package @esri/calcite-components-react + ## [1.10.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.9.2...@esri/calcite-components-react@1.10.0) (2023-10-30) ### Miscellaneous Chores diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index dc003b6d702..16dcc1468f7 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -1,7 +1,7 @@ { "name": "@esri/calcite-components-react", "sideEffects": false, - "version": "1.10.0", + "version": "1.10.1-next.0", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", @@ -20,7 +20,7 @@ "dist/" ], "dependencies": { - "@esri/calcite-components": "^1.10.0" + "@esri/calcite-components": "^1.10.1-next.0" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index 072b15b9dd6..78d36f99670 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.10.1-next.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.10.0...@esri/calcite-components@1.10.1-next.0) (2023-10-31) + +### Bug Fixes + +- **accordion-item:** update expanded chevron color ([#8087](https://github.com/Esri/calcite-design-system/issues/8087)) ([d3d7688](https://github.com/Esri/calcite-design-system/commit/d3d7688bbb5ed2e58d1e0c5a06f9165e9fb73988)) + ## [1.10.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.9.2...@esri/calcite-components@1.10.0) (2023-10-30) ### Features diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index b039839502b..c9d3e25fe2a 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "1.10.0", + "version": "1.10.1-next.0", "homepage": "https://developers.arcgis.com/calcite-design-system/", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", @@ -77,7 +77,7 @@ "timezone-groups": "0.8.0" }, "devDependencies": { - "@esri/calcite-design-tokens": "^1.1.0", + "@esri/calcite-design-tokens": "^1.1.1-next.0", "@esri/calcite-ui-icons": "3.24.9", "@esri/eslint-plugin-calcite-components": "^0.2.3-next.4", "@stencil-community/eslint-plugin": "0.5.0", diff --git a/packages/calcite-design-tokens/CHANGELOG.md b/packages/calcite-design-tokens/CHANGELOG.md index c0bdb14c5ec..1213a68d9a1 100644 --- a/packages/calcite-design-tokens/CHANGELOG.md +++ b/packages/calcite-design-tokens/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.1-next.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-design-tokens@1.1.0...@esri/calcite-design-tokens@1.1.1-next.0) (2023-10-31) + +**Note:** Version bump only for package @esri/calcite-design-tokens + ## [1.1.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-design-tokens@1.0.0...@esri/calcite-design-tokens@1.1.0) (2023-10-30) ### Features diff --git a/packages/calcite-design-tokens/package-lock.json b/packages/calcite-design-tokens/package-lock.json index 69ebe93b061..60315420922 100644 --- a/packages/calcite-design-tokens/package-lock.json +++ b/packages/calcite-design-tokens/package-lock.json @@ -1,12 +1,12 @@ { "name": "@esri/calcite-design-tokens", - "version": "1.1.0", + "version": "1.1.1-next.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@esri/calcite-design-tokens", - "version": "1.1.0-next.3", + "version": "1.1.1-next.0", "devDependencies": {} }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/packages/calcite-design-tokens/package.json b/packages/calcite-design-tokens/package.json index 174922ddbfe..abfaee2b37a 100644 --- a/packages/calcite-design-tokens/package.json +++ b/packages/calcite-design-tokens/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-design-tokens", - "version": "1.1.0", + "version": "1.1.1-next.0", "description": "Esri's Calcite Design System Tokens", "keywords": [ "Calcite", From 5ead8199ed54f753cc13fd4dd8caee3ecf549380 Mon Sep 17 00:00:00 2001 From: JC Franco Date: Tue, 31 Oct 2023 13:27:10 -0700 Subject: [PATCH 03/15] test(input-time-zone): update screenshot tests to use time zones unaffected by DST (#8094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related Issue:** #8086 ## Summary βœ¨πŸ“ΈπŸ§ͺπŸ”¨βœ¨ --- .../input-time-zone/input-time-zone.stories.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/calcite-components/src/components/input-time-zone/input-time-zone.stories.ts b/packages/calcite-components/src/components/input-time-zone/input-time-zone.stories.ts index a8c251ac8f0..eea65a84e40 100644 --- a/packages/calcite-components/src/components/input-time-zone/input-time-zone.stories.ts +++ b/packages/calcite-components/src/components/input-time-zone/input-time-zone.stories.ts @@ -10,7 +10,8 @@ export default { chromatic: { delay: 1500 }, notes: readme, options: { - timezone: "America/Los_Angeles", + // for stability, we use a timezone unaffected by daylight savings time + timezone: "America/Mexico_City", }, }, ...storyFilters(), @@ -28,9 +29,9 @@ export const timeZoneNameMode_TestOnly = (): string => html` `; -export const initialNameSelected_TestOnly = (): string => html` - -`; +export const initialNameSelected_TestOnly = (): string => + // for stability, we use a timezone unaffected by daylight savings time + html``; export const initialOffsetSelected_TestOnly = (): string => html` From e980be0671ef2fe775dc441c8fefb710ec310c88 Mon Sep 17 00:00:00 2001 From: Kitty Hurley Date: Tue, 31 Oct 2023 16:29:10 -0500 Subject: [PATCH 04/15] docs(contributing): add supporting context for new contributors (#8097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related Issue:** n/a ## Summary - Refactors section on how contributors can help, as a few items have surfaced during Hacktoberfest πŸŽƒπŸ‘»πŸ¦‡ contributions - Issues - Dev work - Resources - Adds more context on why contributors should comment on issues (so we can assign issues to them) - Updates the jsbin url to reflect the latest versions (linked the same in our bug issue template) - Small copyedits - Adds conventional commit example and link to our recent commits for additional examples for folks to reference --- CONTRIBUTING.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 334249fd3cc..36a49eaedf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,11 +8,11 @@ Note: New contributors should first contact [Ben Elan](mailto:belan@esri.com) or You can help most by: +- Reporting issues by [filing a Bug issue](https://github.com/Esri/calcite-design-system/issues/new?assignees=&labels=bug%2C0+-+new%2Cneeds+triage&template=bug.yml). +- Requesting features for existing components by [creating an Enhancement issue](https://github.com/Esri/calcite-design-system/issues/new?assignees=&labels=enhancement%2C0+-+new%2Cneeds+triage&template=enhancement.yml). - Adding ideas for components by [creating a New Component issue](https://github.com/Esri/calcite-design-system/issues/new?assignees=&labels=new+component%2C0+-+new%2Cneeds+triage&template=new-component.yml). -- Requesting features for existing components by [creating a Enhancement issue](https://github.com/Esri/calcite-design-system/issues/new?assignees=&labels=enhancement%2C0+-+new%2Cneeds+triage&template=enhancement.yml). -- Reporting problems by [creating a Bug issue](https://github.com/Esri/calcite-design-system/issues/new?assignees=&labels=bug%2C0+-+new%2Cneeds+triage&template=bug.yml). - Working on [the issues marked as `help wanted`](https://github.com/Esri/calcite-design-system/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee). There is also a [`good first issue`](https://github.com/Esri/calcite-design-system/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+no%3Aassignee+) label if you are just getting started. - - Comment on the issue and ask for the action items before you start working. Sometimes additional context is needed, which may not be specified in the issue. + - To let us know of your interest in the issue, please comment on the issue and ask for the action items before you start working. Sometimes additional context is needed, which may not be specified in the issue. Comments also provide us access to assign the issue to you. - If you want to help develop components take a look at the [new component issues](https://github.com/Esri/calcite-design-system/issues?q=is%3Aopen+is%3Aissue+label%3A%22new+component%22). Before starting development please review our [component conventions](./conventions/README.md) and the [Stencil documentation](https://stenciljs.com/docs/introduction). If you aren't familiar with the basics of Web Components and Shadow DOM, please read through some of the following resources before contributing: @@ -27,14 +27,14 @@ Have you found a new bug? Want to request a new feature? We'd love to hear from If something isn't working the way you expect, take a look at the [existing issues](https://github.com/Esri/calcite-design-system/issues) before logging a new one. You can also report a bug or request an enhancement with [Esri Support](https://support.esri.com/en-us/contact), or ask questions, share ideas, and collaborate with others on [Esri Community](https://community.esri.com/t5/calcite-design-system/ct-p/calcite-design-system). -When filing an issue, provide all of the requested info from the appropriate [issue template](https://github.com/Esri/calcite-design-system/issues/new/choose) so we can work on resolving the issue as soon as possible. A sample that reproduces the issue is required for logging bugs, we created templates in [codepen](https://codepen.io/pen?template=RwgrjEx), [codesandbox](https://codesandbox.io/s/calcite-template-p95kp?file=/src/App.js), and [jsbin](https://jsbin.com/lopumatiru/edit?html,output) (with the ArcGIS Maps SDK for JavaScript) to help get started. Alternatively, a [documentation](https://developers.arcgis.com/calcite-design-system/components/) sample can be used if the issue is reproducible. Some other things to consider: +When filing an issue, provide all of the requested info from the appropriate [issue template](https://github.com/Esri/calcite-design-system/issues/new/choose) so we can work on resolving the issue as soon as possible. A sample that reproduces the issue is required for logging bugs - we created templates in [codepen](https://codepen.io/pen?template=RwgrjEx), [codesandbox](https://codesandbox.io/s/calcite-template-p95kp?file=/src/App.js), and [jsbin](https://jsbin.com/qecewik/edit?html,output) (with the ArcGIS Maps SDK for JavaScript) to get you started. Alternatively, a [documentation](https://developers.arcgis.com/calcite-design-system/components/) sample can be used if the issue is reproducible. Some other considerations: - Use a clear and descriptive title -- Detail what is happening now vs what should happen -- Tell us how to reproduce the issue (e.g. is it happening in a specific browser?) +- Describe what is happening now vs what should happen +- Tell us how to reproduce the issue (e.g., is it happening in a specific browser?) - Can it be reliably reproduced? If not, tell us how often it happens and under what circumstances. -- Screenshots and GIFs are our friends! -- Did this problem start happening after a recent release or was it always a bug? +- Screenshots and GIFs are welcome! +- Did this problem start happening after a recent release, or was it always a bug? ## Issue management @@ -56,9 +56,10 @@ An issue can only have one of the lifecycle labels at any time. Please make sure ### Issues that cannot be worked on -There are three labels that mean an issue is not ready for development: +There are four labels that mean an issue is not ready for development: - `design`: Issues that need design consultation, such as interaction research/feedback, visual mockups, and general approval. Once design completes their review, an additional label, `ready for dev` will be added to the issue, which means a developer can pick up the issue. +- `spike`: Issues that need to research a question or resolve a complex task with uncertain outcomes. Once the spike has been performed a `spike complete` label is added to the issue, which means a developer can pick up the issue. - `need more info`: Issues that are missing information and/or a clear, actionable description. This can mean we are waiting on a user to provide additional context, we can't reproduce the issue, or further discussion is needed in order to determine a solution. - `blocked`: Issues that cannot be worked on until a different issue is resolved. The blocking issue may be from an external library (Stencil, Storybook, Jest, etc.) or a Calcite Components issue. The blocking issue should be linked to in the blocked issue's body or comment. @@ -215,7 +216,11 @@ johndoe/feature/add-something-to-modal This project follows [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), which are used to generate the changelog. Be sure to provide clear and sufficient information in commit messages. This is important because the commit messages are used to automatically update the changelog. -[Stencil's contributing document](https://github.com/ionic-team/stencil/blob/main/CONTRIBUTING.md#commit-message-format) explains this in great detail, so please refer to this for more details and examples. +For instance, if providing a bug fix to the Text Area component, which includes additional support to assistive technologies, you could use the following conventional commit: + +> fix(text-area): provide additional support to assistive technologies + +[Stencil's contributing document](https://github.com/ionic-team/stencil/blob/main/CONTRIBUTING.md#commit-message-format) explains this in great detail. Please refer to the above link for more conventional commit details and examples, and visit [Calcite's recent commits](https://github.com/Esri/calcite-design-system/commits/main) to refer to additional examples. ## Breaking changes From 36489f3163daa143444bacaaa0d73978d272a18a Mon Sep 17 00:00:00 2001 From: Kitty Hurley Date: Tue, 31 Oct 2023 16:54:41 -0500 Subject: [PATCH 05/15] ci: automate research spike issue completion (#8098) **Related Issue:** n/a ## Summary Adds automation when developers complete research spikes associated with the `spike` label. How it works: 1. The developer adds the `spike complete` label 2. The script runs, and: - The `spike` label is removed - If present, the `1 - assigned` label is removed - Adds the `0 - new` and `needs milestone` labels - All assignees are removed and the milestone is cleared - Calcite PMs are notified (currently set to @brittneytewks and myself) to add to an upcoming milestone - Also discoverable via the `needs milestone` label --- .github/scripts/notifyWhenSpikeComplete.js | 63 ++++++++++++++++++++++ .github/workflows/spike-complete.yml | 21 ++++++++ 2 files changed, 84 insertions(+) create mode 100644 .github/scripts/notifyWhenSpikeComplete.js create mode 100644 .github/workflows/spike-complete.yml diff --git a/.github/scripts/notifyWhenSpikeComplete.js b/.github/scripts/notifyWhenSpikeComplete.js new file mode 100644 index 00000000000..ba10f5b5c19 --- /dev/null +++ b/.github/scripts/notifyWhenSpikeComplete.js @@ -0,0 +1,63 @@ +// When the "spike complete" label is added to an issue: +// 1. Modifies the labels, +// 2. Updates the assignees and milestone, and +// 3. Generates a notification to the Calcite project manager(s) +// +// The secret is formatted like so: person1, person2, person3 +// +// Note the script automatically adds the "@" character in to notify the project manager(s) +module.exports = async ({ github, context }) => { + const { managers } = process.env; + const { label } = context.payload; + + if (label && label.name === "spike complete") { + // Add a "@" character to notify the user + const calcite_managers = managers.split(",").map((v) => " @" + v.trim()); + + const issueProps = { + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }; + + /* Modify labels */ + try { + await github.rest.issues.removeLabel({ + ...issueProps, + name: "spike", + }); + } catch (err) { + console.log("The 'spike' label is not associated with the issue", err); + } + + try { + await github.rest.issues.removeLabel({ + ...issueProps, + name: "1 - assigned", + }); + } catch (err) { + console.log("The '1 - assigned' label is not associated with the issue", err); + } + + // Add labels + await github.rest.issues.addLabels({ + ...issueProps, + labels: ["0 - new", "needs milestone"], + }); + + /* Update issue */ + + // Clear assignees and milestone + await github.rest.issues.update({ + ...issueProps, + assignees: [], + milestone: null, + }); + + // Add a comment to notify the project manager(s) + await github.rest.issues.createComment({ + ...issueProps, + body: `cc ${calcite_managers}`, + }); + } +}; diff --git a/.github/workflows/spike-complete.yml b/.github/workflows/spike-complete.yml new file mode 100644 index 00000000000..7d346c05952 --- /dev/null +++ b/.github/workflows/spike-complete.yml @@ -0,0 +1,21 @@ +name: "Spike complete" + +on: + issues: + types: [labeled] + +jobs: + ready-for-dev: + if: github.event.label.name == 'spike complete' + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/github-script@v6 + env: + managers: ${{secrets.CALCITE_MANAGERS}} + with: + script: | + const action = require('${{ github.workspace }}/.github/scripts/notifyWhenSpikeComplete.js') + await action({github, context, core}) From d765515e1c5800f80e4b73ef3f75e454fe9c1ea4 Mon Sep 17 00:00:00 2001 From: JC Franco Date: Tue, 31 Oct 2023 16:47:08 -0700 Subject: [PATCH 06/15] test(input-time-zone): restore skipped tests (#8093) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related Issue:** #8086 ## Summary Updates skipped test to use time zones that are unaffected by DST. ✨πŸ§ͺπŸ”¨βœ¨ --- .../input-time-zone/input-time-zone.e2e.ts | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts b/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts index db44fd0889e..ef2caecbf3c 100644 --- a/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts +++ b/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts @@ -16,16 +16,17 @@ import { import { toUserFriendlyName } from "./utils"; describe("calcite-input-time-zone", () => { + // for stability, we use time zones that are unaffected by daylight savings time const testTimeZoneNamesAndOffsets = [ - { name: "America/Los_Angeles", offset: -420, label: "GMT-7" }, - { name: "America/Denver", offset: -360, label: "GMT-6" }, - { name: "Europe/London", offset: 60, label: "GMT+1" }, + { name: "America/Mexico_City", offset: -360, label: "GMT-6" }, + { name: "America/Phoenix", offset: -420, label: "GMT-7" }, + { name: "Pacific/Guam", offset: 600, label: "GMT+10" }, ]; async function simpleTestProvider(): Promise { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); - await page.setContent(addTimeZoneNamePolyfill(html` `)); + await page.setContent(addTimeZoneNamePolyfill(html``)); return { page, @@ -44,7 +45,7 @@ describe("calcite-input-time-zone", () => { describe("formAssociated", () => { formAssociated( { - tagOrHTML: addTimeZoneNamePolyfill(html` `), + tagOrHTML: addTimeZoneNamePolyfill(html``), beforeContent: async (page) => { await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); }, @@ -66,7 +67,7 @@ describe("calcite-input-time-zone", () => { describe("labelable", () => { labelable({ - tagOrHTML: addTimeZoneNamePolyfill(html` `), + tagOrHTML: addTimeZoneNamePolyfill(html``), beforeContent: async (page) => { await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); }, @@ -108,7 +109,7 @@ describe("calcite-input-time-zone", () => { describe("mode", () => { describe("offset (default)", () => { - describe.skip("selects user's matching time zone offset on initialization", () => { + describe("selects user's matching time zone offset on initialization", () => { testTimeZoneNamesAndOffsets.forEach(({ name, offset, label }) => { it(`selects default time zone for "${name}"`, async () => { const page = await newE2EPage(); @@ -126,12 +127,12 @@ describe("calcite-input-time-zone", () => { }); }); - it.skip("allows users to preselect a time zone offset", async () => { + it("allows users to preselect a time zone offset", async () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( await addTimeZoneNamePolyfill( - html` ` + html`` ) ); @@ -148,7 +149,7 @@ describe("calcite-input-time-zone", () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( - await addTimeZoneNamePolyfill(html` `) + await addTimeZoneNamePolyfill(html``) ); const input = await page.find("calcite-input-time-zone"); @@ -164,7 +165,7 @@ describe("calcite-input-time-zone", () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( - await addTimeZoneNamePolyfill(html` `) + await addTimeZoneNamePolyfill(html``) ); const input = await page.find("calcite-input-time-zone"); @@ -177,13 +178,14 @@ describe("calcite-input-time-zone", () => { }); it("looks up in label and time zone groups (not displayed)", async () => { - const searchTerms = ["London", "Belfast", "GMT-12"]; + const displayLabelSearchTerm = "Guam"; + const groupedTimeZoneSearchTerm = "Chuuk"; + const gmtSearchTerm = "GMT-12"; + const searchTerms = [displayLabelSearchTerm, groupedTimeZoneSearchTerm, gmtSearchTerm]; const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); - await page.setContent( - await addTimeZoneNamePolyfill(html` `) - ); + await page.setContent(await addTimeZoneNamePolyfill(html``)); const input = await page.find("calcite-input-time-zone"); @@ -256,7 +258,7 @@ describe("calcite-input-time-zone", () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( - await addTimeZoneNamePolyfill(html` `) @@ -277,7 +279,7 @@ describe("calcite-input-time-zone", () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( - await addTimeZoneNamePolyfill(html` `) @@ -323,7 +325,7 @@ describe("calcite-input-time-zone", () => { const page = await newE2EPage(); await page.emulateTimezone(testTimeZoneNamesAndOffsets[0].name); await page.setContent( - addTimeZoneNamePolyfill(html` `) + addTimeZoneNamePolyfill(html``) ); const internalCombobox = await page.find("calcite-input-time-zone >>> calcite-combobox"); @@ -339,7 +341,7 @@ describe("calcite-input-time-zone", () => { * @param testHtml */ function addTimeZoneNamePolyfill(testHtml: string): string { - return html`