diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8a83cb0dc00..c565dcac8c2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ -Issue number: # +Issue number: resolves # --------- @@ -21,7 +21,12 @@ Issue number: # - [ ] Yes - [ ] No - + ## Other information diff --git a/.github/workflows/actions/test-core-screenshot/action.yml b/.github/workflows/actions/test-core-screenshot/action.yml index 52596467d39..d9cf4bf6f50 100644 --- a/.github/workflows/actions/test-core-screenshot/action.yml +++ b/.github/workflows/actions/test-core-screenshot/action.yml @@ -7,6 +7,8 @@ inputs: description: 'Playwright total number of test shards (ex: 4)' update: description: 'Whether or not to update the reference snapshots' + component: + description: 'The component to update the reference snapshots' runs: using: 'composite' @@ -23,9 +25,29 @@ runs: run: npm install && npx playwright install && npx playwright install-deps shell: bash working-directory: ./core + - id: clean-component-name + name: Clean Component Name + # Remove `ion-` prefix from the `component` variable if it exists. + run: | + echo "component=$(echo ${{ inputs.component }} | sed 's/ion-//g')" >> $GITHUB_OUTPUT + shell: bash + - id: set-test-file + name: Set Test File + # Screenshots can be updated for all components or specified component(s). + # If the `component` variable is set, then the test has the option to + # - run all the file paths that are in a component folder. + # -- For example: if the `component` value is "item", then the test will run all the file paths that are in the "src/components/item" folder. + # -- For example: if the `component` value is "item chip", then the test will run all the file paths that are in the "src/components/item" and "src/components/chip" folders. + run: | + if [ -n "${{ steps.clean-component-name.outputs.component }}" ]; then + echo "testFile=\$(echo '${{ steps.clean-component-name.outputs.component }}' | awk '{for(i=1;i<=NF;i++) \$i=\"src/components/\"\$i}1')" >> $GITHUB_OUTPUT + else + echo "testFile=$(echo '')" >> $GITHUB_OUTPUT + fi + shell: bash - name: Test if: inputs.update != 'true' - run: npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} + run: npm run test.e2e ${{ steps.set-test-file.outputs.testFile }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} shell: bash working-directory: ./core - name: Test and Update @@ -47,7 +69,7 @@ runs: # which is why we not using the upload-archive # composite step here. run: | - npm run test.e2e -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots + npm run test.e2e ${{ steps.set-test-file.outputs.testFile }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots git add src/\*.png --force mkdir updated-screenshots cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots diff --git a/.github/workflows/assign-issues.yml b/.github/workflows/assign-issues.yml new file mode 100644 index 00000000000..da273a8c4ba --- /dev/null +++ b/.github/workflows/assign-issues.yml @@ -0,0 +1,18 @@ +name: Assign issues to triage + +on: + issues: + types: [opened] + +jobs: + auto-assign: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: 'Auto-assign issue' + uses: pozil/auto-assign-issue@edee9537367a8fbc625d27f9e10aa8bad47b8723 # v1.13.0 + with: + assignees: liamdebeasi, sean-perkins, brandyscarney, amandaejohnston, mapsandapps, thetaPC + numOfAssignee: 1 + allowSelfAssign: false diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e9f0db784f0..c728f48f16a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -37,45 +37,3 @@ jobs: version: ${{ needs.create-nightly-hash.outputs.nightly-hash }} secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - finalize-release: - needs: [create-nightly-hash, release-ionic] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.IONITRON_TOKEN }} - fetch-depth: 0 - - name: Configure Identity - # Commits from github-actions do not - # trigger other GitHub Actions. As a result, - # we publish releases from Ionitron instead - # so actions run when merging the release branch - # back into main. - run: | - git config user.name ionitron - git config user.email hi@ionicframework.com - shell: bash - - name: Checkout Nightly Branch - # There are branch protection rules for our version - # branches (i.e. "6.2.x"), so we cannot name the branch - # the nightly hash as it would fall under the protection - # rule. As a result, we prefix "tmp-" to the branch. - run: | - git checkout -b tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }} - git push origin tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }} - shell: bash - - name: Create GitHub Release - run: lerna version ${{ needs.create-nightly-hash.outputs.nightly-hash }} --yes --force-publish='*' --conventional-commits --conventional-prerelease --create-release github - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - # We need to push the commit changes in order for the tags - # to get updated, but we don't need to keep the changelog - # changes around. - - name: Delete Nightly Branch - run: | - git checkout main - git branch -D tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }} - git push origin --delete tmp-${{ needs.create-nightly-hash.outputs.nightly-hash }} - shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2210bbbf76a..e8e9711f777 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,16 +69,45 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash - # Lerna does not automatically bump versions - # of Ionic dependencies that have changed, - # so we do that here. - - name: Bump Package Lock - run: | - lerna exec "npm install --package-lock-only" - git add . - git commit -m "chore(): update package lock files" - git push - shell: bash + + update-package-lock: + # This needs to run after finalize-release + # because we also push to the repo in that + # job. If these jobs ran in parallel then it is + # possible for them to push at the same time. + needs: [finalize-release] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Pull the latest version of the reference + # branch instead of the revision that triggered + # the workflow otherwise we won't get the commit + # created in the previous job and this next job + # will fail. + with: + ref: ${{ github.ref }} + - name: Configure Identity + # Commits from github-actions do not + # trigger other GitHub Actions. As a result, + # we push from Ionitron instead so actions + # run when merging the release branch + # back into main. + run: | + git config user.name ionitron + git config user.email hi@ionicframework.com + shell: bash + # Lerna does not automatically bump versions + # of Ionic dependencies that have changed, + # so we do that here. + - name: Bump Package Lock + run: | + lerna exec "npm install --package-lock-only" + git add . + git commit -m "chore(): update package lock files" + git push + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash purge-cdn-cache: needs: [release-ionic] diff --git a/.github/workflows/update-screenshots.yml b/.github/workflows/update-screenshots.yml index 7ff2c499013..b78a13c42a6 100644 --- a/.github/workflows/update-screenshots.yml +++ b/.github/workflows/update-screenshots.yml @@ -2,6 +2,11 @@ name: 'Update Reference Screenshots' on: workflow_dispatch: + inputs: + component: + description: 'What component(s) should be updated? (leave blank to update all or use a space-separated list for multiple components)' + required: false + default: '' jobs: build-core: @@ -34,6 +39,7 @@ jobs: shard: ${{ matrix.shard }} totalShards: ${{ matrix.totalShards }} update: true + component: ${{ inputs.component }} update-reference-screenshots: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d0dad6487d..bab77c44f56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,90 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [7.6.6](https://github.com/ionic-team/ionic-framework/compare/v7.6.5...v7.6.6) (2024-01-24) + + +### Bug Fixes + +* **alert:** remove border-right on ios stacked buttons ([#28821](https://github.com/ionic-team/ionic-framework/issues/28821)) ([ad65824](https://github.com/ionic-team/ionic-framework/commit/ad65824722da0eed90ef9e595b743754bfd360b8)) +* **datetime:** do not animate to new value when multiple values in different months are set ([#28847](https://github.com/ionic-team/ionic-framework/issues/28847)) ([9262f7d](https://github.com/ionic-team/ionic-framework/commit/9262f7da15969706039e9d5f11ef5c7bd73ced0d)), closes [#28602](https://github.com/ionic-team/ionic-framework/issues/28602) +* **datetime:** enter closes keyboard when typing time ([#28848](https://github.com/ionic-team/ionic-framework/issues/28848)) ([c47a16d](https://github.com/ionic-team/ionic-framework/commit/c47a16d6c3c57f56b053727dd10ead0bfe547e50)), closes [#28325](https://github.com/ionic-team/ionic-framework/issues/28325) +* **menu:** improve reliability of main content not being scrollable when menu opens ([#28829](https://github.com/ionic-team/ionic-framework/issues/28829)) ([9603a4d](https://github.com/ionic-team/ionic-framework/commit/9603a4de363d2b42622ff3585cd6e4787d9581d1)), closes [#28399](https://github.com/ionic-team/ionic-framework/issues/28399) +* **popover:** content inside of popover scrolls correctly ([#28861](https://github.com/ionic-team/ionic-framework/issues/28861)) ([10c38d0](https://github.com/ionic-team/ionic-framework/commit/10c38d0354e61e20bec9a313de84b22c3b85c323)), closes [#28455](https://github.com/ionic-team/ionic-framework/issues/28455) +* **segment:** setting value via binding updates button state ([#28837](https://github.com/ionic-team/ionic-framework/issues/28837)) ([0847c2a](https://github.com/ionic-team/ionic-framework/commit/0847c2ac2c52b5fa6d30e381685d6cbf7a41231a)), closes [#28816](https://github.com/ionic-team/ionic-framework/issues/28816) +* **select:** click handlers on slotted content fire ([#28839](https://github.com/ionic-team/ionic-framework/issues/28839)) ([aed7a03](https://github.com/ionic-team/ionic-framework/commit/aed7a03532b88628a4358c8cbae1a1cbb861462b)), closes [#28818](https://github.com/ionic-team/ionic-framework/issues/28818) +* **vue:** tabs and parameterized routes work with latest vue ([#28846](https://github.com/ionic-team/ionic-framework/issues/28846)) ([5bc4399](https://github.com/ionic-team/ionic-framework/commit/5bc439961fda2c595666e67688fdd1b8ff4dd0bf)), closes [#28774](https://github.com/ionic-team/ionic-framework/issues/28774) + + + + + +## [7.6.5](https://github.com/ionic-team/ionic-framework/compare/v7.6.4...v7.6.5) (2024-01-17) + + +### Bug Fixes + +* **angular:** add old IonBackButtonDelegate import ([#28831](https://github.com/ionic-team/ionic-framework/issues/28831)) ([fb77353](https://github.com/ionic-team/ionic-framework/commit/fb7735397ed53323dd93a172407117228610b929)), closes [#28827](https://github.com/ionic-team/ionic-framework/issues/28827) +* **list:** remove uneeded border radius from items in inset list ([#28830](https://github.com/ionic-team/ionic-framework/issues/28830)) ([dbaaa5b](https://github.com/ionic-team/ionic-framework/commit/dbaaa5bd9f43b8ba589b3f9c4b4204d2f203ef18)) + + + + + +## [7.6.4](https://github.com/ionic-team/ionic-framework/compare/v7.6.3...v7.6.4) (2024-01-10) + + +### Bug Fixes + +* **input:** slotted buttons are clickable ([#28772](https://github.com/ionic-team/ionic-framework/issues/28772)) ([4ccc150](https://github.com/ionic-team/ionic-framework/commit/4ccc150edff4e3f33f453343aedb081d920b2f90)), closes [#28762](https://github.com/ionic-team/ionic-framework/issues/28762) + + + + + +## [7.6.3](https://github.com/ionic-team/ionic-framework/compare/v7.6.2...v7.6.3) (2024-01-03) + + +### Bug Fixes + +* **datetime:** selected today button renders correctly on ios ([#28740](https://github.com/ionic-team/ionic-framework/issues/28740)) ([2f99aea](https://github.com/ionic-team/ionic-framework/commit/2f99aeae6f71d5ffd1880f2c549227ecf71becf3)) +* **nav, router-outlet:** ios page transition does not cover menu on larger screens ([#28745](https://github.com/ionic-team/ionic-framework/issues/28745)) ([878eec6](https://github.com/ionic-team/ionic-framework/commit/878eec6ea21d76586466d01e13e5e842e69eaceb)), closes [#28737](https://github.com/ionic-team/ionic-framework/issues/28737) +* **radio-group:** radio disabled prop can be undefined ([#28712](https://github.com/ionic-team/ionic-framework/issues/28712)) ([75ffeee](https://github.com/ionic-team/ionic-framework/commit/75ffeee933ae353d2601670178896116c81923e0)), closes [#28677](https://github.com/ionic-team/ionic-framework/issues/28677) +* **refresher:** native ios refresher works on iPadOS ([#28620](https://github.com/ionic-team/ionic-framework/issues/28620)) ([e522601](https://github.com/ionic-team/ionic-framework/commit/e5226016a0f0b066a7bd7fc9997f905d3b87fbc4)), closes [#28617](https://github.com/ionic-team/ionic-framework/issues/28617) + + + + + +## [7.6.2](https://github.com/ionic-team/ionic-framework/compare/v7.6.1...v7.6.2) (2023-12-19) + + +### Bug Fixes + +* **input, textarea, select:** reduce padding on slotted buttons ([#28676](https://github.com/ionic-team/ionic-framework/issues/28676)) ([516b844](https://github.com/ionic-team/ionic-framework/commit/516b84475e5d78060f35fa2c4821efc712536353)) +* **item:** label does not expand indefinitely ([#28700](https://github.com/ionic-team/ionic-framework/issues/28700)) ([bc51dd0](https://github.com/ionic-team/ionic-framework/commit/bc51dd05cf036656980de584d2367db46054f774)) +* **refresher:** mode property can be used in typescript ([#28717](https://github.com/ionic-team/ionic-framework/issues/28717)) ([7ce1031](https://github.com/ionic-team/ionic-framework/commit/7ce1031c177487649c2a698664ec98f10d9002b9)), closes [#28716](https://github.com/ionic-team/ionic-framework/issues/28716) + + + + + +## [7.6.1](https://github.com/ionic-team/ionic-framework/compare/v7.6.0...v7.6.1) (2023-12-13) + + +### Bug Fixes + +* **datetime:** prefer wheel sets working value on confirmation ([#28520](https://github.com/ionic-team/ionic-framework/issues/28520)) ([e886e3f](https://github.com/ionic-team/ionic-framework/commit/e886e3ff2fcb8a3586a62881c5fc848f3074235d)), closes [#25839](https://github.com/ionic-team/ionic-framework/issues/25839) +* **input, textarea:** clearOnInput ignores key modifiers ([#28639](https://github.com/ionic-team/ionic-framework/issues/28639)) ([8f7d87c](https://github.com/ionic-team/ionic-framework/commit/8f7d87c6803b1600a3ca21785df0e9bac49f74a3)), closes [#28633](https://github.com/ionic-team/ionic-framework/issues/28633) +* **menu:** allow styling of the box shadow and transform when visible inside of a split pane ([#28691](https://github.com/ionic-team/ionic-framework/issues/28691)) ([8ee23d2](https://github.com/ionic-team/ionic-framework/commit/8ee23d20d5cc7419ce15f047b92d2f826d3eb681)), closes [#21530](https://github.com/ionic-team/ionic-framework/issues/21530) +* **react:** avoid type collision with @types/react@18.2.43 and greater ([#28687](https://github.com/ionic-team/ionic-framework/issues/28687)) ([92f1b86](https://github.com/ionic-team/ionic-framework/commit/92f1b8627a240c93891205f75adcb5ce3d46596d)) +* **react:** replacing route uses new route direction and animation ([#28671](https://github.com/ionic-team/ionic-framework/issues/28671)) ([a17b963](https://github.com/ionic-team/ionic-framework/commit/a17b9631829c36c2daf1d5227f5afa69f99f8743)), closes [#24260](https://github.com/ionic-team/ionic-framework/issues/24260) +* **react:** use custom animation when going back after a replace ([#28674](https://github.com/ionic-team/ionic-framework/issues/28674)) ([fc88613](https://github.com/ionic-team/ionic-framework/commit/fc88613fefa019a3b695a2c6e10c85cd3ce79ae8)), closes [#28673](https://github.com/ionic-team/ionic-framework/issues/28673) + + + + + # [7.6.0](https://github.com/ionic-team/ionic-framework/compare/v7.5.8...v7.6.0) (2023-12-06) diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 59c04e5ac62..de77edeea80 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,6 +3,85 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [7.6.6](https://github.com/ionic-team/ionic-framework/compare/v7.6.5...v7.6.6) (2024-01-24) + + +### Bug Fixes + +* **alert:** remove border-right on ios stacked buttons ([#28821](https://github.com/ionic-team/ionic-framework/issues/28821)) ([ad65824](https://github.com/ionic-team/ionic-framework/commit/ad65824722da0eed90ef9e595b743754bfd360b8)) +* **datetime:** do not animate to new value when multiple values in different months are set ([#28847](https://github.com/ionic-team/ionic-framework/issues/28847)) ([9262f7d](https://github.com/ionic-team/ionic-framework/commit/9262f7da15969706039e9d5f11ef5c7bd73ced0d)), closes [#28602](https://github.com/ionic-team/ionic-framework/issues/28602) +* **datetime:** enter closes keyboard when typing time ([#28848](https://github.com/ionic-team/ionic-framework/issues/28848)) ([c47a16d](https://github.com/ionic-team/ionic-framework/commit/c47a16d6c3c57f56b053727dd10ead0bfe547e50)), closes [#28325](https://github.com/ionic-team/ionic-framework/issues/28325) +* **menu:** improve reliability of main content not being scrollable when menu opens ([#28829](https://github.com/ionic-team/ionic-framework/issues/28829)) ([9603a4d](https://github.com/ionic-team/ionic-framework/commit/9603a4de363d2b42622ff3585cd6e4787d9581d1)), closes [#28399](https://github.com/ionic-team/ionic-framework/issues/28399) +* **popover:** content inside of popover scrolls correctly ([#28861](https://github.com/ionic-team/ionic-framework/issues/28861)) ([10c38d0](https://github.com/ionic-team/ionic-framework/commit/10c38d0354e61e20bec9a313de84b22c3b85c323)), closes [#28455](https://github.com/ionic-team/ionic-framework/issues/28455) +* **segment:** setting value via binding updates button state ([#28837](https://github.com/ionic-team/ionic-framework/issues/28837)) ([0847c2a](https://github.com/ionic-team/ionic-framework/commit/0847c2ac2c52b5fa6d30e381685d6cbf7a41231a)), closes [#28816](https://github.com/ionic-team/ionic-framework/issues/28816) +* **select:** click handlers on slotted content fire ([#28839](https://github.com/ionic-team/ionic-framework/issues/28839)) ([aed7a03](https://github.com/ionic-team/ionic-framework/commit/aed7a03532b88628a4358c8cbae1a1cbb861462b)), closes [#28818](https://github.com/ionic-team/ionic-framework/issues/28818) + + + + + +## [7.6.5](https://github.com/ionic-team/ionic-framework/compare/v7.6.3...v7.6.5) (2024-01-17) + + +### Bug Fixes + +* **list:** remove uneeded border radius from items in inset list ([#28830](https://github.com/ionic-team/ionic-framework/issues/28830)) ([dbaaa5b](https://github.com/ionic-team/ionic-framework/commit/dbaaa5bd9f43b8ba589b3f9c4b4204d2f203ef18)) + + + + + +## [7.6.4](https://github.com/ionic-team/ionic-framework/compare/v7.6.3...v7.6.4) (2024-01-10) + + +### Bug Fixes + +* **input:** slotted buttons are clickable ([#28772](https://github.com/ionic-team/ionic-framework/issues/28772)) ([4ccc150](https://github.com/ionic-team/ionic-framework/commit/4ccc150edff4e3f33f453343aedb081d920b2f90)), closes [#28762](https://github.com/ionic-team/ionic-framework/issues/28762) + + + + + +## [7.6.3](https://github.com/ionic-team/ionic-framework/compare/v7.6.2...v7.6.3) (2024-01-03) + + +### Bug Fixes + +* **datetime:** selected today button renders correctly on ios ([#28740](https://github.com/ionic-team/ionic-framework/issues/28740)) ([2f99aea](https://github.com/ionic-team/ionic-framework/commit/2f99aeae6f71d5ffd1880f2c549227ecf71becf3)) +* **nav, router-outlet:** ios page transition does not cover menu on larger screens ([#28745](https://github.com/ionic-team/ionic-framework/issues/28745)) ([878eec6](https://github.com/ionic-team/ionic-framework/commit/878eec6ea21d76586466d01e13e5e842e69eaceb)), closes [#28737](https://github.com/ionic-team/ionic-framework/issues/28737) +* **radio-group:** radio disabled prop can be undefined ([#28712](https://github.com/ionic-team/ionic-framework/issues/28712)) ([75ffeee](https://github.com/ionic-team/ionic-framework/commit/75ffeee933ae353d2601670178896116c81923e0)), closes [#28677](https://github.com/ionic-team/ionic-framework/issues/28677) +* **refresher:** native ios refresher works on iPadOS ([#28620](https://github.com/ionic-team/ionic-framework/issues/28620)) ([e522601](https://github.com/ionic-team/ionic-framework/commit/e5226016a0f0b066a7bd7fc9997f905d3b87fbc4)), closes [#28617](https://github.com/ionic-team/ionic-framework/issues/28617) + + + + + +## [7.6.2](https://github.com/ionic-team/ionic-framework/compare/v7.6.1...v7.6.2) (2023-12-19) + + +### Bug Fixes + +* **input, textarea, select:** reduce padding on slotted buttons ([#28676](https://github.com/ionic-team/ionic-framework/issues/28676)) ([516b844](https://github.com/ionic-team/ionic-framework/commit/516b84475e5d78060f35fa2c4821efc712536353)) +* **item:** label does not expand indefinitely ([#28700](https://github.com/ionic-team/ionic-framework/issues/28700)) ([bc51dd0](https://github.com/ionic-team/ionic-framework/commit/bc51dd05cf036656980de584d2367db46054f774)) +* **refresher:** mode property can be used in typescript ([#28717](https://github.com/ionic-team/ionic-framework/issues/28717)) ([7ce1031](https://github.com/ionic-team/ionic-framework/commit/7ce1031c177487649c2a698664ec98f10d9002b9)), closes [#28716](https://github.com/ionic-team/ionic-framework/issues/28716) + + + + + +## [7.6.1](https://github.com/ionic-team/ionic-framework/compare/v7.6.0...v7.6.1) (2023-12-13) + + +### Bug Fixes + +* **datetime:** prefer wheel sets working value on confirmation ([#28520](https://github.com/ionic-team/ionic-framework/issues/28520)) ([e886e3f](https://github.com/ionic-team/ionic-framework/commit/e886e3ff2fcb8a3586a62881c5fc848f3074235d)), closes [#25839](https://github.com/ionic-team/ionic-framework/issues/25839) +* **input, textarea:** clearOnInput ignores key modifiers ([#28639](https://github.com/ionic-team/ionic-framework/issues/28639)) ([8f7d87c](https://github.com/ionic-team/ionic-framework/commit/8f7d87c6803b1600a3ca21785df0e9bac49f74a3)), closes [#28633](https://github.com/ionic-team/ionic-framework/issues/28633) +* **menu:** allow styling of the box shadow and transform when visible inside of a split pane ([#28691](https://github.com/ionic-team/ionic-framework/issues/28691)) ([8ee23d2](https://github.com/ionic-team/ionic-framework/commit/8ee23d20d5cc7419ce15f047b92d2f826d3eb681)), closes [#21530](https://github.com/ionic-team/ionic-framework/issues/21530) + + + + + # [7.6.0](https://github.com/ionic-team/ionic-framework/compare/v7.5.8...v7.6.0) (2023-12-06) diff --git a/core/api.txt b/core/api.txt index 320c0fc1878..fa3825d2903 100644 --- a/core/api.txt +++ b/core/api.txt @@ -1087,6 +1087,7 @@ ion-range,part,tick-active ion-refresher,none ion-refresher,prop,closeDuration,string,'280ms',false,false ion-refresher,prop,disabled,boolean,false,false,false +ion-refresher,prop,mode,"ios" | "md",undefined,false,false ion-refresher,prop,pullFactor,number,1,false,false ion-refresher,prop,pullMax,number,this.pullMin + 60,false,false ion-refresher,prop,pullMin,number,60,false,false diff --git a/core/package-lock.json b/core/package-lock.json index 773df050fba..f0468fa92c1 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1,23 +1,23 @@ { "name": "@ionic/core", - "version": "7.6.0", + "version": "7.6.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/core", - "version": "7.6.0", + "version": "7.6.6", "license": "MIT", "dependencies": { - "@stencil/core": "^4.8.1", - "ionicons": "^7.2.1", + "@stencil/core": "^4.12.0", + "ionicons": "^7.2.2", "tslib": "^2.1.0" }, "devDependencies": { - "@axe-core/playwright": "^4.8.2", - "@capacitor/core": "^5.5.1", + "@axe-core/playwright": "^4.8.4", + "@capacitor/core": "^5.6.0", "@capacitor/haptics": "^5.0.6", - "@capacitor/keyboard": "^5.0.6", + "@capacitor/keyboard": "^5.0.8", "@capacitor/status-bar": "^5.0.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "^2.0.0", @@ -26,7 +26,7 @@ "@rollup/plugin-virtual": "^2.0.3", "@stencil/angular-output-target": "^0.8.3", "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.7", + "@stencil/sass": "^3.0.9", "@stencil/vue-output-target": "^0.8.7", "@types/jest": "^29.5.6", "@types/node": "^14.6.0", @@ -56,12 +56,12 @@ "dev": true }, "node_modules/@axe-core/playwright": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.8.2.tgz", - "integrity": "sha512-9KOhX2tNuvqn9DzpBNyqoqNKRZBrexeSiN9irQ0sEdq8zH13JnatepCJxobuXn4UopNy6iIpP4342beMiH+MSQ==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.8.4.tgz", + "integrity": "sha512-xpwd+T0BODt19hnXW0eX9xf+H/Ns1rdWwZNmuCV9UoTqjZ9mGm1F80pvh/A1r317ooltq8nwqcoVO9jbHWKSdA==", "dev": true, "dependencies": { - "axe-core": "~4.8.2" + "axe-core": "~4.8.3" }, "peerDependencies": { "playwright-core": ">= 1.0.0" @@ -634,9 +634,9 @@ "dev": true }, "node_modules/@capacitor/core": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.5.1.tgz", - "integrity": "sha512-VG6Iv8Q7ZAbvjodxpvjcSe0jfxUwZXnvjbi93ehuJ6eYP8U926qLSXyrT/DToZq+F6v/HyGyVgn3mrE/9jW2Tg==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.6.0.tgz", + "integrity": "sha512-xJhCOUGPHw0QYDA3YH+CmL6qiV9DH4Ij3yPxSenymjrtLuXI197u9ddCZwGEwgVIkh9kGZBBKzsNkn89SZ2gdQ==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -652,9 +652,9 @@ } }, "node_modules/@capacitor/keyboard": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-5.0.6.tgz", - "integrity": "sha512-9GewAa/y2Hwkdw/Be8MTdiAjrFZ7TPDKpR44M0Y/0QMnK+mBbgzcoZ/UkuumWv6e2F1IAI+VY5eYVQHDeZcRoA==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-5.0.8.tgz", + "integrity": "sha512-XYyBzGlzjgLPqyPVdu5McGLYV6+G2efVR4I3l5cF1B27M6U/oFqv9CQU74WNG08nee28bfccboNpv6eWCLYn1A==", "dev": true, "peerDependencies": { "@capacitor/core": "^5.0.0" @@ -1825,9 +1825,9 @@ } }, "node_modules/@stencil/core": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.8.1.tgz", - "integrity": "sha512-KG1H10j24rlyxIqOI4CG8/h9T7ObTv7giW2H3u1qXV4KKrLykDOpMcLzpqNXqL2Fki3s1QvHyl/oaRvi5waWVw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.12.0.tgz", + "integrity": "sha512-qAQcfNmp2sdxAh1DlyUhHfDmIUS7mhI+5LAhPphg74zK9sKgFL5vpLzgjs0wohpjlmI4msgJFYiRB8lxVPqjPg==", "bin": { "stencil": "bin/stencil" }, @@ -1846,9 +1846,9 @@ } }, "node_modules/@stencil/sass": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.7.tgz", - "integrity": "sha512-HcBjrh2CJ6aJnkOrBNSVyf1+x3FnUneYFk44rcx/jDK6Lx7R4w0dXMEsIR5MXqtROYWonZt7WtR8wsM1vcD+6w==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.9.tgz", + "integrity": "sha512-GtPMjf5r4/BVBCO3LvcoMSIfOa6T+0wq+SrTGEilC4NCZpuZdAlZffWxXi80caZ1jDclwdzJ2qGwEgCAfvGoNA==", "dev": true, "engines": { "node": ">=12.0.0", @@ -2799,9 +2799,9 @@ } }, "node_modules/axe-core": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.2.tgz", - "integrity": "sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.3.tgz", + "integrity": "sha512-d5ZQHPSPkF9Tw+yfyDcRoUOc4g/8UloJJe5J8m4L5+c7AtDdjDLRxew/knnI4CxvtdxEUVgWz4x3OIQUIFiMfw==", "dev": true, "engines": { "node": ">=4" @@ -5785,9 +5785,9 @@ } }, "node_modules/ionicons": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.1.tgz", - "integrity": "sha512-2pvCM7DGVEtbbj48PJzQrCADCQrqjU1nUYX9l9PyEWz3ZfdnLdAouqwPxLdl8tbaF9cE7OZRSlyQD7oLOLnGoQ==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.2.tgz", + "integrity": "sha512-I3iYIfc9Q9FRifWyFSwTAvbEABWlWY32i0sAVDDPGYnaIZVugkLCZFbEcrphW6ixVPg8tt1oLwalo/JJwbEqnA==", "dependencies": { "@stencil/core": "^4.0.3" } @@ -10899,12 +10899,12 @@ }, "dependencies": { "@axe-core/playwright": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.8.2.tgz", - "integrity": "sha512-9KOhX2tNuvqn9DzpBNyqoqNKRZBrexeSiN9irQ0sEdq8zH13JnatepCJxobuXn4UopNy6iIpP4342beMiH+MSQ==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.8.4.tgz", + "integrity": "sha512-xpwd+T0BODt19hnXW0eX9xf+H/Ns1rdWwZNmuCV9UoTqjZ9mGm1F80pvh/A1r317ooltq8nwqcoVO9jbHWKSdA==", "dev": true, "requires": { - "axe-core": "~4.8.2" + "axe-core": "~4.8.3" } }, "@babel/code-frame": { @@ -11324,9 +11324,9 @@ "dev": true }, "@capacitor/core": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.5.1.tgz", - "integrity": "sha512-VG6Iv8Q7ZAbvjodxpvjcSe0jfxUwZXnvjbi93ehuJ6eYP8U926qLSXyrT/DToZq+F6v/HyGyVgn3mrE/9jW2Tg==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-5.6.0.tgz", + "integrity": "sha512-xJhCOUGPHw0QYDA3YH+CmL6qiV9DH4Ij3yPxSenymjrtLuXI197u9ddCZwGEwgVIkh9kGZBBKzsNkn89SZ2gdQ==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -11340,9 +11340,9 @@ "requires": {} }, "@capacitor/keyboard": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-5.0.6.tgz", - "integrity": "sha512-9GewAa/y2Hwkdw/Be8MTdiAjrFZ7TPDKpR44M0Y/0QMnK+mBbgzcoZ/UkuumWv6e2F1IAI+VY5eYVQHDeZcRoA==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-5.0.8.tgz", + "integrity": "sha512-XYyBzGlzjgLPqyPVdu5McGLYV6+G2efVR4I3l5cF1B27M6U/oFqv9CQU74WNG08nee28bfccboNpv6eWCLYn1A==", "dev": true, "requires": {} }, @@ -12184,9 +12184,9 @@ "requires": {} }, "@stencil/core": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.8.1.tgz", - "integrity": "sha512-KG1H10j24rlyxIqOI4CG8/h9T7ObTv7giW2H3u1qXV4KKrLykDOpMcLzpqNXqL2Fki3s1QvHyl/oaRvi5waWVw==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.12.0.tgz", + "integrity": "sha512-qAQcfNmp2sdxAh1DlyUhHfDmIUS7mhI+5LAhPphg74zK9sKgFL5vpLzgjs0wohpjlmI4msgJFYiRB8lxVPqjPg==" }, "@stencil/react-output-target": { "version": "0.5.3", @@ -12196,9 +12196,9 @@ "requires": {} }, "@stencil/sass": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.7.tgz", - "integrity": "sha512-HcBjrh2CJ6aJnkOrBNSVyf1+x3FnUneYFk44rcx/jDK6Lx7R4w0dXMEsIR5MXqtROYWonZt7WtR8wsM1vcD+6w==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@stencil/sass/-/sass-3.0.9.tgz", + "integrity": "sha512-GtPMjf5r4/BVBCO3LvcoMSIfOa6T+0wq+SrTGEilC4NCZpuZdAlZffWxXi80caZ1jDclwdzJ2qGwEgCAfvGoNA==", "dev": true, "requires": {} }, @@ -12863,9 +12863,9 @@ } }, "axe-core": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.2.tgz", - "integrity": "sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.3.tgz", + "integrity": "sha512-d5ZQHPSPkF9Tw+yfyDcRoUOc4g/8UloJJe5J8m4L5+c7AtDdjDLRxew/knnI4CxvtdxEUVgWz4x3OIQUIFiMfw==", "dev": true }, "b4a": { @@ -15056,9 +15056,9 @@ } }, "ionicons": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.1.tgz", - "integrity": "sha512-2pvCM7DGVEtbbj48PJzQrCADCQrqjU1nUYX9l9PyEWz3ZfdnLdAouqwPxLdl8tbaF9cE7OZRSlyQD7oLOLnGoQ==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.2.2.tgz", + "integrity": "sha512-I3iYIfc9Q9FRifWyFSwTAvbEABWlWY32i0sAVDDPGYnaIZVugkLCZFbEcrphW6ixVPg8tt1oLwalo/JJwbEqnA==", "requires": { "@stencil/core": "^4.0.3" } diff --git a/core/package.json b/core/package.json index b6f7f57047e..db80f18e2d6 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/core", - "version": "7.6.0", + "version": "7.6.6", "description": "Base components for Ionic", "keywords": [ "ionic", @@ -31,15 +31,15 @@ "loader/" ], "dependencies": { - "@stencil/core": "^4.8.1", - "ionicons": "^7.2.1", + "@stencil/core": "^4.12.0", + "ionicons": "^7.2.2", "tslib": "^2.1.0" }, "devDependencies": { - "@axe-core/playwright": "^4.8.2", - "@capacitor/core": "^5.5.1", + "@axe-core/playwright": "^4.8.4", + "@capacitor/core": "^5.6.0", "@capacitor/haptics": "^5.0.6", - "@capacitor/keyboard": "^5.0.6", + "@capacitor/keyboard": "^5.0.8", "@capacitor/status-bar": "^5.0.6", "@ionic/eslint-config": "^0.3.0", "@ionic/prettier-config": "^2.0.0", @@ -48,7 +48,7 @@ "@rollup/plugin-virtual": "^2.0.3", "@stencil/angular-output-target": "^0.8.3", "@stencil/react-output-target": "^0.5.3", - "@stencil/sass": "^3.0.7", + "@stencil/sass": "^3.0.9", "@stencil/vue-output-target": "^0.8.7", "@types/jest": "^29.5.6", "@types/node": "^14.6.0", diff --git a/core/src/components.d.ts b/core/src/components.d.ts index dcfee8f33e6..bcea90eeb27 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -943,7 +943,7 @@ export namespace Components { */ "size": 'cover' | 'fixed'; /** - * A callback used to format the header text that shows how many dates are selected. Only used if there are 0 or more than 1 selected (i.e. unused for exactly 1). By default, the header text is set to "numberOfDates days". + * A callback used to format the header text that shows how many dates are selected. Only used if there are 0 or more than 1 selected (i.e. unused for exactly 1). By default, the header text is set to "numberOfDates days". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "titleSelectedDatesFormatter"?: TitleSelectedDatesFormatter; /** @@ -1182,7 +1182,7 @@ export namespace Components { */ "counter": boolean; /** - * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". + * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "counterFormatter"?: (inputLength: number, maxLength: number) => string; /** @@ -1701,7 +1701,7 @@ export namespace Components { */ "breakpoints"?: number[]; /** - * Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss. + * Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss. See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "canDismiss": boolean | ((data?: any, role?: string) => Promise); /** @@ -2336,7 +2336,7 @@ export namespace Components { */ "pin": boolean; /** - * A callback used to format the pin text. By default the pin text is set to `Math.round(value)`. + * A callback used to format the pin text. By default the pin text is set to `Math.round(value)`. See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "pinFormatter": PinFormatter; /** @@ -2377,6 +2377,10 @@ export namespace Components { * A number representing how far down the user has pulled. The number `0` represents the user hasn't pulled down at all. The number `1`, and anything greater than `1`, represents that the user has pulled far enough down that when they let go then the refresh will happen. If they let go and the number is less than `1`, then the refresh will not happen, and the content will return to it's original position. */ "getProgress": () => Promise; + /** + * The mode determines which platform styles to use. + */ + "mode"?: "ios" | "md"; /** * How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example: If the value passed is `1.2` and the content is dragged by `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels (an increase of 20 percent). If the value passed is `0.8`, the dragged amount will be `8` pixels, less than the amount the cursor has moved. Does not apply when the refresher content uses a spinner, enabling the native refresher. */ @@ -2974,7 +2978,7 @@ export namespace Components { */ "counter": boolean; /** - * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". + * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "counterFormatter"?: (inputLength: number, maxLength: number) => string; /** @@ -5646,7 +5650,7 @@ declare namespace LocalJSX { */ "size"?: 'cover' | 'fixed'; /** - * A callback used to format the header text that shows how many dates are selected. Only used if there are 0 or more than 1 selected (i.e. unused for exactly 1). By default, the header text is set to "numberOfDates days". + * A callback used to format the header text that shows how many dates are selected. Only used if there are 0 or more than 1 selected (i.e. unused for exactly 1). By default, the header text is set to "numberOfDates days". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "titleSelectedDatesFormatter"?: TitleSelectedDatesFormatter; /** @@ -5897,7 +5901,7 @@ declare namespace LocalJSX { */ "counter"?: boolean; /** - * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". + * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "counterFormatter"?: (inputLength: number, maxLength: number) => string; /** @@ -6428,7 +6432,7 @@ declare namespace LocalJSX { */ "breakpoints"?: number[]; /** - * Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss. + * Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss. See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "canDismiss"?: boolean | ((data?: any, role?: string) => Promise); /** @@ -7060,7 +7064,7 @@ declare namespace LocalJSX { */ "pin"?: boolean; /** - * A callback used to format the pin text. By default the pin text is set to `Math.round(value)`. + * A callback used to format the pin text. By default the pin text is set to `Math.round(value)`. See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "pinFormatter"?: PinFormatter; /** @@ -7089,6 +7093,10 @@ declare namespace LocalJSX { * If `true`, the refresher will be hidden. */ "disabled"?: boolean; + /** + * The mode determines which platform styles to use. + */ + "mode"?: "ios" | "md"; /** * Emitted while the user is pulling down the content and exposing the refresher. */ @@ -7750,7 +7758,7 @@ declare namespace LocalJSX { */ "counter"?: boolean; /** - * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". + * A callback used to format the counter text. By default the counter text is set to "itemLength / maxLength". See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this if you need to access `this` from within the callback. */ "counterFormatter"?: (inputLength: number, maxLength: number) => string; /** diff --git a/core/src/components/accordion/accordion.tsx b/core/src/components/accordion/accordion.tsx index eab83209cd5..92d28848d20 100644 --- a/core/src/components/accordion/accordion.tsx +++ b/core/src/components/accordion/accordion.tsx @@ -382,7 +382,10 @@ export class Accordion implements ComponentInterface { }; private toggleExpanded() { - const { accordionGroupEl, value, state } = this; + const { accordionGroupEl, disabled, readonly, value, state } = this; + + if (disabled || readonly) return; + if (accordionGroupEl) { /** * Because the accordion group may or may diff --git a/core/src/components/accordion/test/a11y/index.html b/core/src/components/accordion/test/a11y/index.html index 0c660ef8ddd..e8bd7a67e01 100644 --- a/core/src/components/accordion/test/a11y/index.html +++ b/core/src/components/accordion/test/a11y/index.html @@ -23,28 +23,22 @@

Accordion Group - a11y

- Name - + - Email - + - Phone - + - Extension - + - Country - + - City/Province - + @@ -56,24 +50,19 @@

Accordion Group - a11y

- Address 1 - + - Address 2 - + - City - + - State - + - Zip Code - + @@ -85,24 +74,19 @@

Accordion Group - a11y

- Address 1 - + - Address 2 - + - City - + - State - + - Zip Code - + diff --git a/core/src/components/accordion/test/accordion.e2e.ts b/core/src/components/accordion/test/accordion.e2e.ts deleted file mode 100644 index f09aa4b1a2f..00000000000 --- a/core/src/components/accordion/test/accordion.e2e.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { expect } from '@playwright/test'; -import { configs, test } from '@utils/test/playwright'; - -configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => { - test.describe(title('accordion: states'), () => { - test.beforeEach(async ({ page }) => { - await page.setContent( - ` - - - Label -
Content
-
-
- `, - config - ); - }); - test('should properly set readonly on child accordions', async ({ page }) => { - const accordionGroup = page.locator('ion-accordion-group'); - const accordion = page.locator('ion-accordion'); - - await expect(accordion).toHaveJSProperty('readonly', false); - - await accordionGroup.evaluate((el: HTMLIonAccordionGroupElement) => { - el.readonly = true; - }); - - await page.waitForChanges(); - - await expect(accordion).toHaveJSProperty('readonly', true); - }); - - test('should properly set disabled on child accordions', async ({ page }) => { - const accordionGroup = page.locator('ion-accordion-group'); - const accordion = page.locator('ion-accordion'); - - await expect(accordion).toHaveJSProperty('disabled', false); - - await accordionGroup.evaluate((el: HTMLIonAccordionGroupElement) => { - el.disabled = true; - }); - - await page.waitForChanges(); - - await expect(accordion).toHaveJSProperty('disabled', true); - }); - }); -}); diff --git a/core/src/components/accordion/test/disabled/accordion.e2e.ts b/core/src/components/accordion/test/disabled/accordion.e2e.ts new file mode 100644 index 00000000000..3857a1d7b26 --- /dev/null +++ b/core/src/components/accordion/test/disabled/accordion.e2e.ts @@ -0,0 +1,137 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +// NOTE: these tests cannot be re-written as spec tests because the `getAccordions` method in accordion-group.tsx uses a `:scope` selector +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => { + test.describe(title('accordion: disabled'), () => { + test('should properly set disabled on child accordions', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordionGroup = page.locator('ion-accordion-group'); + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveJSProperty('disabled', false); + + await accordionGroup.evaluate((el: HTMLIonAccordionGroupElement) => { + el.disabled = true; + }); + + await page.waitForChanges(); + + await expect(accordion).toHaveJSProperty('disabled', true); + }); + + test('should not open accordion on click when group is disabled', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + accordion.click(); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion on click when accordion is disabled', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + accordion.click(); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion via keyboard navigation when group is disabled', async ({ page, browserName }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + await page.keyboard.press(tabKey); + await page.waitForChanges(); + + await page.keyboard.press('Enter'); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion via keyboard navigation when accordion is disabled', async ({ + page, + browserName, + }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + await page.keyboard.press(tabKey); + await page.waitForChanges(); + + await page.keyboard.press('Enter'); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + }); +}); diff --git a/core/src/components/accordion/test/disabled/index.html b/core/src/components/accordion/test/disabled/index.html new file mode 100644 index 00000000000..38452b7adec --- /dev/null +++ b/core/src/components/accordion/test/disabled/index.html @@ -0,0 +1,91 @@ + + + + + Accordion - Disabled + + + + + + + + + + + + Accordion - Disabled + + + + + + Accordion - Disabled + + + +
+
+ + + + First Accordion + +
First Content
+
+ + + Second Accordion (Disabled) + +
Second Content
+
+ + + Third Accordion + +
Third Content
+
+
+
+
+ + + + First Accordion in Disabled Group + +
First Content
+
+ + + Second Accordion in Disabled Group + +
Second Content
+
+ + + Third Accordion in Disabled Group + +
Third Content
+
+
+
+
+ + + Accordion Without Group (Disabled) + +
Second Content
+
+
+
+
+
+ + diff --git a/core/src/components/accordion/test/readonly/accordion.e2e.ts b/core/src/components/accordion/test/readonly/accordion.e2e.ts new file mode 100644 index 00000000000..00795030468 --- /dev/null +++ b/core/src/components/accordion/test/readonly/accordion.e2e.ts @@ -0,0 +1,137 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +// NOTE: these tests cannot be re-written as spec tests because the `getAccordions` method in accordion-group.tsx uses a `:scope` selector +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => { + test.describe(title('accordion: readonly'), () => { + test('should properly set readonly on child accordions', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordionGroup = page.locator('ion-accordion-group'); + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveJSProperty('readonly', false); + + await accordionGroup.evaluate((el: HTMLIonAccordionGroupElement) => { + el.readonly = true; + }); + + await page.waitForChanges(); + + await expect(accordion).toHaveJSProperty('readonly', true); + }); + + test('should not open accordion on click when group is readonly', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + accordion.click(); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion on click when accordion is readonly', async ({ page }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + accordion.click(); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion via keyboard navigation when group is readonly', async ({ page, browserName }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + await page.keyboard.press(tabKey); + await page.waitForChanges(); + + await page.keyboard.press('Enter'); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + + test('should not open accordion via keyboard navigation when accordion is readonly', async ({ + page, + browserName, + }) => { + await page.setContent( + ` + + + Label +
Content
+
+
+ `, + config + ); + + const accordion = page.locator('ion-accordion'); + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + + await expect(accordion).toHaveClass(/accordion-collapsed/); + + await page.keyboard.press(tabKey); + await page.waitForChanges(); + + await page.keyboard.press('Enter'); + await page.waitForChanges(); + + await expect(accordion).toHaveClass(/accordion-collapsed/); + }); + }); +}); diff --git a/core/src/components/accordion/test/readonly/index.html b/core/src/components/accordion/test/readonly/index.html new file mode 100644 index 00000000000..7b1a9ac84c6 --- /dev/null +++ b/core/src/components/accordion/test/readonly/index.html @@ -0,0 +1,91 @@ + + + + + Accordion - Readonly + + + + + + + + + + + + Accordion - Readonly + + + + + + Accordion - Readonly + + + +
+
+ + + + First Accordion + +
First Content
+
+ + + Second Accordion (Readonly) + +
Second Content
+
+ + + Third Accordion + +
Third Content
+
+
+
+
+ + + + First Accordion in Readonly Group + +
First Content
+
+ + + Second Accordion in Readonly Group + +
Second Content
+
+ + + Third Accordion in Readonly Group + +
Third Content
+
+
+
+
+ + + Accordion Without Group (Readonly) + +
Second Content
+
+
+
+
+
+ + diff --git a/core/src/components/action-sheet/action-sheet-interface.ts b/core/src/components/action-sheet/action-sheet-interface.ts index 465c50e050e..1021895d0e4 100644 --- a/core/src/components/action-sheet/action-sheet-interface.ts +++ b/core/src/components/action-sheet/action-sheet-interface.ts @@ -1,4 +1,4 @@ -import type { AnimationBuilder, Mode } from '../../interface'; +import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface'; export interface ActionSheetOptions { header?: string; @@ -19,7 +19,7 @@ export interface ActionSheetOptions { export interface ActionSheetButton { text?: string; - role?: 'cancel' | 'destructive' | 'selected' | string; + role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>; icon?: string; cssClass?: string | string[]; id?: string; diff --git a/core/src/components/action-sheet/test/a11y/index.html b/core/src/components/action-sheet/test/a11y/index.html index 25adfdfeda8..ea78a68b4da 100644 --- a/core/src/components/action-sheet/test/a11y/index.html +++ b/core/src/components/action-sheet/test/a11y/index.html @@ -19,12 +19,12 @@

Action Sheet - A11y

- Both Headers - Subheader Only - No Headers - Custom Aria - Aria Label Button - Both Headers + Subheader Only + No Headers + Custom Aria + Aria Label Button + Aria Label Cancel Button
diff --git a/core/src/components/alert/alert-interface.ts b/core/src/components/alert/alert-interface.ts index 3f9d6cda8d4..326d74484d6 100644 --- a/core/src/components/alert/alert-interface.ts +++ b/core/src/components/alert/alert-interface.ts @@ -1,4 +1,4 @@ -import type { AnimationBuilder, Mode, TextFieldTypes } from '../../interface'; +import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface'; import type { IonicSafeString } from '../../utils/sanitization'; export interface AlertOptions { @@ -45,7 +45,7 @@ type AlertButtonOverlayHandler = boolean | void | { [key: string]: any }; export interface AlertButton { text: string; - role?: 'cancel' | 'destructive' | string; + role?: LiteralUnion<'cancel' | 'destructive', string>; cssClass?: string | string[]; id?: string; htmlAttributes?: { [key: string]: any }; diff --git a/core/src/components/alert/alert.ios.scss b/core/src/components/alert/alert.ios.scss index 3a04490c7e4..f3bdcb04da0 100644 --- a/core/src/components/alert/alert.ios.scss +++ b/core/src/components/alert/alert.ios.scss @@ -265,6 +265,22 @@ flex-wrap: $alert-ios-button-group-flex-wrap; } +/** + * The right border should only be applied to the first button + * when the group has 2 or less buttons (horizontal). + * Otherwise, the right border should not be applied + * when the group has 3 or more buttons (vertical). + */ +.alert-button-group-vertical .alert-button { + border-right: none; + + &:last-child { + @include rtl() { + border-right: none; + } + } +} + .alert-button { /** * This padding ensures that alerts diff --git a/core/src/components/alert/test/a11y/index.html b/core/src/components/alert/test/a11y/index.html index 180e901782b..5e15bcc0c45 100644 --- a/core/src/components/alert/test/a11y/index.html +++ b/core/src/components/alert/test/a11y/index.html @@ -9,6 +9,19 @@ + + `, + config + ); + + const alert = page.locator('ion-alert'); + + await expect(alert).toHaveScreenshot(screenshot(`alert-multipleButtons`)); + }); + }); +}); + class AlertFixture { readonly page: E2EPage; readonly screenshotFn?: (file: string) => string; diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Chrome-linux.png index 6ab575619d4..e8642e4137f 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Firefox-linux.png index 1996a550127..5b79e232640 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Safari-linux.png index 4131d17be44..e0f12b509fb 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Chrome-linux.png index a41e743d463..b2641c15f82 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Firefox-linux.png index a859a1904a1..bc76c8e16ee 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Safari-linux.png index 4e86b40692f..a7de5e0e9f0 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Chrome-linux.png index 0bdd673e376..1db6442d81b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Firefox-linux.png index bf20b2a5770..fdf35177323 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Safari-linux.png index 15b332cf1f6..966835ec89b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Chrome-linux.png index 7a6740c7672..a9f713f12fa 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Firefox-linux.png index 9bb50128ff2..e249b02916a 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Safari-linux.png index 31ae8248a67..bb6caa019fb 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-basic-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Chrome-linux.png index d1cafee4b19..864ac7ba272 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Firefox-linux.png index 9cd6002ddb6..cc7563ee7dc 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Safari-linux.png index f97cd9c4938..516d758e791 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Chrome-linux.png index 4e9f6953b2d..2d5259260f9 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Firefox-linux.png index 52f0484ac21..94b51229429 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Safari-linux.png index 2e5155140d5..352f4a6f74f 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Chrome-linux.png index f4bfd3c7eab..9f689153f27 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Firefox-linux.png index 0232c6154be..324aceb6126 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Safari-linux.png index 2616a7c4bfa..1f3f24b173e 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Chrome-linux.png index b5b8c5bf817..f16d39a270e 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Firefox-linux.png index 0b61f67a2a7..df79d7f53c2 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Safari-linux.png index 2192a72c5f8..961437be91a 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-checkbox-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Chrome-linux.png index 9fd4e168f29..c5655236af2 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Firefox-linux.png index 095932554e0..5a31b7dd233 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Safari-linux.png index 388c52794fd..b4f20e47d4b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Chrome-linux.png index 6cf7cb059ee..fd99cf47de4 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Firefox-linux.png index 73a4c33e593..2ae1a13cb2a 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Safari-linux.png index 083d7156ffa..448c8b6c42c 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Chrome-linux.png index e7208c91ce0..1077647313d 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Firefox-linux.png index bd8b24ba63b..92e3de3e16f 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Safari-linux.png index 289a9b47e4f..a6584f0d1c8 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Chrome-linux.png index acf8c10d1c3..4e4584d174b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Firefox-linux.png index b2e424d35fb..317abeea242 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Safari-linux.png index 0355891a10a..a379fae33fb 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-confirm-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Chrome-linux.png index 27c4945f0d1..bb3f4519280 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Firefox-linux.png index d8483f52ef6..26680e6b6cb 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Safari-linux.png index df370546514..9c84bc5d3cc 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Chrome-linux.png index 560468aa0c2..64165549a60 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Firefox-linux.png index 7c484c7ed69..449b9d9119b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Safari-linux.png index 0ebdd7211fa..4692e69141e 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Chrome-linux.png index 29480750b24..dd1a8da13b8 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Firefox-linux.png index b3ca95181cf..78ce414aa26 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Safari-linux.png index 7c66a4fd6f6..280701d7e23 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Chrome-linux.png index a5ba4596560..6863f0d284b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Firefox-linux.png index 361f06560b5..5820c018d88 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Safari-linux.png index 61557dae7c5..1f6dc68dc7f 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-longMessage-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Chrome-linux.png index a0e3503ca77..45684af5f4c 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Firefox-linux.png index af2221eff36..6219a8925ae 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Safari-linux.png index f5653b497c0..7a9e38dbab2 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..8dbc29cb243 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..78bee5e0aa1 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Safari-linux.png new file mode 100644 index 00000000000..f803828d4fd Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-ltr-dark-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Chrome-linux.png index 9dd4f09f601..5caa71be29c 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Firefox-linux.png index ac5a802c195..99d5fe1de20 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Safari-linux.png index ce6dd7d0027..847074ad0a2 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..8ada521bffd Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..99e2672bc0a Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Safari-linux.png new file mode 100644 index 00000000000..33ed2dc0651 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-ios-rtl-dark-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Chrome-linux.png index a5c6aef38b4..e11a4b263dd 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Firefox-linux.png index 1efba781e32..24ecd1c6ac6 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Safari-linux.png index cefa829eb2a..668c06c03f2 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..a613e4d78c6 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..f7f1fdf7603 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Safari-linux.png new file mode 100644 index 00000000000..c12b34ffd66 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-ltr-dark-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Chrome-linux.png index 70ad9593ff1..d15382e4393 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Firefox-linux.png index ade8dc3aead..19b4f8300e8 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Safari-linux.png index 2265166ae16..725a18a689d 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..1474decbaf3 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..8046b7d9e60 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Safari-linux.png new file mode 100644 index 00000000000..85ae4ac9e44 Binary files /dev/null and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-multipleButtons-md-rtl-dark-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Chrome-linux.png index 378a22c90e6..4e8022b2ad0 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Firefox-linux.png index 7b5a549d716..f00b8083616 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Safari-linux.png index 709626df99a..4c5d5bb2090 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Chrome-linux.png index f7009bbbc38..2dc9913b8a8 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Firefox-linux.png index 630ab97e544..9c65eff2609 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Safari-linux.png index 67dd59d6571..2f370f86890 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Chrome-linux.png index ab2d0fb3d4d..9b281492d93 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Firefox-linux.png index d87c6009dc2..9372afa23bf 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Safari-linux.png index 85c05b6e878..3c8bf7cfb57 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Chrome-linux.png index 7fcb10fd88c..4ef0bf232c7 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Firefox-linux.png index 6fdc65d64fa..9b21490013d 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Safari-linux.png index 6e837b1540c..0cc97d39f0a 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-noMessage-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Chrome-linux.png index 15033e833d6..bae1df67ee4 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Firefox-linux.png index 2ff9d707647..b7101fb84de 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Safari-linux.png index 2e881665491..5989797632d 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Chrome-linux.png index e177726f882..0a8aa28cbcb 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Firefox-linux.png index 7342e9b3f6a..66b054c9ebf 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Safari-linux.png index 013d104a198..99b504644e6 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Chrome-linux.png index 9fd64258ab1..6cc048b70d1 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Firefox-linux.png index b3624a9dcd5..b8b3d740833 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Safari-linux.png index 4f423135a0e..7345a885d21 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Chrome-linux.png index 07378b8e075..43229ec81dd 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Firefox-linux.png index fc29447a41b..d2e490adc66 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Safari-linux.png index 64c39fbfe81..3e47c0de578 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-prompt-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Chrome-linux.png index da69c5ce86c..d65f05b8cec 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Firefox-linux.png index 97e5cefbd52..b672fb632a0 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Safari-linux.png index a060974f07b..51573c6e5e5 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Chrome-linux.png index cc370eb2087..4c866bd70c6 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Firefox-linux.png index 1c975b1cda3..2b7452f5cec 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Safari-linux.png index 77c28bce8e4..04dab9dd5d0 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Chrome-linux.png index 4d349059a2e..654f9e32c2b 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Firefox-linux.png index a17ba7fdd2e..b8f18e58068 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Safari-linux.png index 1560cae2778..ff51b9b6553 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Chrome-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Chrome-linux.png index d0693de5a91..aa3dd13d974 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Firefox-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Firefox-linux.png index 3607ad7aea2..6f49a91e43f 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Safari-linux.png b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Safari-linux.png index e9af281d2d0..15018c2096a 100644 Binary files a/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Safari-linux.png and b/core/src/components/alert/test/basic/alert.e2e.ts-snapshots/alert-radio-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/alert/test/basic/index.html b/core/src/components/alert/test/basic/index.html index 01f2500760c..74a6f6c68d2 100644 --- a/core/src/components/alert/test/basic/index.html +++ b/core/src/components/alert/test/basic/index.html @@ -28,23 +28,31 @@ - Alert - Alert Long Message - Multiple Buttons (>2) - - Alert No Message - Alert Async Handler - Confirm - Prompt - Radio - Checkbox - CssClass + + + + + + + + + + @@ -22,8 +35,8 @@ - Open Alert - Open Alert, Close After 500ms + + diff --git a/core/src/components/alert/test/translucent/index.html b/core/src/components/alert/test/translucent/index.html index d1c0f58c10f..2dbeada6149 100644 --- a/core/src/components/alert/test/translucent/index.html +++ b/core/src/components/alert/test/translucent/index.html @@ -27,12 +27,10 @@ - Alert - Alert Long Message - Multiple Buttons (>2) - Alert No Message + + + + @@ -48,10 +46,10 @@ - Confirm - Prompt - Radio - Checkbox + + + + @@ -305,6 +303,19 @@ diff --git a/core/src/components/alert/test/trigger/index.html b/core/src/components/alert/test/trigger/index.html index 233b05fc936..f3a11ef91c1 100644 --- a/core/src/components/alert/test/trigger/index.html +++ b/core/src/components/alert/test/trigger/index.html @@ -11,6 +11,19 @@ + @@ -22,8 +35,8 @@ - Open Alert - Open Alert, Close After 500ms + + diff --git a/core/src/components/button/test/basic/button.e2e.ts b/core/src/components/button/test/basic/button.e2e.ts index 2480c2fb2f0..51635161b09 100644 --- a/core/src/components/button/test/basic/button.e2e.ts +++ b/core/src/components/button/test/basic/button.e2e.ts @@ -57,7 +57,7 @@ configs({ modes: ['md'] }).forEach(({ config, screenshot, title }) => { await page.mouse.down(); } - await page.waitForSelector('#default.ion-activated'); + await page.locator('#default.ion-activated').waitFor(); await expect(button).toHaveScreenshot(screenshot(`button-ripple-effect`)); }); diff --git a/core/src/components/button/test/wrap/button.e2e.ts-snapshots/button-wrap-item-button-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/button/test/wrap/button.e2e.ts-snapshots/button-wrap-item-button-ios-ltr-Mobile-Firefox-linux.png index d374cb54e10..4df0af8873d 100644 Binary files a/core/src/components/button/test/wrap/button.e2e.ts-snapshots/button-wrap-item-button-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/button/test/wrap/button.e2e.ts-snapshots/button-wrap-item-button-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/datetime-button/test/basic/datetime-button.e2e.ts b/core/src/components/datetime-button/test/basic/datetime-button.e2e.ts index b52ff42462c..938ce976e54 100644 --- a/core/src/components/datetime-button/test/basic/datetime-button.e2e.ts +++ b/core/src/components/datetime-button/test/basic/datetime-button.e2e.ts @@ -15,7 +15,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); }); test('should switch to a date-only view when the date button is clicked', async ({ page }) => { const datetime = page.locator('ion-datetime'); @@ -45,7 +45,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('Jan 1, 2022'); await expect(page.locator('#time-button')).toContainText('6:30 AM'); @@ -58,7 +58,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('January 2022'); await expect(page.locator('#time-button')).toBeHidden(); @@ -71,7 +71,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('2022'); await expect(page.locator('#time-button')).toBeHidden(); @@ -84,7 +84,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('January'); await expect(page.locator('#time-button')).toBeHidden(); @@ -97,7 +97,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#time-button')).toContainText('6:30 AM'); await expect(page.locator('#date-button')).toBeHidden(); @@ -110,7 +110,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const dateTarget = page.locator('#date-button'); @@ -135,7 +135,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('January 2022'); await expect(page.locator('#time-button')).toBeHidden(); @@ -153,7 +153,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('2022'); await expect(page.locator('#time-button')).toBeHidden(); @@ -169,7 +169,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); /** * The entire text reads 1 ene 2022, but some browsers will add @@ -187,7 +187,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#time-button')).toContainText('16:30'); }); @@ -199,7 +199,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const timeTarget = page.locator('#time-button'); await expect(timeTarget).toContainText('6:30'); @@ -223,7 +223,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM'); await expect(page.locator('#time-button')).not.toBeVisible(); @@ -238,7 +238,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('Jan 1, 2022 6:30 AM'); await expect(page.locator('#time-button')).not.toBeVisible(); diff --git a/core/src/components/datetime-button/test/buttons/index.html b/core/src/components/datetime-button/test/buttons/index.html index 2b6f1f7bcc3..ca484632b95 100644 --- a/core/src/components/datetime-button/test/buttons/index.html +++ b/core/src/components/datetime-button/test/buttons/index.html @@ -18,7 +18,7 @@ - + diff --git a/core/src/components/datetime-button/test/disabled/datetime-button.e2e.ts b/core/src/components/datetime-button/test/disabled/datetime-button.e2e.ts index 23ef52821f2..f8f45fd49c4 100644 --- a/core/src/components/datetime-button/test/disabled/datetime-button.e2e.ts +++ b/core/src/components/datetime-button/test/disabled/datetime-button.e2e.ts @@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toBeDisabled(); await expect(page.locator('#time-button')).toBeDisabled(); @@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetimeButton = page.locator('ion-datetime-button'); await expect(datetimeButton).toHaveScreenshot(screenshot(`datetime-button-disabled`)); diff --git a/core/src/components/datetime-button/test/multiple/datetime-button.e2e.ts b/core/src/components/datetime-button/test/multiple/datetime-button.e2e.ts index 901ddc74be3..598124b1b00 100644 --- a/core/src/components/datetime-button/test/multiple/datetime-button.e2e.ts +++ b/core/src/components/datetime-button/test/multiple/datetime-button.e2e.ts @@ -20,7 +20,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toContainText('3 days'); }); @@ -32,7 +32,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toHaveText('0 days'); }); @@ -49,7 +49,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022'); }); @@ -69,7 +69,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toHaveText('Selected: 3'); }); @@ -86,7 +86,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const ionValueChange = await page.spyOnEvent('ionValueChange'); @@ -111,7 +111,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page.locator('#date-button')).toHaveText('Jun 1, 2022'); await expect(page.locator('#time-button')).toHaveText('4:30 PM'); diff --git a/core/src/components/datetime/datetime.ios.scss b/core/src/components/datetime/datetime.ios.scss index 145053d2f70..5f9aa2d040f 100644 --- a/core/src/components/datetime/datetime.ios.scss +++ b/core/src/components/datetime/datetime.ios.scss @@ -249,9 +249,11 @@ /** * Day that is selected and is today - * should have white color. + * should have base background color + * with contrast text. */ :host .calendar-day.calendar-day-today.calendar-day-active { + background: current-color(base); color: current-color(contrast); } diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index bffcc8942cb..57f275e25f0 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -341,6 +341,9 @@ export class Datetime implements ComponentInterface { * dates are selected. Only used if there are 0 or more than 1 * selected (i.e. unused for exactly 1). By default, the header * text is set to "numberOfDates days". + * + * See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this + * if you need to access `this` from within the callback. */ @Prop() titleSelectedDatesFormatter?: TitleSelectedDatesFormatter; @@ -1281,21 +1284,42 @@ export class Datetime implements ComponentInterface { (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year); const bodyIsVisible = el.classList.contains('datetime-ready'); const { isGridStyle, showMonthAndYear } = this; - if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) { - this.animateToDate(targetValue); - } else { - /** - * We only need to do this if we didn't just animate to a new month, - * since that calls prevMonth/nextMonth which calls setWorkingParts for us. - */ - this.setWorkingParts({ - month, - day, - year, - hour, - minute, - ampm, - }); + + let areAllSelectedDatesInSameMonth = true; + if (Array.isArray(valueToProcess)) { + const firstMonth = valueToProcess[0].month; + for (const date of valueToProcess) { + if (date.month !== firstMonth) { + areAllSelectedDatesInSameMonth = false; + break; + } + } + } + + /** + * If there is more than one date selected + * and the dates aren't all in the same month, + * then we should neither animate to the date + * nor update the working parts because we do + * not know which date the user wants to view. + */ + if (areAllSelectedDatesInSameMonth) { + if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) { + this.animateToDate(targetValue); + } else { + /** + * We only need to do this if we didn't just animate to a new month, + * since that calls prevMonth/nextMonth which calls setWorkingParts for us. + */ + this.setWorkingParts({ + month, + day, + year, + hour, + minute, + ampm, + }); + } } }; diff --git a/core/src/components/datetime/test/a11y/datetime.e2e.ts b/core/src/components/datetime/test/a11y/datetime.e2e.ts index 5f4e5ff9e3f..05b10b5e8a3 100644 --- a/core/src/components/datetime/test/a11y/datetime.e2e.ts +++ b/core/src/components/datetime/test/a11y/datetime.e2e.ts @@ -24,7 +24,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { const container = page.locator('#container'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(container).toHaveScreenshot(screenshot(`datetime-scale`)); }); @@ -87,7 +87,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const clearButton = page.locator('#clear-button button'); const selectedDay = page.locator('.calendar-day-active'); @@ -114,7 +114,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); const calendarBody = page.locator('.calendar-body'); await expect(calendarMonthYear).toHaveText('February 2022'); diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts b/core/src/components/datetime/test/basic/datetime.e2e.ts index c0ef49adf64..48b0b0ceec0 100644 --- a/core/src/components/datetime/test/basic/datetime.e2e.ts +++ b/core/src/components/datetime/test/basic/datetime.e2e.ts @@ -110,7 +110,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const ionChange = await page.spyOnEvent('ionChange'); @@ -255,7 +255,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarBody = page.locator('ion-datetime .calendar-body'); const calendarHeader = page.locator('ion-datetime .calendar-month-year'); @@ -275,7 +275,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarBody = page.locator('ion-datetime .calendar-body'); const calendarHeader = page.locator('ion-datetime .calendar-month-year'); @@ -297,7 +297,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarBody = page.locator('ion-datetime .calendar-body'); const calendarHeader = page.locator('ion-datetime .calendar-month-year'); @@ -331,7 +331,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const monthYearButton = page.locator('ion-datetime .calendar-month-year'); const monthYearInterface = page.locator('ion-datetime .datetime-year'); @@ -349,7 +349,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await datetime.evaluate((el: HTMLIonDatetimeElement) => el.style.removeProperty('display')); await expect(datetime).toBeVisible(); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); // month/year interface should be reset await expect(monthYearInterface).toBeHidden(); @@ -399,7 +399,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const selectedDay = page.locator('ion-datetime .calendar-day-active'); @@ -428,7 +428,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const calendarButtons = page.locator('.calendar-day:not([disabled])'); @@ -447,7 +447,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const datetime = page.locator('ion-datetime'); @@ -458,6 +458,44 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { }); }); +configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('datetime: today button rendering'), () => { + test('should render today button correctly when selected', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'FW-5808', + }); + await page.setContent( + ` + + + + `, + config + ); + + const datetime = page.locator('ion-datetime'); + + await page.locator('.datetime-ready').waitFor(); + + await expect(datetime.locator('.calendar-day-today')).toHaveScreenshot( + screenshot(`datetime-today-calendar-button`) + ); + }); + }); +}); + /** * The calendar day highlight does not render * on iOS and has the same behavior across directions. @@ -479,7 +517,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co const datetime = page.locator('ion-datetime'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(datetime).toHaveScreenshot(screenshot(`date-highlight-start-of-month`)); @@ -505,7 +543,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..bcca67fe4f5 Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..840fd08af40 Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Safari-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..ac81896e592 Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Chrome-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..e561bd4d5a8 Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Firefox-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..a4af82c2832 Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Safari-linux.png b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..8e536c6cf0c Binary files /dev/null and b/core/src/components/datetime/test/basic/datetime.e2e.ts-snapshots/datetime-today-calendar-button-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/datetime/test/basic/index.html b/core/src/components/datetime/test/basic/index.html index 153c85688a7..2023b4a1190 100644 --- a/core/src/components/datetime/test/basic/index.html +++ b/core/src/components/datetime/test/basic/index.html @@ -214,8 +214,7 @@ - Dark Mode - + Dark Mode iOS Mode @@ -225,23 +224,19 @@ - Show Default Title - + Show Default Title - Show Default Buttons - + Show Default Buttons - Locale - + - Color - + Primary Secondary Tertiary diff --git a/core/src/components/datetime/test/datetime.e2e.ts b/core/src/components/datetime/test/datetime.e2e.ts index f6ac137d710..a7653597b19 100644 --- a/core/src/components/datetime/test/datetime.e2e.ts +++ b/core/src/components/datetime/test/datetime.e2e.ts @@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); }); test('should switch the calendar header when moving to a month with a different number of days', async ({ diff --git a/core/src/components/datetime/test/disable-dates/datetime.e2e.ts b/core/src/components/datetime/test/disable-dates/datetime.e2e.ts index 6ae7c54ea9a..3fc4b882186 100644 --- a/core/src/components/datetime/test/disable-dates/datetime.e2e.ts +++ b/core/src/components/datetime/test/disable-dates/datetime.e2e.ts @@ -113,7 +113,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => test.describe('check example usages', () => { test.beforeEach(async ({ page }) => { await page.goto('/src/components/datetime/test/disable-dates', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').first().waitFor(); }); test('should disable a specific date', async ({ page }) => { diff --git a/core/src/components/datetime/test/disabled/datetime.e2e.ts b/core/src/components/datetime/test/disabled/datetime.e2e.ts index d794a2d2ef6..91b48b736cf 100644 --- a/core/src/components/datetime/test/disabled/datetime.e2e.ts +++ b/core/src/components/datetime/test/disabled/datetime.e2e.ts @@ -27,7 +27,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const febFirstButton = page.locator(`.calendar-day[data-day='1'][data-month='2']`); @@ -42,7 +42,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); await expect(calendarMonthYear.locator('button')).toBeDisabled(); }); @@ -71,7 +71,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const clearButton = page.locator('#clear-button button'); @@ -86,7 +86,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); const calendarBody = page.locator('.calendar-body'); await expect(calendarMonthYear).toHaveText('February 2022'); diff --git a/core/src/components/datetime/test/display/datetime.e2e.ts b/core/src/components/datetime/test/display/datetime.e2e.ts index 0fcb9db898f..501bdfeeab0 100644 --- a/core/src/components/datetime/test/display/datetime.e2e.ts +++ b/core/src/components/datetime/test/display/datetime.e2e.ts @@ -15,7 +15,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-date-time`)); }); @@ -26,7 +26,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-time-date`)); }); @@ -37,7 +37,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-time`)); }); @@ -48,7 +48,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-date`)); }); @@ -69,7 +69,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-date-time`)); }); @@ -80,7 +80,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-time-date`)); }); @@ -91,7 +91,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-time`)); }); @@ -102,7 +102,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await expect(datetime).toHaveScreenshot(screenshot(`datetime-display-cover-date`)); }); @@ -119,7 +119,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test('month selection should work after changing presentation', async ({ page }) => { await page.goto('/src/components/datetime/test/display', config); const ionWorkingPartsDidChange = await page.spyOnEvent('ionWorkingPartsDidChange'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const select = page.locator('select#presentation'); diff --git a/core/src/components/datetime/test/locale/datetime.e2e.ts b/core/src/components/datetime/test/locale/datetime.e2e.ts index fba13a4137c..37d992d730b 100644 --- a/core/src/components/datetime/test/locale/datetime.e2e.ts +++ b/core/src/components/datetime/test/locale/datetime.e2e.ts @@ -95,7 +95,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetimeButtons = page.locator('ion-datetime .calendar-day:not([disabled])'); @@ -111,7 +111,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetimeYear = page.locator('ion-datetime .year-column .picker-item[data-value="2022"]'); @@ -147,7 +147,7 @@ class DatetimeLocaleFixture { this.datetime = this.page.locator('ion-datetime'); - await this.page.waitForSelector('.datetime-ready'); + await this.page.locator('.datetime-ready').waitFor(); } async expectLocalizedDatePicker(screenshot: ScreenshotFn) { diff --git a/core/src/components/datetime/test/minmax/datetime.e2e.ts b/core/src/components/datetime/test/minmax/datetime.e2e.ts index ae25f71f492..4f6aa033a5b 100644 --- a/core/src/components/datetime/test/minmax/datetime.e2e.ts +++ b/core/src/components/datetime/test/minmax/datetime.e2e.ts @@ -36,7 +36,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const prevButton = page.locator('ion-datetime .calendar-next-prev ion-button:nth-child(1)'); const nextButton = page.locator('ion-datetime .calendar-next-prev ion-button:nth-child(2)'); @@ -61,7 +61,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => await page.goto('/src/components/datetime/test/minmax', config); const calendarMonths = page.locator('ion-datetime#inside .calendar-month'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').first().waitFor(); await expect(calendarMonths.nth(0)).not.toHaveClass(/calendar-month-disabled/); await expect(calendarMonths.nth(1)).not.toHaveClass(/calendar-month-disabled/); @@ -70,7 +70,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => test('datetime: minmax navigation disabled', async ({ page }) => { await page.goto('/src/components/datetime/test/minmax', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').first().waitFor(); const navButtons = page.locator('ion-datetime#outside .calendar-next-prev ion-button'); @@ -80,7 +80,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => test('datetime: min including day should not disable month', async ({ page }) => { await page.goto('/src/components/datetime/test/minmax', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').first().waitFor(); const calendarMonths = page.locator('ion-datetime#min-with-day .calendar-month'); @@ -102,7 +102,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent'); @@ -124,7 +124,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => test.describe('setting value outside bounds should show in-bounds month', () => { const testDisplayedMonth = async (page: E2EPage, content: string, expectedString = /June 2021/) => { await page.setContent(content, config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); await expect(calendarMonthYear).toHaveText(expectedString); @@ -174,7 +174,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetimeMonthDidChange = await page.spyOnEvent('datetimeMonthDidChange'); const eventButton = page.locator('button#bind'); @@ -260,7 +260,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const ionChange = await page.spyOnEvent('ionChange'); @@ -283,7 +283,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const ionChange = await page.spyOnEvent('ionChange'); @@ -311,7 +311,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)'); const ionChange = await page.spyOnEvent('ionChange'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await monthColumnItems.nth(0).click(); // switch to January await ionChange.next(); @@ -346,7 +346,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); // Select Jan 10, 2022 const maxDate = page.locator('ion-datetime .calendar-day[data-day="10"][data-month="1"][data-year="2022"]'); diff --git a/core/src/components/datetime/test/month-year-picker/datetime.e2e.ts b/core/src/components/datetime/test/month-year-picker/datetime.e2e.ts index 9b421777239..beda3e664b5 100644 --- a/core/src/components/datetime/test/month-year-picker/datetime.e2e.ts +++ b/core/src/components/datetime/test/month-year-picker/datetime.e2e.ts @@ -8,7 +8,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test.describe(title('datetime: month-year picker'), () => { test.beforeEach(async ({ page }) => { await page.goto('/src/components/datetime/test/month-year-picker', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').first().waitFor(); }); test('should hide the footer when picker is open', async ({ page }) => { diff --git a/core/src/components/datetime/test/multiple/datetime.e2e.ts b/core/src/components/datetime/test/multiple/datetime.e2e.ts index 7a353a4ed33..0e2c0efb381 100644 --- a/core/src/components/datetime/test/multiple/datetime.e2e.ts +++ b/core/src/components/datetime/test/multiple/datetime.e2e.ts @@ -5,7 +5,7 @@ import { configs, test } from '@utils/test/playwright'; const SINGLE_DATE = '2022-06-01'; const MULTIPLE_DATES = ['2022-06-01', '2022-06-02', '2022-06-03']; -const MULTIPLE_DATES_SEPARATE_MONTHS = ['2022-04-01', '2022-05-01', '2022-06-01']; +const MULTIPLE_DATES_SEPARATE_MONTHS = ['2022-03-01', '2022-04-01', '2022-05-01']; interface DatetimeMultipleConfig { multiple?: boolean; @@ -62,7 +62,7 @@ class DatetimeMultipleFixture { ); this.datetime = this.page.locator('ion-datetime'); - await this.page.waitForSelector('.datetime-ready'); + await this.page.locator('.datetime-ready').waitFor(); return this.datetime; } @@ -158,10 +158,32 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { }); }); - test('multiple default values across months should display at least one value', async () => { + test('should scroll to new month when value is updated with multiple dates in the same month', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/28602', + }); const datetime = await datetimeFixture.goto(config, MULTIPLE_DATES_SEPARATE_MONTHS); + await datetime.evaluate((el: HTMLIonDatetimeElement, dates: string[]) => { + el.value = dates; + }, MULTIPLE_DATES); + + await page.waitForChanges(); + + const monthYear = datetime.locator('.calendar-month-year'); + await expect(monthYear).toHaveText(/June 2022/); + }); + + test('should not scroll to new month when value is updated with dates in different months', async ({ page }) => { + const datetime = await datetimeFixture.goto(config, MULTIPLE_DATES); + await datetime.evaluate((el: HTMLIonDatetimeElement, dates: string[]) => { + el.value = dates; + }, MULTIPLE_DATES_SEPARATE_MONTHS); + + await page.waitForChanges(); + const monthYear = datetime.locator('.calendar-month-year'); - await expect(monthYear).toHaveText(/April 2022/); + await expect(monthYear).toHaveText(/June 2022/); }); test('with buttons, should only update value when confirm is called', async ({ page }) => { @@ -282,7 +304,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { `, config ); - await page.waitForSelector(`.datetime-ready`); + await page.locator(`.datetime-ready`).waitFor(); const datetime = page.locator('ion-datetime'); const header = datetime.locator('.datetime-selected-date'); diff --git a/core/src/components/datetime/test/position/datetime.e2e.ts b/core/src/components/datetime/test/position/datetime.e2e.ts index f2f705c3075..c817e3c6d0b 100644 --- a/core/src/components/datetime/test/position/datetime.e2e.ts +++ b/core/src/components/datetime/test/position/datetime.e2e.ts @@ -11,7 +11,7 @@ configs().forEach(({ title, screenshot, config }) => { await openDateTimeBtn.click(); await ionPopoverDidPresent.next(); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page).toHaveScreenshot(screenshot(`datetime-position-base`)); diff --git a/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts b/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts index f00c313889b..f90337e870c 100644 --- a/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts +++ b/core/src/components/datetime/test/prefer-wheel/datetime.e2e.ts @@ -23,7 +23,7 @@ configs().forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-date-diff`)); }); @@ -34,7 +34,7 @@ configs().forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-date-time-diff`)); }); @@ -45,7 +45,7 @@ configs().forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); await expect(page).toHaveScreenshot(screenshot(`datetime-wheel-time-date-diff`)); }); @@ -56,7 +56,7 @@ configs().forEach(({ title, screenshot, config }) => { `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); @@ -80,7 +80,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(27); @@ -93,7 +93,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(1); @@ -116,7 +116,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const disabledMonths = page.locator('.month-column .picker-item[disabled]'); const disabledYears = page.locator('.year-column .picker-item[disabled]'); @@ -141,7 +141,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)'); @@ -175,7 +175,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); @@ -209,7 +209,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)'); @@ -230,7 +230,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)'); @@ -253,7 +253,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-05-25T12:40:00.000Z')); @@ -285,7 +285,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)'); const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)'); @@ -306,7 +306,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const columns = page.locator('ion-picker-column-internal'); @@ -327,7 +327,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const columns = page.locator('ion-picker-column-internal'); @@ -346,7 +346,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(57); @@ -359,7 +359,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(41); @@ -382,7 +382,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const disabledDates = page.locator('.date-column .picker-item[disabled]'); @@ -403,7 +403,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -424,7 +424,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -444,7 +444,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateColumn = page.locator('.date-column'); const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)'); @@ -474,7 +474,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -494,7 +494,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -511,7 +511,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const ionChange = await page.spyOnEvent('ionChange'); const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -531,7 +531,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(57); @@ -544,7 +544,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]'); expect(await dayValues.count()).toEqual(41); @@ -567,7 +567,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const disabledDates = page.locator('.date-column .picker-item[disabled]'); @@ -588,7 +588,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -609,7 +609,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -629,7 +629,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dateColumn = page.locator('.date-column'); const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)'); @@ -659,7 +659,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); @@ -679,7 +679,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)'); diff --git a/core/src/components/datetime/test/presentation/datetime.e2e.ts b/core/src/components/datetime/test/presentation/datetime.e2e.ts index 7bff588cab4..af0055a8142 100644 --- a/core/src/components/datetime/test/presentation/datetime.e2e.ts +++ b/core/src/components/datetime/test/presentation/datetime.e2e.ts @@ -117,7 +117,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const monthYearButton = page.locator('ion-datetime .calendar-month-year'); @@ -189,7 +189,7 @@ class DatetimePresentationFixture { `, config ); - await this.page.waitForSelector('.datetime-ready'); + await this.page.locator('.datetime-ready').waitFor(); this.datetime = this.page.locator('ion-datetime'); } @@ -214,7 +214,7 @@ class TimePickerFixture { `, config ); - await this.page.waitForSelector('.datetime-ready'); + await this.page.locator('.datetime-ready').waitFor(); this.timePicker = this.page.locator('ion-datetime'); } diff --git a/core/src/components/datetime/test/readonly/datetime.e2e.ts b/core/src/components/datetime/test/readonly/datetime.e2e.ts index f157bd36e32..f16b6faf216 100644 --- a/core/src/components/datetime/test/readonly/datetime.e2e.ts +++ b/core/src/components/datetime/test/readonly/datetime.e2e.ts @@ -27,7 +27,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const febFirstButton = page.locator(`.calendar-day[data-day='1'][data-month='2']`); @@ -43,7 +43,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree ); const ionChange = await page.spyOnEvent('ionChange'); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); await expect(calendarMonthYear).toHaveText('February 2022'); @@ -66,7 +66,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const calendarMonthYear = page.locator('ion-datetime .calendar-month-year'); const monthYearButton = page.locator('.calendar-month-year ion-item'); await expect(calendarMonthYear).toHaveText('February 2022'); @@ -157,7 +157,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const clearButton = page.locator('#clear-button button'); diff --git a/core/src/components/datetime/test/set-value/datetime.e2e.ts b/core/src/components/datetime/test/set-value/datetime.e2e.ts index 798b87144a1..37daadf2b83 100644 --- a/core/src/components/datetime/test/set-value/datetime.e2e.ts +++ b/core/src/components/datetime/test/set-value/datetime.e2e.ts @@ -5,7 +5,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test.describe(title('datetime: set-value'), () => { test('should update the active date when value is initially set', async ({ page }) => { await page.goto('/src/components/datetime/test/set-value', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-11-25T12:40:00.000Z')); @@ -18,7 +18,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test('should update the active time when value is initially set', async ({ page }) => { await page.goto('/src/components/datetime/test/set-value', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-11-25T12:40:00.000Z')); @@ -37,7 +37,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); const activeDayButton = page.locator('.calendar-day-active'); @@ -53,7 +53,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => test('should scroll to new month when value is initially set and then updated', async ({ page }) => { await page.goto('/src/components/datetime/test/set-value', config); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const datetime = page.locator('ion-datetime'); await datetime.evaluate((el: HTMLIonDatetimeElement) => (el.value = '2021-05-25T12:40:00.000Z')); diff --git a/core/src/components/datetime/test/time-label/datetime.e2e.ts b/core/src/components/datetime/test/time-label/datetime.e2e.ts index cf3fb9f7806..88acbbe8570 100644 --- a/core/src/components/datetime/test/time-label/datetime.e2e.ts +++ b/core/src/components/datetime/test/time-label/datetime.e2e.ts @@ -10,7 +10,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const timeLabel = page.locator('ion-datetime .time-header'); await expect(timeLabel).toHaveText('Time'); @@ -22,7 +22,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const timeLabel = page.locator('ion-datetime .time-header'); await expect(timeLabel).toHaveText(''); diff --git a/core/src/components/datetime/test/values/datetime.e2e.ts b/core/src/components/datetime/test/values/datetime.e2e.ts index e785e484e00..ce17cc16019 100644 --- a/core/src/components/datetime/test/values/datetime.e2e.ts +++ b/core/src/components/datetime/test/values/datetime.e2e.ts @@ -10,7 +10,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => `, config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const items = page.locator('.calendar-day:not([disabled])'); @@ -91,7 +91,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const minuteItems = page.locator( 'ion-picker-column-internal:nth-of-type(2) .picker-item:not(.picker-item-empty)' @@ -137,7 +137,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const monthItems = page.locator('.month-column .picker-item:not(.picker-item-empty)'); await expect(monthItems).toHaveText(['January']); @@ -169,7 +169,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => config ); - await page.waitForSelector('.datetime-ready'); + await page.locator('.datetime-ready').waitFor(); const todayButton = page.locator('.calendar-day[data-day="10"][data-month="10"][data-year="2022"]'); diff --git a/core/src/components/header/test/condense/header.e2e.ts b/core/src/components/header/test/condense/header.e2e.ts index c2ac59efd0f..791c1b720af 100644 --- a/core/src/components/header/test/condense/header.e2e.ts +++ b/core/src/components/header/test/condense/header.e2e.ts @@ -16,7 +16,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c await content.evaluate(async (el: HTMLIonContentElement) => { await el.scrollToBottom(); }); - await page.waitForSelector('#largeTitleHeader.header-collapse-condense-inactive'); + await page.locator('#largeTitleHeader.header-collapse-condense-inactive').waitFor(); await expect(smallTitleHeader).toHaveScreenshot(screenshot(`header-condense-large-title-collapsed-diff`)); @@ -30,7 +30,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c await content.evaluate(async (el: HTMLIonContentElement) => { await el.scrollToTop(); }); - await page.waitForSelector('#smallTitleHeader.header-collapse-condense-inactive'); + await page.locator('#smallTitleHeader.header-collapse-condense-inactive').waitFor(); await expect(smallTitleHeader).toHaveAttribute('aria-hidden', 'true'); }); diff --git a/core/src/components/input/input.ios.scss b/core/src/components/input/input.ios.scss index 90ae0c842fd..35dc4aee518 100644 --- a/core/src/components/input/input.ios.scss +++ b/core/src/components/input/input.ios.scss @@ -37,3 +37,25 @@ :host(.input-disabled) { opacity: #{$input-ios-disabled-opacity}; } + +// Start/End Slots +// ---------------------------------------------------------------- + +/** + * Slotted buttons have a lot of default padding that can + * cause them to look misaligned from other pieces such + * as the control's label, especially when using a clear + * fill. We also make them circular to ensure that non- + * clear buttons and the focus/hover state on clear ones + * don't look too crowded. + */ +::slotted(ion-button[slot="start"].button-has-icon-only), +::slotted(ion-button[slot="end"].button-has-icon-only) { + --border-radius: 50%; + --padding-start: 0; + --padding-end: 0; + --padding-top: 0; + --padding-bottom: 0; + + aspect-ratio: 1; +} diff --git a/core/src/components/input/input.md.scss b/core/src/components/input/input.md.scss index 4c5d9906745..97c65cd59dc 100644 --- a/core/src/components/input/input.md.scss +++ b/core/src/components/input/input.md.scss @@ -117,3 +117,27 @@ :host(.input-shape-round) { --border-radius: 16px; } + +// Start/End Slots +// ---------------------------------------------------------------- + +/** + * Slotted buttons have a lot of default padding that can + * cause them to look misaligned from other pieces such + * as the control's label, especially when using a clear + * fill. We also make them circular to ensure that non- + * clear buttons and the focus/hover state on clear ones + * don't look too crowded. + */ +::slotted(ion-button[slot="start"].button-has-icon-only), +::slotted(ion-button[slot="end"].button-has-icon-only) { + --border-radius: 50%; + --padding-start: 8px; + --padding-end: 8px; + --padding-top: 8px; + --padding-bottom: 8px; + + aspect-ratio: 1; + + min-height: 40px; +} diff --git a/core/src/components/input/input.scss b/core/src/components/input/input.scss index 7ebfb52680f..e2504b032a5 100644 --- a/core/src/components/input/input.scss +++ b/core/src/components/input/input.scss @@ -259,15 +259,16 @@ // Input Has focus // -------------------------------------------------- -// When the input has focus, then the input cover should be hidden -:host(.has-focus) { +// TODO FW-2764 Remove this +:host(.has-focus.legacy-input) { pointer-events: none; } -:host(.has-focus) input, -:host(.has-focus) a, -:host(.has-focus) button { +// TODO FW-2764 Remove this +:host(.has-focus.legacy-input) input, +:host(.has-focus.legacy-input) a, +:host(.has-focus.legacy-input) button { pointer-events: auto; } @@ -659,8 +660,10 @@ ::slotted([slot="start"]) { margin-inline-end: $form-control-label-margin; + margin-inline-start: 0; } ::slotted([slot="end"]) { margin-inline-start: $form-control-label-margin; + margin-inline-end: 0; } diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index e8cc0492741..3607b103221 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -121,6 +121,9 @@ export class Input implements ComponentInterface { /** * A callback used to format the counter text. * By default the counter text is set to "itemLength / maxLength". + * + * See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this + * if you need to access `this` from within the callback. */ @Prop() counterFormatter?: (inputLength: number, maxLength: number) => string; @@ -549,15 +552,37 @@ export class Input implements ComponentInterface { if (!this.shouldClearOnEdit()) { return; } + + /** + * The following keys do not modify the + * contents of the input. As a result, pressing + * them should not edit the input. + * + * We can't check to see if the value of the input + * was changed because we call checkClearOnEdit + * in a keydown listener, and the key has not yet + * been added to the input. + */ + const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control']; + const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key); + /** * Clear the input if the control has not been previously cleared during focus. * Do not clear if the user hitting enter to submit a form. */ - if (!this.didInputClearOnEdit && this.hasValue() && ev.key !== 'Enter' && ev.key !== 'Tab') { + if (!this.didInputClearOnEdit && this.hasValue() && !pressedIgnoredKey) { this.value = ''; this.emitInputChange(ev); } - this.didInputClearOnEdit = true; + + /** + * Pressing an IGNORED_KEYS first and + * then an allowed key will cause the input to not + * be cleared. + */ + if (!pressedIgnoredKey) { + this.didInputClearOnEdit = true; + } } private onCompositionStart = () => { diff --git a/core/src/components/input/test/clear-on-edit/input.e2e.ts b/core/src/components/input/test/clear-on-edit/input.e2e.ts index e6686902782..ecfbecb3c1e 100644 --- a/core/src/components/input/test/clear-on-edit/input.e2e.ts +++ b/core/src/components/input/test/clear-on-edit/input.e2e.ts @@ -1,6 +1,8 @@ import { expect } from '@playwright/test'; import { test, configs } from '@utils/test/playwright'; +const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control']; + configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('input: clearOnEdit'), () => { test('should clear when typed into', async ({ page }) => { @@ -16,28 +18,57 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await expect(input).toHaveJSProperty('value', 'h'); }); - test('should not clear when enter is pressed', async ({ page }) => { - await page.setContent(``, config); + test('should not clear the input if it does not have an initial value when typing', async ({ page }) => { + await page.setContent(``, config); const input = page.locator('ion-input'); - await input.locator('input').focus(); - await page.keyboard.press('Enter'); - await page.waitForChanges(); + await input.click(); + await input.type('hello world'); - await expect(input).toHaveJSProperty('value', 'abc'); + await expect(input).toHaveJSProperty('value', 'hello world'); + }); + + IGNORED_KEYS.forEach((ignoredKey: string) => { + test(`should not clear when ${ignoredKey} is pressed`, async ({ page, skip }) => { + skip.browser( + (browserName: string) => browserName === 'firefox' && ignoredKey === 'Meta', + 'Firefox incorrectly adds "OS" to the input when pressing the Meta key on Linux' + ); + await page.setContent(``, config); + + const input = page.locator('ion-input'); + await input.locator('input').focus(); + + await page.keyboard.press(ignoredKey); + await page.waitForChanges(); + + await expect(input).toHaveJSProperty('value', 'abc'); + }); }); - test('should not clear when tab is pressed', async ({ page }) => { + test('should clear after when pressing valid key after pressing ignored key', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/28633', + }); + await page.setContent(``, config); const input = page.locator('ion-input'); await input.locator('input').focus(); - await page.keyboard.press('Tab'); + // ignored + await page.keyboard.press('Shift'); await page.waitForChanges(); await expect(input).toHaveJSProperty('value', 'abc'); + + // allowed + await page.keyboard.press('a'); + await page.waitForChanges(); + + await expect(input).toHaveJSProperty('value', 'a'); }); }); }); diff --git a/core/src/components/input/test/slot/input.e2e.ts b/core/src/components/input/test/slot/input.e2e.ts index ac0d80ef35a..2ad41334f25 100644 --- a/core/src/components/input/test/slot/input.e2e.ts +++ b/core/src/components/input/test/slot/input.e2e.ts @@ -8,7 +8,9 @@ configs().forEach(({ title, screenshot, config }) => { ` - lbs + + + `, config @@ -23,7 +25,9 @@ configs().forEach(({ title, screenshot, config }) => { ` - lbs + + + `, config diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Chrome-linux.png index f778245157a..92715e15105 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Firefox-linux.png index bf7dc6b7a13..9e1e886db29 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Safari-linux.png index 8ace1899ce2..221efa3a6ff 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Chrome-linux.png index 5bd211a328d..86147ea5125 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Firefox-linux.png index bd73d2b1486..1ce2e72b566 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Safari-linux.png index 1d85f1b3261..434e7e8f7d3 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Chrome-linux.png index 8970e326607..e720d883b01 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Firefox-linux.png index 12813a2c50f..f63fb775d51 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Safari-linux.png index 7641e731c55..09e283054f7 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Chrome-linux.png index 646d11df408..54e5ebbca8a 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Firefox-linux.png index e66f7a3f557..7aee63eacf6 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Safari-linux.png index 019f5aeb681..5a4de68e951 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-floating-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Chrome-linux.png index 16355a9012b..061b66c3e41 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Firefox-linux.png index 8c4fb42dbf6..f0890040a2d 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Safari-linux.png index 8441a54b036..87a794b7d60 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Chrome-linux.png index 3b9d27fe85e..3f77d0463c2 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Firefox-linux.png index 467ff73f4f2..013abc38e53 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Safari-linux.png index f21e37d3509..b700c0e5516 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Chrome-linux.png index e9f64c0d768..411ed54a4b7 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Firefox-linux.png index f7eeabfab87..9bf9fbb6a02 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Safari-linux.png index 22ac0aa749c..2491ca85100 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Chrome-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Chrome-linux.png index 83f5a80f824..298a824015b 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Firefox-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Firefox-linux.png index bb75d1f9f84..a1376b5f54f 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Safari-linux.png b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Safari-linux.png index 60f1e692e62..4eb6676202b 100644 Binary files a/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Safari-linux.png and b/core/src/components/input/test/slot/input.e2e.ts-snapshots/input-slots-label-start-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/item.scss b/core/src/components/item/item.scss index 2f36fe53405..aa52b7b953e 100644 --- a/core/src/components/item/item.scss +++ b/core/src/components/item/item.scss @@ -51,15 +51,6 @@ * @prop --highlight-color-valid: The color of the highlight on the item when valid. Only applies to inputs and textareas using the legacy form syntax. DEPRECATED: Highlights can be styled on `ion-input` or `ion-textarea` when using the modern form syntax. * @prop --highlight-color-invalid: The color of the highlight on the item when invalid. Only applies to inputs and textareas using the legacy form syntax. DEPRECATED: Highlights can be styled on `ion-input` or `ion-textarea` when using the modern form syntax. */ - - /** - * We change the minimum width as the - * font size changes. Using a fixed minimum - * width means that fewer and fewer characters - * can be displayed in the same space as the - * text grows. - */ - --inner-min-width: 4rem; --border-radius: 0px; --border-width: 0px; --border-style: solid; @@ -230,11 +221,6 @@ display: flex; position: relative; - // Flex wrap is required here in order to wrap - // the start slot + .item-inner content that - // doesn't fit on the same line - flex-wrap: wrap; - align-items: inherit; justify-content: inherit; @@ -258,11 +244,6 @@ box-sizing: border-box; } -// TODO(FW-5289): remove -:host(.item-legacy) .item-native { - flex-wrap: unset; -} - .item-native::-moz-focus-inner { border: 0; } @@ -307,34 +288,13 @@ button, a { // This is required to work with an inset highlight position: relative; - // This flex property is required in order to make - // the elements wrap when there is a slotted start - // element and a label - flex: 1 0 0; + flex: 1; flex-direction: inherit; - // Flex wrap is required here in order to wrap - // .input-wrapper content + the end slot that - // doesn't fit on the same line - flex-wrap: wrap; - align-items: inherit; align-self: stretch; - /** - * The min-width defines when the - * content in the default slot should - * stop wrapping/truncating within its own - * container. At this point the entire - * container will wrap to the next line. - */ - min-width: var(--inner-min-width); - - // Max width must be set to 100%, otherwise the - // elements will overflow this container instead - // of wrapping - max-width: 100%; min-height: inherit; border-width: var(--inner-border-width); @@ -346,15 +306,6 @@ button, a { box-sizing: border-box; } -// TODO(FW-5289): remove -:host(.item-legacy) .item-inner { - flex: 1; - - flex-wrap: unset; - - max-width: unset; -} - // Item Bottom // -------------------------------------------------- @@ -426,6 +377,13 @@ button, a { // shrink and wrap its text instead of moving to its // own row if there are slotted elements next to it width: min-content; + + /** + * We allow labels in the default + * slot to grow. However, we do not + * want them to grow indefinitely. + */ + max-width: 100%; } // Item Input @@ -441,38 +399,19 @@ button, a { // This flex property is required in order to keep // the label from shrinking when there are wide // elements next to it - flex: 1 0 auto; + flex: 1; flex-direction: inherit; - // Flex wrap is required here in order to wrap - // content in the default slot (such as a label - // and a button) that doesn't fit on the same line - flex-wrap: wrap; - align-items: inherit; align-self: stretch; - // Max width must be set to 100%, otherwise the - // elements will overflow this container instead - // of wrapping - max-width: 100%; - text-overflow: ellipsis; overflow: inherit; box-sizing: border-box; } -// TODO(FW-5289): remove -:host(.item-legacy) .input-wrapper { - flex: 1; - - flex-wrap: unset; - - max-width: unset; -} - :host(.item-label-stacked), :host(.item-label-floating) { align-items: start; diff --git a/core/src/components/item/item.tsx b/core/src/components/item/item.tsx index ad056c5cdfc..c6c18d4e981 100644 --- a/core/src/components/item/item.tsx +++ b/core/src/components/item/item.tsx @@ -150,6 +150,12 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac @State() counterString: string | null | undefined; + @Watch('button') + buttonChanged() { + // Update the focusable option when the button option is changed + this.focusable = this.isFocusable(); + } + @Watch('counterFormatter') counterFormatterChanged() { this.updateCounterOutput(this.getFirstInput()); diff --git a/core/src/components/item/test/a11y/index.html b/core/src/components/item/test/a11y/index.html index 9aad84631c2..18fb4d703d9 100644 --- a/core/src/components/item/test/a11y/index.html +++ b/core/src/components/item/test/a11y/index.html @@ -16,23 +16,19 @@

Item

- Item with Input - + - Item disabled with Input - + - Item with Input disabled - + - Item with Select - + No Game Console NES Nintendo64 @@ -44,8 +40,7 @@

Item

- Item disabled with Select - + No Game Console NES Nintendo64 @@ -57,8 +52,7 @@

Item

- Item with Select disabled - + No Game Console NES Nintendo64 @@ -70,33 +64,27 @@

Item

- Item with Toggle - + Item with Toggle - Item disabled with Toggle - + Item disabled with Toggle - Item with Toggle disabled - + Item with Toggle disabled - Item with Radio - + Item with Radio - Item disabled with Radio - + Item disabled with Radio - Item with Radio disabled - + Item with Radio disabled diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Chrome-linux.png index 5dcb0bd7265..236a060b294 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Firefox-linux.png index 7ca90b8b85e..0eaca5aaeb4 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Safari-linux.png index 6cedd64817b..bd8d901f736 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Chrome-linux.png index 9e54eac08ad..c98e7f9dfcf 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Firefox-linux.png index a3e9d3e2aa7..89acf693034 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Safari-linux.png index 99cb77ae039..ff14e8e3491 100644 Binary files a/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/a11y/item.e2e.ts-snapshots/item-buttons-scale-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/basic/index.html b/core/src/components/item/test/basic/index.html index 7cf41908848..f9d6c77bb72 100644 --- a/core/src/components/item/test/basic/index.html +++ b/core/src/components/item/test/basic/index.html @@ -98,8 +98,9 @@

H4 Title Text

- PIN: - No Helper/Error - + - Helper and Error - + Helper Text Error Text - Helper Only - + Helper Text - Error Only - + Error Text - Both w/ Custom CSS - + Helper Text Error Text @@ -66,16 +61,14 @@ - Helper and Error (Fill Solid) - + Helper Text Error Text - Helper and Error (Fill Outline) - + Helper Text Error Text @@ -84,8 +77,7 @@ - Toggle Error - + Toggle Error diff --git a/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-ltr-Mobile-Firefox-linux.png index 6d1b1acb875..b7f3579a707 100644 Binary files a/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-rtl-Mobile-Firefox-linux.png index a290ec89332..19453840539 100644 Binary files a/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/counter/item.e2e.ts-snapshots/item-counter-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Chrome-linux.png index d5057c87b3c..3d20782dc97 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Firefox-linux.png index 32cd77abd23..39274d225ba 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Safari-linux.png index 3f0b0328599..148333df747 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Chrome-linux.png index 43487eba48e..0ff00ef8e00 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Firefox-linux.png index 6f4e7e9b987..7c67ea071d0 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Safari-linux.png index d8d0caf5c5e..4f35e512fc5 100644 Binary files a/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/highlight/item.e2e.ts-snapshots/item-highlight-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/index.html b/core/src/components/item/test/inputs/index.html index 5ebe75aea7b..ac621ee8b51 100644 --- a/core/src/components/item/test/inputs/index.html +++ b/core/src/components/item/test/inputs/index.html @@ -39,18 +39,6 @@ Set "undefined" values - - Labels: Default - - - Labels: Floating - - - Labels: Stacked - - - Labels: Fixed -
@@ -60,28 +48,23 @@
- Input - + - Textarea - + - Toggle - + Toggle - Checkbox - + Checkbox - Select - + 1 2 3 @@ -93,8 +76,7 @@ - Range - + @@ -147,28 +129,6 @@ toggle.checked = checkbox.checked = false; } - function setLabelDefault() { - setLabelPosition(undefined); - } - - function setLabelFixed() { - setLabelPosition('fixed'); - } - - function setLabelFloating() { - setLabelPosition('floating'); - } - - function setLabelStacked() { - setLabelPosition('stacked'); - } - - function setLabelPosition(position) { - Array.from(document.querySelectorAll('form ion-list ion-label')).forEach( - (label) => (label.position = position) - ); - } - function getFormControls() { return formControlIds.reduce((acc, id) => { acc[id] = document.querySelector(`#${id}`); diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Chrome-linux.png index 16fde476d93..5e648162f20 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Firefox-linux.png index f379936b303..0e5120ef3ac 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Safari-linux.png index e536ff2645e..b2eb1638087 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Chrome-linux.png index c9d778fa327..6f30797958c 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Firefox-linux.png index 44175208bd9..83873459170 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Safari-linux.png index 574268ee6bc..a19e84eca21 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-disabled-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Chrome-linux.png index 2c7ff81cf5d..81ca424c026 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Firefox-linux.png index 880e3366967..c207a965ea6 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Safari-linux.png index f0761cbf214..395057523db 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Chrome-linux.png index 580f45a23bf..2556440e693 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Firefox-linux.png index 473ed40edd9..255d73002b2 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Safari-linux.png index 2f1a7f6454d..4c8b6eee54f 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Chrome-linux.png index a7d5fd00258..1dd3849bdf4 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Firefox-linux.png index 96d4a99df38..cfa42148a7b 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Safari-linux.png index 71421992417..4984cd298ea 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Chrome-linux.png index 5035d0f130b..164c214e50d 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Firefox-linux.png index a48d9a81976..dccd74ec01d 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Safari-linux.png index 0859a1f2506..d50fce39762 100644 Binary files a/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/inputs/item.e2e.ts-snapshots/item-inputs-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/item.spec.tsx b/core/src/components/item/test/item.spec.tsx new file mode 100644 index 00000000000..750930ef828 --- /dev/null +++ b/core/src/components/item/test/item.spec.tsx @@ -0,0 +1,22 @@ +import { h } from '@stencil/core'; +import { newSpecPage } from '@stencil/core/testing'; + +import { Item } from '../item'; + +describe('item', () => { + it('should change focusable option after switching button option status', async () => { + const page = await newSpecPage({ + components: [Item], + template: () => , + }); + + const item = page.body.querySelector('ion-item')!; + // Change button attribute to true + item.setAttribute('button', 'true'); + + await page.waitForChanges(); + + // Check if it has the expected class that gives the highlight style to .item-highlight element + expect(item).toHaveClass('ion-focusable'); + }); +}); diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Chrome-linux.png index f9ddb05ee67..988ee7fe52c 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Firefox-linux.png index a9c60045cff..13a99e61f97 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Safari-linux.png index d2328b380e9..4aac1c769e3 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Chrome-linux.png index 27520c19562..04adf12a468 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Firefox-linux.png index 471b7945fde..2051a27ef81 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Safari-linux.png index 84422caf0ec..0ac689d7819 100644 Binary files a/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/legacy/fill/item.e2e.ts-snapshots/item-fill-diff-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Chrome-linux.png index 934f70a4feb..9afb2ddc75b 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Firefox-linux.png index f3b4bf8f2f0..e4dd9f7f2de 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Safari-linux.png index a818a230643..560b5c3c423 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Chrome-linux.png index 4e320ee56b6..e63f4f98e46 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Firefox-linux.png index 23d155a681a..410cbe9f1c5 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Safari-linux.png index 28d35df5eaf..c29b9e50873 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Chrome-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Chrome-linux.png index ffb4b29d4ca..3c34d8be786 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Firefox-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Firefox-linux.png index 34f656388a8..6b9aa6884eb 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Safari-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Safari-linux.png index 9fe5e0465d0..63e7e5d1344 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Safari-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Chrome-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Chrome-linux.png index 01393f7725c..8a7f9c7e57e 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Firefox-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Firefox-linux.png index 3c2f7449c23..8bb202e4bf3 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Safari-linux.png b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Safari-linux.png index 37b1645f758..20468828f59 100644 Binary files a/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Safari-linux.png and b/core/src/components/item/test/slotted-inputs/item.e2e.ts-snapshots/item-slotted-inputs-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/a11y/label.e2e.ts b/core/src/components/label/test/a11y/label.e2e.ts index ce84ec06451..00485eb4d3f 100644 --- a/core/src/components/label/test/a11y/label.e2e.ts +++ b/core/src/components/label/test/a11y/label.e2e.ts @@ -82,3 +82,34 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { }); }); }); + +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { + test.describe(title('label: text wrapping in item'), () => { + test('long text should not cause label to expand infinitely', async ({ page }) => { + await page.setContent( + ` + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +
+
+
+ `, + config + ); + + const item = page.locator('ion-item'); + + await expect(item).toHaveScreenshot(screenshot(`label-item-wrap`)); + }); + }); +}); diff --git a/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..d8e598922b9 Binary files /dev/null and b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..f4a4fa89066 Binary files /dev/null and b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Safari-linux.png b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..87856ea01de Binary files /dev/null and b/core/src/components/label/test/a11y/label.e2e.ts-snapshots/label-item-wrap-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/index.html b/core/src/components/label/test/basic/index.html index 96fba62ee2a..ed1a9cca2f7 100644 --- a/core/src/components/label/test/basic/index.html +++ b/core/src/components/label/test/basic/index.html @@ -41,58 +41,45 @@ Default - Tertiary - Custom - Wrap label this label just goes on and on and on - Fixed - Floating - Floating: Success - Stacked - Stacked: Danger - (Item: Tertiary) Floating - (Item: Primary) Stacked - (Item: Tertiary) Floating: Success - (Item: Primary) Stacked: Danger - diff --git a/core/src/components/label/test/basic/label.e2e.ts b/core/src/components/label/test/basic/label.e2e.ts index ca94e838c27..1deda110544 100644 --- a/core/src/components/label/test/basic/label.e2e.ts +++ b/core/src/components/label/test/basic/label.e2e.ts @@ -34,7 +34,7 @@ configs().forEach(({ title, screenshot, config }) => { ` My Label - + `, config @@ -49,7 +49,7 @@ configs().forEach(({ title, screenshot, config }) => { ` My Label - + `, config diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Chrome-linux.png index edb9248e279..6a9650d0462 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Firefox-linux.png index 5acaeaa2076..045042d578b 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Safari-linux.png index cadad3801b1..6b7c624c4fc 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Chrome-linux.png index cb646a9425f..a0685d23f35 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Firefox-linux.png index 6b487599b38..93fbaba3681 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Safari-linux.png index 0d2a55d37ba..9ec079e6026 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Chrome-linux.png index 43f5ec6a9dc..3ef7959c875 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Firefox-linux.png index d9f5cd86f54..d7c0b7364cf 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Safari-linux.png index 13a83f03ab2..a98ea9c069d 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Chrome-linux.png index cc31a396838..cbdd36e0661 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Firefox-linux.png index dd1a12c946c..efffe566ad6 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Safari-linux.png index 04e05033867..bdc5dcbc8eb 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-floating-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Chrome-linux.png index c85e47860a3..749245a24aa 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Firefox-linux.png index f5bec426b1c..1c407de0a68 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Safari-linux.png index db396488df9..27f590db1cc 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Chrome-linux.png index cd189d2e9e8..3fc6a3b9351 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Firefox-linux.png index dbe831dca44..220043b818e 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Safari-linux.png index d279b6a4a22..9deda169e20 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Chrome-linux.png index 367a766a130..fd1496a11fa 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Firefox-linux.png index ec3a667863b..8d847d79d82 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Safari-linux.png index 81c44f7edcc..f473cdbe523 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Chrome-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Chrome-linux.png index 9213ffad0b6..885612a082e 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Firefox-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Firefox-linux.png index 659828a08be..24c74da1c27 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Safari-linux.png b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Safari-linux.png index 2ecff7a6358..51aaf2c28e3 100644 Binary files a/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Safari-linux.png and b/core/src/components/label/test/basic/label.e2e.ts-snapshots/label-stacked-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/list/list.md.scss b/core/src/components/list/list.md.scss index 8b408f781d6..62a28273cc8 100644 --- a/core/src/components/list/list.md.scss +++ b/core/src/components/list/list.md.scss @@ -23,25 +23,9 @@ @include border-radius($list-inset-md-border-radius); } -/** - * These selectors ensure the first item in the list - * has the correct radius. - * We need to consider the following scenarios: - 1. The first item in a list as long as it is not the only item. - 2. The item in the first item-sliding in a list. - * Note that we do not select "ion-item-sliding ion-item:first-of-type" - * because that will cause the borders to disappear on - * items in an item-sliding when the item is the first - * element in the item-sliding container. - */ -.list-md.list-inset ion-item:not(:only-of-type):first-of-type, -.list-md.list-inset ion-item-sliding:first-of-type ion-item { - --border-radius: #{$list-inset-md-border-radius $list-inset-md-border-radius 0 0}; -} - /** * These selectors ensure the last item in the list - * has the correct radius and border. + * has the correct border. * We need to consider the following scenarios: 1. The last item in a list as long as it is not the only item. 2. The item in the last item-sliding in a list. @@ -52,21 +36,17 @@ */ .list-md.list-inset ion-item:not(:only-of-type):last-of-type, .list-md.list-inset ion-item-sliding:last-of-type ion-item { - --border-radius: #{0 0 $list-inset-md-border-radius $list-inset-md-border-radius}; --border-width: 0; --inner-border-width: 0; } /** - * The only item in a list should have a border radius - * on all corners. * We target :only-child instead of :only-of-type * otherwise borders will disappear on items inside of * ion-item-sliding because the item will be the only * one of its type inside of the ion-item-sliding group. */ .list-md.list-inset ion-item:only-child { - --border-radius: #{$list-inset-md-border-radius}; --border-width: 0; --inner-border-width: 0; } diff --git a/core/src/components/menu/menu.scss b/core/src/components/menu/menu.scss index 83536250d0a..54cc316d6ab 100644 --- a/core/src/components/menu/menu.scss +++ b/core/src/components/menu/menu.scss @@ -190,13 +190,12 @@ ion-backdrop { width: auto; - /* stylelint-disable declaration-no-important */ - transform: none !important; + transform: none; - box-shadow: none !important; + box-shadow: none; } :host(.menu-pane-visible) ion-backdrop { + /* stylelint-disable-next-line declaration-no-important */ display: hidden !important; - /* stylelint-enable declaration-no-important */ } diff --git a/core/src/components/menu/menu.tsx b/core/src/components/menu/menu.tsx index a3574e1a2b2..437c5363453 100644 --- a/core/src/components/menu/menu.tsx +++ b/core/src/components/menu/menu.tsx @@ -191,7 +191,7 @@ export class Menu implements ComponentInterface, MenuI { async connectedCallback() { // TODO: connectedCallback is fired in CE build // before WC is defined. This needs to be fixed in Stencil. - if (typeof (customElements as any) !== 'undefined' && (customElements as any) != null) { + if (typeof customElements !== 'undefined' && customElements != null) { await customElements.whenDefined('ion-menu'); } diff --git a/core/src/components/menu/test/custom/menu.e2e.ts b/core/src/components/menu/test/custom/menu.e2e.ts new file mode 100644 index 00000000000..9ed734353ca --- /dev/null +++ b/core/src/components/menu/test/custom/menu.e2e.ts @@ -0,0 +1,65 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * This behavior does not vary across directions. + */ +configs({ directions: ['ltr'] }).forEach(({ title, config, screenshot }) => { + test.describe(title('menu: custom'), () => { + test('should allow styling the menu box shadow when inside a split pane', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/21530', + }); + + await page.setContent( + ` + + + + + + + + Menu + + + + Menu Content + + +
+ + + + + + + Content + + + + Main Content +
+
+
+ `, + config + ); + + const app = page.locator('ion-app'); + + await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`)); + }); + }); +}); diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..4cddf8de6b5 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..3cf4b00487b Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..1a166b29955 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..dec3119afed Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..98ec5e8c89f Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..25d2fd8e0b0 Binary files /dev/null and b/core/src/components/menu/test/custom/menu.e2e.ts-snapshots/menu-custom-split-pane-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index ef6114b18ba..bae8648d765 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -264,6 +264,9 @@ export class Modal implements ComponentInterface, OverlayInterface { * * If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. * If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss. + * + * See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this + * if you need to access `this` from within the callback. */ @Prop() canDismiss: boolean | ((data?: any, role?: string) => Promise) = true; diff --git a/core/src/components/modal/test/sheet/index.html b/core/src/components/modal/test/sheet/index.html index 8fed5eac09a..2a7eeb022ef 100644 --- a/core/src/components/modal/test/sheet/index.html +++ b/core/src/components/modal/test/sheet/index.html @@ -85,10 +85,7 @@ - - Input outside modal - - + Present Sheet Modal await ionModalDidPresent.next(); - const input = page.locator('#root-input input').first(); + const input = page.locator('#root-input').first(); await input.click(); await expect(input).toBeFocused(); }); diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Chrome-linux.png index d87c4c3893f..699dd3af83c 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Firefox-linux.png index 22afed2dab4..02ddc5ffef9 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Safari-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Safari-linux.png index 7d77a2c9d0b..8549847278e 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Chrome-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Chrome-linux.png index cafd8ae3f2d..a8ef5a35df7 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Firefox-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Firefox-linux.png index 5b7ab097e3b..c26490f27bd 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Safari-linux.png b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Safari-linux.png index ab1a390d428..4ac26115828 100644 Binary files a/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Safari-linux.png and b/core/src/components/modal/test/sheet/modal.e2e.ts-snapshots/modal-sheet-present-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/modal/test/spec/index.html b/core/src/components/modal/test/spec/index.html index d97fdd1de41..3060c5e0125 100644 --- a/core/src/components/modal/test/spec/index.html +++ b/core/src/components/modal/test/spec/index.html @@ -60,8 +60,7 @@ - Use Custom Animation - + Use Custom Animation diff --git a/core/src/components/modal/test/standalone/modal.e2e.ts b/core/src/components/modal/test/standalone/modal.e2e.ts index eaaa7a824f0..d422f4451e5 100644 --- a/core/src/components/modal/test/standalone/modal.e2e.ts +++ b/core/src/components/modal/test/standalone/modal.e2e.ts @@ -15,7 +15,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await ionModalDidDismiss.next(); - await page.waitForSelector('ion-modal', { state: 'detached' }); + await page.locator('ion-modal').waitFor({ state: 'detached' }); }); }); }); diff --git a/core/src/components/note/test/a11y/note.e2e.ts b/core/src/components/note/test/a11y/note.e2e.ts index bf7839a7632..f3bbb76faab 100644 --- a/core/src/components/note/test/a11y/note.e2e.ts +++ b/core/src/components/note/test/a11y/note.e2e.ts @@ -72,33 +72,33 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { - Really really long note + 123 Label Label - Really really long note + 123 - Note + 123 Really really long label Really really long label - Note + 123 - Really really long note + 123 Really really long label Really really long label - Really really long note + 123 `, diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Chrome-linux.png index a5858136096..34ac4080910 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Firefox-linux.png index 4273df06f3c..154ee519c78 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Safari-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Safari-linux.png index 7e665c4e970..5ffb775f75f 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Chrome-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Chrome-linux.png index d2f8031710d..9c2ea22a522 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Firefox-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Firefox-linux.png index 3625d21a1e7..69f53a28ada 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Safari-linux.png b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Safari-linux.png index 768ac8a47a6..9581c8d5505 100644 Binary files a/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Safari-linux.png and b/core/src/components/note/test/a11y/note.e2e.ts-snapshots/note-wrapping-label-scale-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/picker-internal/picker-internal.tsx b/core/src/components/picker-internal/picker-internal.tsx index af696d21b53..be575405673 100644 --- a/core/src/components/picker-internal/picker-internal.tsx +++ b/core/src/components/picker-internal/picker-internal.tsx @@ -265,6 +265,7 @@ export class PickerInternal implements ComponentInterface { inputEl.focus(); } else { + // TODO FW-5900 Use keydown instead el.addEventListener('keypress', this.onKeyPress); this.destroyKeypressListener = () => { el.removeEventListener('keypress', this.onKeyPress); @@ -550,6 +551,21 @@ export class PickerInternal implements ComponentInterface { tabindex={-1} inputmode="numeric" type="number" + onKeyDown={(ev: KeyboardEvent) => { + /** + * The "Enter" key represents + * the user submitting their time + * selection, so we should blur the + * input (and therefore close the keyboard) + * + * Updating the picker's state to no longer + * be in input mode is handled in the onBlur + * callback below. + */ + if (ev.key === 'Enter') { + this.inputEl?.blur(); + } + }} ref={(el) => (this.inputEl = el)} onInput={() => this.onInputChange()} onBlur={() => this.exitInputMode()} diff --git a/core/src/components/picker-internal/test/keyboard-entry/picker-internal.e2e.ts b/core/src/components/picker-internal/test/keyboard-entry/picker-internal.e2e.ts index e9b0239fa68..d69fac2ad9c 100644 --- a/core/src/components/picker-internal/test/keyboard-entry/picker-internal.e2e.ts +++ b/core/src/components/picker-internal/test/keyboard-entry/picker-internal.e2e.ts @@ -133,5 +133,44 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await expect(ionChange).toHaveReceivedEventDetail({ text: '00', value: 12 }); await expect(column).toHaveJSProperty('value', 12); }); + test('pressing Enter should dismiss the keyboard', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/28325', + }); + await page.setContent( + ` + + + + + + `, + config + ); + + const column = page.locator('ion-picker-column-internal'); + await column.click(); + + const input = page.locator('ion-picker-internal input'); + await expect(input).toBeFocused(); + + // pressing Enter should blur the input and therefore close the keyboard + await page.keyboard.press('Enter'); + + await expect(input).not.toBeFocused(); + }); }); }); diff --git a/core/src/components/popover/popover.scss b/core/src/components/popover/popover.scss index 1568503adfa..4181df6e698 100644 --- a/core/src/components/popover/popover.scss +++ b/core/src/components/popover/popover.scss @@ -93,7 +93,7 @@ z-index: $z-index-overlay-wrapper; } -.popover-viewport { +::slotted(.popover-viewport) { --ion-safe-area-top: 0px; --ion-safe-area-right: 0px; --ion-safe-area-bottom: 0px; diff --git a/core/src/components/popover/test/basic/index.html b/core/src/components/popover/test/basic/index.html index 9ef6ba840c6..058aa69e08f 100644 --- a/core/src/components/popover/test/basic/index.html +++ b/core/src/components/popover/test/basic/index.html @@ -212,7 +212,7 @@

Translucent Popover

connectedCallback() { this.innerHTML = ` - + `; diff --git a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-header-popover-md-ltr-Mobile-Safari-linux.png b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-header-popover-md-ltr-Mobile-Safari-linux.png index 9e59e969659..d44cb67380d 100644 Binary files a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-header-popover-md-ltr-Mobile-Safari-linux.png and b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-header-popover-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Chrome-linux.png index 363b4a2ca67..fa6d75156a1 100644 Binary files a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Firefox-linux.png index dc664e06f2a..37464ec432d 100644 Binary files a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Safari-linux.png b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Safari-linux.png index 39522779826..4985d8e90ce 100644 Binary files a/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/popover/test/basic/popover.e2e.ts-snapshots/popover-basic-translucent-header-popover-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/progress-bar/test/buffer/index.html b/core/src/components/progress-bar/test/buffer/index.html index 9bd10190557..fd1cdfc1956 100644 --- a/core/src/components/progress-bar/test/buffer/index.html +++ b/core/src/components/progress-bar/test/buffer/index.html @@ -60,7 +60,7 @@ - + 0 100 diff --git a/core/src/components/progress-bar/test/determinate/index.html b/core/src/components/progress-bar/test/determinate/index.html index 2ffda64dc34..7b1d9c6b40a 100644 --- a/core/src/components/progress-bar/test/determinate/index.html +++ b/core/src/components/progress-bar/test/determinate/index.html @@ -69,7 +69,7 @@ - + 0 100 diff --git a/core/src/components/radio-group/radio-group.tsx b/core/src/components/radio-group/radio-group.tsx index 3e8a11c39b8..dce1c626169 100644 --- a/core/src/components/radio-group/radio-group.tsx +++ b/core/src/components/radio-group/radio-group.tsx @@ -130,7 +130,15 @@ export class RadioGroup implements ComponentInterface { * using the `name` attribute. */ const selectedRadio = ev.target && (ev.target as HTMLElement).closest('ion-radio'); - if (selectedRadio && selectedRadio.disabled === false) { + /** + * Our current disabled prop definition causes Stencil to mark it + * as optional. While this is not desired, fixing this behavior + * in Stencil is a significant breaking change, so this effort is + * being de-risked in STENCIL-917. Until then, we compromise + * here by checking for falsy `disabled` values instead of strictly + * checking `disabled === false`. + */ + if (selectedRadio && !selectedRadio.disabled) { const currentValue = this.value; const newValue = selectedRadio.value; if (newValue !== currentValue) { diff --git a/core/src/components/radio-group/test/radio-group-events.e2e.ts b/core/src/components/radio-group/test/radio-group-events.e2e.ts index 12fb3243694..09deb2e7dbd 100644 --- a/core/src/components/radio-group/test/radio-group-events.e2e.ts +++ b/core/src/components/radio-group/test/radio-group-events.e2e.ts @@ -7,9 +7,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - - + + + `, config @@ -29,9 +29,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - - + + + `, config @@ -51,9 +51,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - - + + + `, config @@ -72,9 +72,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - - + + + `, config @@ -94,9 +94,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( ` - - - + + + `, config diff --git a/core/src/components/radio/test/a11y/radio.e2e.ts b/core/src/components/radio/test/a11y/radio.e2e.ts index eaa52c548c3..e5a375bc966 100644 --- a/core/src/components/radio/test/a11y/radio.e2e.ts +++ b/core/src/components/radio/test/a11y/radio.e2e.ts @@ -15,9 +15,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); }); - // TODO(FW-5715): re-enable test - test.skip(title('radio: keyboard navigation'), () => { - test.beforeEach(async ({ page }) => { + test.describe(title('radio: keyboard navigation'), () => { + test.beforeEach(async ({ page, browserName }) => { await page.setContent( ` @@ -59,6 +58,21 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => `, config ); + + if (browserName === 'webkit') { + const radio = page.locator('#first-group ion-radio').first(); + /** + * Sometimes Safari does not focus the first radio. + * This is a workaround to ensure the first radio is focused. + * + * Wait for the first radio to be rendered before tabbing. + * This is necessary because the first radio may not be rendered + * when the page first loads. + * + * This would cause the first radio to be skipped when tabbing. + */ + await radio.waitFor(); + } }); test('tabbing should switch between radio groups', async ({ page, pageUtils }) => { diff --git a/core/src/components/radio/test/legacy/a11y/radio.e2e.ts b/core/src/components/radio/test/legacy/a11y/radio.e2e.ts index af6ccbfeb2b..98ccc80a46c 100644 --- a/core/src/components/radio/test/legacy/a11y/radio.e2e.ts +++ b/core/src/components/radio/test/legacy/a11y/radio.e2e.ts @@ -6,9 +6,23 @@ import { configs, test } from '@utils/test/playwright'; */ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('radio: a11y'), () => { - test.beforeEach(async ({ page, skip }) => { - skip.browser('webkit', 'Tabbing is flaky in Safari'); + test.beforeEach(async ({ page, browserName }) => { await page.goto(`/src/components/radio/test/legacy/a11y`, config); + + if (browserName === 'webkit') { + const radio = page.locator('#first-group ion-radio').first(); + /** + * Sometimes Safari does not focus the first radio. + * This is a workaround to ensure the first radio is focused. + * + * Wait for the first radio to be rendered before tabbing. + * This is necessary because the first radio may not be rendered + * when the page first loads. + * + * This would cause the first radio to be skipped when tabbing. + */ + await radio.waitFor(); + } }); test('tabbing should switch between radio groups', async ({ page, pageUtils }) => { const firstGroupRadios = page.locator('#first-group ion-radio'); diff --git a/core/src/components/range/range.tsx b/core/src/components/range/range.tsx index 5b017cf464a..1df4ed9c3f5 100644 --- a/core/src/components/range/range.tsx +++ b/core/src/components/range/range.tsx @@ -141,6 +141,9 @@ export class Range implements ComponentInterface { /** * A callback used to format the pin text. * By default the pin text is set to `Math.round(value)`. + * + * See https://ionicframework.com/docs/troubleshooting/runtime#accessing-this + * if you need to access `this` from within the callback. */ @Prop() pinFormatter: PinFormatter = (value: number): number => Math.round(value); diff --git a/core/src/components/range/test/label/range.e2e.ts b/core/src/components/range/test/label/range.e2e.ts index 409f4a32584..c8925d35a81 100644 --- a/core/src/components/range/test/label/range.e2e.ts +++ b/core/src/components/range/test/label/range.e2e.ts @@ -7,7 +7,7 @@ configs().forEach(({ title, screenshot, config }) => { test('should render a range with no visible label', async ({ page }) => { await page.setContent( ` - + `, config ); @@ -80,7 +80,7 @@ configs().forEach(({ title, screenshot, config }) => { test('should render a range with no visible label', async ({ page }) => { await page.setContent( ` - + diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Chrome-linux.png index a8bd6b11c28..d8a13f78bd5 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Firefox-linux.png index 20b52f6e9ac..5d35bc38507 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Safari-linux.png index bddfe5df4d4..684e7423632 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Chrome-linux.png index 06db2a4e7f9..af420833d1d 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Firefox-linux.png index dc8c9481d0c..f6f965e45f1 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Safari-linux.png index dea69f8e08e..7bdc04cbb54 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Chrome-linux.png index 85d942ab497..4b6e8680328 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Firefox-linux.png index 7b7895e58a3..ee190b81449 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Safari-linux.png index a90b592471a..cbf9560c2f3 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Chrome-linux.png index f0bd79fc400..76e06285b38 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Firefox-linux.png index cc3be5f0470..96af4347df1 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Safari-linux.png index 5c72694bf06..ff22d0e6fa6 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-items-no-label-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Chrome-linux.png index a5cb69a9bd1..08b3147a598 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Firefox-linux.png index 57d20c5029b..441056c219c 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Safari-linux.png index c19eb0ce6a8..7a9bb8cdcc3 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Chrome-linux.png index 16c3d3cd67e..396aeafc860 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Firefox-linux.png index e2362a244b5..29bcaab3921 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Safari-linux.png index a79e1039543..2dc0e0b2909 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Chrome-linux.png index 424bba0f1b9..19109e87c7e 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Firefox-linux.png index 146f76f1480..d1478b33a2d 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Safari-linux.png index 1e489e8489c..e522577c7e0 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Chrome-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Chrome-linux.png index 911c53b5502..41640c2beaf 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Firefox-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Firefox-linux.png index 57b7484ee4a..8a26e9af16d 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Safari-linux.png b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Safari-linux.png index 9371b3a85cf..c03f792fea0 100644 Binary files a/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Safari-linux.png and b/core/src/components/range/test/label/range.e2e.ts-snapshots/range-no-items-no-label-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/range/test/range-events.e2e.ts b/core/src/components/range/test/range-events.e2e.ts index 3eeba5437b0..bc019628e12 100644 --- a/core/src/components/range/test/range-events.e2e.ts +++ b/core/src/components/range/test/range-events.e2e.ts @@ -20,7 +20,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await page.setContent( `
- +
`, config @@ -52,7 +52,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); test('should emit start/end events, keyboard', async ({ page }) => { - await page.setContent(``, config); + await page.setContent(``, config); const rangeStart = await page.spyOnEvent('ionKnobMoveStart'); const rangeEnd = await page.spyOnEvent('ionKnobMoveEnd'); diff --git a/core/src/components/refresher-content/refresher-content.tsx b/core/src/components/refresher-content/refresher-content.tsx index 35b6554a77d..df94479c9d1 100644 --- a/core/src/components/refresher-content/refresher-content.tsx +++ b/core/src/components/refresher-content/refresher-content.tsx @@ -1,13 +1,13 @@ import type { ComponentInterface } from '@stencil/core'; import { Component, Element, Host, Prop, h } from '@stencil/core'; import { ENABLE_HTML_CONTENT_DEFAULT } from '@utils/config'; -import { isPlatform } from '@utils/platform'; import { sanitizeDOMString } from '@utils/sanitization'; import { arrowDown, caretBackSharp } from 'ionicons/icons'; import { config } from '../../global/config'; import { getIonMode } from '../../global/ionic-global'; import type { IonicSafeString } from '../../utils/sanitization'; +import { supportsRubberBandScrolling } from '../refresher/refresher.utils'; import type { SpinnerTypes } from '../spinner/spinner-configs'; import { SPINNERS } from '../spinner/spinner-configs'; @@ -63,11 +63,17 @@ export class RefresherContent implements ComponentInterface { componentWillLoad() { if (this.pullingIcon === undefined) { + /** + * The native iOS refresher uses a spinner instead of + * an icon, so we need to see if this device supports + * the native iOS refresher. + */ + const hasRubberBandScrolling = supportsRubberBandScrolling(); const mode = getIonMode(this); - const overflowRefresher = (this.el.style as any).webkitOverflowScrolling !== undefined ? 'lines' : arrowDown; + const overflowRefresher = hasRubberBandScrolling ? 'lines' : arrowDown; this.pullingIcon = config.get( 'refreshingIcon', - mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular' + mode === 'ios' && hasRubberBandScrolling ? config.get('spinner', overflowRefresher) : 'circular' ); } if (this.refreshingSpinner === undefined) { diff --git a/core/src/components/refresher/refresher.tsx b/core/src/components/refresher/refresher.tsx index f762ffe7ac2..8f234f3eb8e 100644 --- a/core/src/components/refresher/refresher.tsx +++ b/core/src/components/refresher/refresher.tsx @@ -25,6 +25,9 @@ import { translateElement, } from './refresher.utils'; +/** + * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. + */ @Component({ tag: 'ion-refresher', styleUrls: { diff --git a/core/src/components/refresher/refresher.utils.ts b/core/src/components/refresher/refresher.utils.ts index 8ae86de2581..4becab356d0 100644 --- a/core/src/components/refresher/refresher.utils.ts +++ b/core/src/components/refresher/refresher.utils.ts @@ -1,7 +1,6 @@ import { writeTask } from '@stencil/core'; import { createAnimation } from '@utils/animation/animation'; import { clamp, componentOnReady, transitionEndAsync } from '@utils/helpers'; -import { isPlatform } from '@utils/platform'; // MD Native Refresher // ----------------------------- @@ -195,6 +194,25 @@ export const translateElement = (el?: HTMLElement, value?: string, duration = 20 // Utils // ----------------------------- +/** + * In order to use the native iOS refresher the device must support rubber band scrolling. + * As part of this, we need to exclude Desktop Safari because it has a slightly different rubber band effect that is not compatible with the native refresher in Ionic. + * + * We also need to be careful not to include devices that spoof their user agent. + * For example, when using iOS emulation in Chrome the user agent will be spoofed such that + * navigator.maxTouchPointer > 0. To work around this, + * we check to see if the apple-pay-logo is supported as a named image which is only + * true on Apple devices. + * + * We previously checked referencEl.style.webkitOverflowScrolling to explicitly check + * for rubber band support. However, this property was removed on iPadOS and it's possible + * that this will be removed on iOS in the future too. + * + */ +export const supportsRubberBandScrolling = () => { + return navigator.maxTouchPoints > 0 && CSS.supports('background: -webkit-named-image(apple-pay-logo-black)'); +}; + export const shouldUseNativeRefresher = async (referenceEl: HTMLIonRefresherElement, mode: string) => { const refresherContent = referenceEl.querySelector('ion-refresher-content'); if (!refresherContent) { @@ -209,15 +227,6 @@ export const shouldUseNativeRefresher = async (referenceEl: HTMLIonRefresherElem return ( pullingSpinner !== null && refreshingSpinner !== null && - /** - * We use webkitOverflowScrolling for feature detection with rubber band scrolling - * on iOS. When doing referenceEl.style, webkitOverflowScrolling is undefined on non-iOS platforms. - * However, it will be the empty string on iOS. - * Note that we do not use getPropertyValue (and thus need to cast as any) because calling - * getPropertyValue('-webkit-overflow-scrolling') will return the empty string if it is not - * set on the element, even if the platform does not support that. - */ - ((mode === 'ios' && isPlatform('mobile') && (referenceEl.style as any).webkitOverflowScrolling !== undefined) || - mode === 'md') + ((mode === 'ios' && supportsRubberBandScrolling()) || mode === 'md') ); }; diff --git a/core/src/components/refresher/test/test.utils.ts b/core/src/components/refresher/test/test.utils.ts index 7454a889950..9bc15a7f0d2 100644 --- a/core/src/components/refresher/test/test.utils.ts +++ b/core/src/components/refresher/test/test.utils.ts @@ -14,7 +14,7 @@ import { dragElementByYAxis } from '@utils/test/playwright'; const pullToRefresh = async (page: E2EPage, selector = 'body') => { const target = page.locator(selector); - await page.waitForSelector('ion-refresher.hydrated', { state: 'attached' }); + await page.locator('ion-refresher.hydrated').waitFor({ state: 'attached' }); const ev = await page.spyOnEvent('ionRefreshComplete'); diff --git a/core/src/components/reorder-group/test/basic/index.html b/core/src/components/reorder-group/test/basic/index.html index bf44ef490ad..55e034c82ab 100644 --- a/core/src/components/reorder-group/test/basic/index.html +++ b/core/src/components/reorder-group/test/basic/index.html @@ -99,15 +99,13 @@ - Item 11 (the whole item can be dragged) - + Item 11 (the whole item can be dragged) - Item 12 (the whole item can be dragged) - + Item 12 (the whole item can be dragged) diff --git a/core/src/components/ripple-effect/test/basic/ripple-effect.e2e.ts b/core/src/components/ripple-effect/test/basic/ripple-effect.e2e.ts index 5d128bdca1e..763db925d84 100644 --- a/core/src/components/ripple-effect/test/basic/ripple-effect.e2e.ts +++ b/core/src/components/ripple-effect/test/basic/ripple-effect.e2e.ts @@ -29,7 +29,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { } // Waits for the ripple effect to be added - await page.waitForSelector('.ion-activated'); + await page.locator('.ion-activated').waitFor(); await expect(el).toHaveClass(/ion-activated/); }); @@ -56,7 +56,7 @@ const verifyRippleEffect = async (page: E2EPage, config: E2EPageOptions, selecto await page.mouse.down(); } - await page.waitForSelector('.ion-activated'); + await page.locator('.ion-activated').waitFor(); await expect(el).toHaveClass(/ion-activated/); }; diff --git a/core/src/components/router/test/guards/index.html b/core/src/components/router/test/guards/index.html index 0ea2d5ea900..9e9d0a29335 100644 --- a/core/src/components/router/test/guards/index.html +++ b/core/src/components/router/test/guards/index.html @@ -113,18 +113,15 @@ - Allow Navigation - + Allow Navigation - Block Navigation - + Block Navigation - Redirect - + Redirect @@ -136,18 +133,15 @@ - Allow Navigation - + Allow Navigation - Block Navigation - + Block Navigation - Redirect - + Redirect diff --git a/core/src/components/segment/segment.tsx b/core/src/components/segment/segment.tsx index c015d7e617b..b3113c9de7a 100644 --- a/core/src/components/segment/segment.tsx +++ b/core/src/components/segment/segment.tsx @@ -140,6 +140,14 @@ export class Segment implements ComponentInterface { async componentDidLoad() { this.setCheckedClasses(); + /** + * If the value changes before watchers + * are setup, then the ionSelect watch callback + * will not fire. As a result, we manually + * fire this event when Select is loaded. + */ + this.ionSelect.emit({ value: this.value }); + /** * We need to wait for the buttons to all be rendered * before we can scroll. diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png index 4dec8e799a4..4641d8231b7 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png index be32b57e3ed..bc03433e804 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png index b69e95f4d0f..46117a21927 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png index a1a2a2e34e8..080118c5902 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-diff-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-ios-ltr-Mobile-Firefox-linux.png index 8bf02b52487..f1898900a8c 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-md-ltr-Mobile-Firefox-linux.png b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-md-ltr-Mobile-Firefox-linux.png index 93e0db8dd4e..be863624a12 100644 Binary files a/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/select-popover/test/basic/select-popover.e2e.ts-snapshots/select-popover-multiple-diff-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/select/select.ios.scss b/core/src/components/select/select.ios.scss index 0f8232a59d7..76c79ce72e0 100644 --- a/core/src/components/select/select.ios.scss +++ b/core/src/components/select/select.ios.scss @@ -38,3 +38,25 @@ :host(.select-disabled) { opacity: $select-ios-disabled-opacity; } + +// Start/End Slots +// ---------------------------------------------------------------- + +/** + * Slotted buttons have a lot of default padding that can + * cause them to look misaligned from other pieces such + * as the control's label, especially when using a clear + * fill. We also make them circular to ensure that non- + * clear buttons and the focus/hover state on clear ones + * don't look too crowded. + */ +::slotted(ion-button[slot="start"].button-has-icon-only), +::slotted(ion-button[slot="end"].button-has-icon-only) { + --border-radius: 50%; + --padding-start: 0; + --padding-end: 0; + --padding-top: 0; + --padding-bottom: 0; + + aspect-ratio: 1; +} diff --git a/core/src/components/select/select.md.scss b/core/src/components/select/select.md.scss index 47fccd28588..005c54e7f7c 100644 --- a/core/src/components/select/select.md.scss +++ b/core/src/components/select/select.md.scss @@ -155,3 +155,27 @@ :host(.select-disabled) { opacity: $select-md-disabled-opacity; } + +// Start/End Slots +// ---------------------------------------------------------------- + +/** + * Slotted buttons have a lot of default padding that can + * cause them to look misaligned from other pieces such + * as the control's label, especially when using a clear + * fill. We also make them circular to ensure that non- + * clear buttons and the focus/hover state on clear ones + * don't look too crowded. + */ +::slotted(ion-button[slot="start"].button-has-icon-only), +::slotted(ion-button[slot="end"].button-has-icon-only) { + --border-radius: 50%; + --padding-start: 8px; + --padding-end: 8px; + --padding-top: 8px; + --padding-bottom: 8px; + + aspect-ratio: 1; + + min-height: 40px; +} diff --git a/core/src/components/select/select.scss b/core/src/components/select/select.scss index f0aa860cedd..965f0a43206 100644 --- a/core/src/components/select/select.scss +++ b/core/src/components/select/select.scss @@ -592,8 +592,10 @@ button { ::slotted([slot="start"]) { margin-inline-end: $form-control-label-margin; + margin-inline-start: 0; } ::slotted([slot="end"]) { margin-inline-start: $form-control-label-margin; + margin-inline-end: 0; } diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index b4ed9aed43c..9fe26349bb1 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -776,8 +776,27 @@ export class Select implements ComponentInterface { * We ensure the target isn't this element in case the select is slotted * in, for example, an item. This would prevent the select from ever * being opened since the element itself has slot="start"/"end". + * + * Clicking a slotted element also causes a click + * on the
', -} - const BasePage = { template: '', components: { IonPage }, @@ -40,7 +35,7 @@ describe('useIonRouter', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -85,7 +80,7 @@ describe('useIonRouter', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -137,7 +132,7 @@ describe('useIonRouter', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -181,7 +176,7 @@ describe('useIonRouter', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -229,7 +224,7 @@ describe('useIonRouter', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } diff --git a/packages/vue/test/base/tests/unit/lifecycle.spec.ts b/packages/vue/test/base/tests/unit/lifecycle.spec.ts index f82106ccbe8..3c1996d5e74 100644 --- a/packages/vue/test/base/tests/unit/lifecycle.spec.ts +++ b/packages/vue/test/base/tests/unit/lifecycle.spec.ts @@ -1,15 +1,10 @@ import { mount } from '@vue/test-utils'; import { describe, expect, it, vi } from 'vitest'; import { createRouter, createWebHistory } from '@ionic/vue-router'; -import { IonicVue, IonApp, IonRouterOutlet, IonTabs, IonPage } from '@ionic/vue'; +import { IonicVue, IonRouterOutlet, IonTabs, IonPage } from '@ionic/vue'; import { defineComponent } from 'vue'; import { waitForRouter } from './utils'; -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} - const BasePage = { template: '', components: { IonPage }, @@ -54,7 +49,7 @@ describe('Lifecycle Events', () => { // Initial render router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -108,7 +103,7 @@ describe('Lifecycle Events', () => { template: ` - + `, @@ -148,7 +143,7 @@ describe('Lifecycle Events', () => { // Initial render router.push('/tab1'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } diff --git a/packages/vue/test/base/tests/unit/page.spec.ts b/packages/vue/test/base/tests/unit/page.spec.ts index cd8917c30bd..4fb0e985f25 100644 --- a/packages/vue/test/base/tests/unit/page.spec.ts +++ b/packages/vue/test/base/tests/unit/page.spec.ts @@ -1,12 +1,7 @@ import { mount } from '@vue/test-utils'; import { describe, expect, it } from 'vitest'; import { createRouter, createWebHistory } from '@ionic/vue-router'; -import { IonicVue, IonApp, IonRouterOutlet, IonPage } from '@ionic/vue'; - -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} +import { IonicVue, IonRouterOutlet, IonPage } from '@ionic/vue'; describe('IonPage', () => { it('should add ion-page class', async () => { @@ -25,7 +20,7 @@ describe('IonPage', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -50,7 +45,7 @@ describe('IonPage', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } diff --git a/packages/vue/test/base/tests/unit/router-outlet.spec.ts b/packages/vue/test/base/tests/unit/router-outlet.spec.ts index 89ee04bc559..f25490c2a21 100644 --- a/packages/vue/test/base/tests/unit/router-outlet.spec.ts +++ b/packages/vue/test/base/tests/unit/router-outlet.spec.ts @@ -3,22 +3,14 @@ import { afterEach, describe, expect, it, vi } from 'vitest'; import { createRouter, createWebHistory } from '@ionic/vue-router'; import { IonicVue, - IonApp, IonRouterOutlet, IonPage, useIonRouter, - createAnimation } from '@ionic/vue'; -import { onBeforeRouteLeave } from 'vue-router'; import { mockAnimation, waitForRouter } from './utils'; enableAutoUnmount(afterEach); -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} - const BasePage = { template: '', components: { IonPage }, @@ -60,7 +52,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -122,7 +114,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } diff --git a/packages/vue/test/base/tests/unit/routing.spec.ts b/packages/vue/test/base/tests/unit/routing.spec.ts index a4a8f55521a..3d1f50a428f 100644 --- a/packages/vue/test/base/tests/unit/routing.spec.ts +++ b/packages/vue/test/base/tests/unit/routing.spec.ts @@ -17,11 +17,6 @@ import { waitForRouter } from './utils'; enableAutoUnmount(afterEach); -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} - const BasePage = { template: '', components: { IonPage }, @@ -46,7 +41,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -74,7 +69,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -107,7 +102,7 @@ describe('Routing', () => { router.push('/myPath/123'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -147,7 +142,7 @@ describe('Routing', () => { router.push('/myPath'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -182,7 +177,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -203,7 +198,7 @@ describe('Routing', () => { template: ` - + Tab 1 @@ -247,9 +242,9 @@ describe('Routing', () => { ] }); - router.push('/'); + router.push('/tabs/tab1'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -302,7 +297,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -355,7 +350,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -402,7 +397,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -450,7 +445,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -618,7 +613,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -672,7 +667,7 @@ describe('Routing', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } diff --git a/packages/vue/test/base/tests/unit/tab-bar.spec.ts b/packages/vue/test/base/tests/unit/tab-bar.spec.ts index d1c1037a924..00ded7020b4 100644 --- a/packages/vue/test/base/tests/unit/tab-bar.spec.ts +++ b/packages/vue/test/base/tests/unit/tab-bar.spec.ts @@ -1,12 +1,7 @@ import { mount } from '@vue/test-utils'; import { describe, expect, it } from 'vitest'; import { createRouter, createWebHistory } from '@ionic/vue-router'; -import { IonicVue, IonApp, IonRouterOutlet, IonPage, IonTabs, IonTabBar } from '@ionic/vue'; - -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} +import { IonicVue, IonRouterOutlet, IonPage, IonTabs, IonTabBar } from '@ionic/vue'; describe('ion-tab-bar', () => { it('should render in the top slot', async () => { @@ -31,7 +26,7 @@ describe('ion-tab-bar', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(Tabs, { global: { plugins: [router, IonicVue] } @@ -67,7 +62,7 @@ describe('ion-tab-bar', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(Tabs, { global: { plugins: [router, IonicVue] } @@ -102,7 +97,7 @@ describe('ion-tab-bar', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(Tabs, { global: { plugins: [router, IonicVue] } @@ -141,16 +136,15 @@ describe('ion-tab-bar', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(Tabs, { global: { plugins: [router, IonicVue] } }); - const innerHTML = wrapper.find('ion-tabs').html(); - - const tabs = wrapper.findComponent(IonTabBar); - const children = tabs.vm.$el.childNodes; + const tabs = wrapper.findComponent(IonTabs); + const tabbar = tabs.vm.$el.children[1]; + const children = tabbar.childNodes; // 8 is a comment node: https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType expect(children[0].nodeType).toEqual(8); diff --git a/packages/vue/test/base/tests/unit/tabs.spec.ts b/packages/vue/test/base/tests/unit/tabs.spec.ts index 528386b8963..73a82bd8748 100644 --- a/packages/vue/test/base/tests/unit/tabs.spec.ts +++ b/packages/vue/test/base/tests/unit/tabs.spec.ts @@ -1,14 +1,9 @@ import { mount } from '@vue/test-utils'; import { describe, expect, it } from 'vitest'; import { createRouter, createWebHistory } from '@ionic/vue-router'; -import { IonicVue, IonApp, IonRouterOutlet, IonPage, IonTabs, IonTabBar, IonTabButton, IonLabel } from '@ionic/vue'; +import { IonicVue, IonRouterOutlet, IonPage, IonTabs, IonTabBar, IonTabButton, IonLabel } from '@ionic/vue'; import { waitForRouter } from './utils'; -const App = { - components: { IonApp, IonRouterOutlet }, - template: '', -} - const Tabs = { components: { IonPage, IonTabs, IonTabBar, IonTabButton, IonLabel, IonRouterOutlet }, template: ` @@ -64,7 +59,7 @@ describe('ion-tabs', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -112,7 +107,7 @@ describe('ion-tabs', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -166,7 +161,7 @@ describe('ion-tabs', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] } @@ -222,7 +217,7 @@ describe('ion-tabs', () => { router.push('/'); await router.isReady(); - const wrapper = mount(App, { + const wrapper = mount(IonRouterOutlet, { global: { plugins: [router, IonicVue] }