Skip to content

Commit

Permalink
Fluent: test fluentui bundles (#5142)
Browse files Browse the repository at this point in the history
* Fluent: test fluentui bundles

* Remove unnecessary serve instructions

* Add precommit and fix issues

* Rename package

* Add build artifacts to docker context

* Sort

* Bring back botframework-webchat-fluent-theme.production.min.js.map

* Reorder static entries

* Fix extra space

* Fix duplicate string

* Apply customizations to the dark theme

* Fix color
  • Loading branch information
OEvgeny authored Apr 22, 2024
1 parent 2240f2a commit ec25060
Show file tree
Hide file tree
Showing 21 changed files with 3,916 additions and 898 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
!/__tests__
/__tests__/__image_snapshots__
!/packages/bundle/dist
!/packages/fluent-theme/dist
!/packages/playground/build
!/packages/test/fluent-bundle/dist
!/packages/test/harness/dist
!/packages/test/page-object/dist
!/serve-test.json
5 changes: 3 additions & 2 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ jobs:
- name: Pack Docker artifact
run: |
zip docker.zip -r@ <<EOF
./__tests__/
./babel-jest-config.js
./babel-passthru-transformer.js
./babel.config.json
./docker-compose-wsl2.yml
./jest.config.js
./package.json
./package-lock.json
./package.json
./__tests__/
./packages/bundle/dist/
./packages/fluent-theme/dist/
./packages/test/fluent-bundle/dist/
./packages/test/harness/
./packages/test/page-object/dist/
./serve-test.json
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
481 changes: 33 additions & 448 deletions __tests__/html/fluentTheme/fluentThemeFallback.dark.html

Large diffs are not rendered by default.

462 changes: 14 additions & 448 deletions __tests__/html/fluentTheme/fluentThemeFallback.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docker-compose-wsl2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ services:
- ./__tests__/html/:/var/web/__tests__/html/
- ./packages/bundle/dist/:/var/web/packages/bundle/dist/
- ./packages/fluent-theme/dist/:/var/web/packages/fluent-theme/dist/
- ./packages/test/fluent-bundle/dist/:/var/web/packages/test/fluent-bundle/dist/
- ./packages/test/harness/dist/:/var/web/packages/test/harness/dist/
- ./packages/test/page-object/dist/:/var/web/packages/test/page-object/dist/

Expand Down
40 changes: 40 additions & 0 deletions packages/test/dev-server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,46 @@ const resolveFromRepositoryRoot = resolveFromProjectRoot.bind(undefined, '../../
)
);

app.use(
'/__dist__/fluent-bundle.development.js',
express.static(
resolve(
fileURLToPath(import.meta.url),
'../../../../test/fluent-bundle/dist/fluent-bundle.development.js'
)
)
);

app.use(
'/__dist__/fluent-bundle.development.js.map',
express.static(
resolve(
fileURLToPath(import.meta.url),
'../../../../test/fluent-bundle/dist/fluent-bundle.development.js.map'
)
)
);

app.use(
'/__dist__/fluent-bundle.production.min.js',
express.static(
resolve(
fileURLToPath(import.meta.url),
'../../../../test/fluent-bundle/dist/fluent-bundle.production.min.js'
)
)
);

app.use(
'/__dist__/fluent-bundle.production.min.js.map',
express.static(
resolve(
fileURLToPath(import.meta.url),
'../../../../test/fluent-bundle/dist/fluent-bundle.production.min.js.map'
)
)
);

// /__dist__/ will be serve from ESBuild development server.
app.use(
'/__dist__/',
Expand Down
12 changes: 12 additions & 0 deletions packages/test/fluent-bundle/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends:
- ../../../.eslintrc.production.yml
- ../../../.eslintrc.react.yml

# TODO: #3212 When we move to React Native, we should disable this.
env:
browser: true

rules:
react/destructuring-assignment: off
react/require-default-props: off
dot-notation: off
4 changes: 4 additions & 0 deletions packages/test/fluent-bundle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*.tgz
/dist
/lib
/node_modules
11 changes: 11 additions & 0 deletions packages/test/fluent-bundle/.prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
arrowParens: avoid
bracketSameLine: false
bracketSpacing: true
endOfLine: auto
printWidth: 120
proseWrap: preserve
quoteProps: as-needed
semi: true
singleQuote: true
tabWidth: 2
trailingComma: none
Loading

0 comments on commit ec25060

Please sign in to comment.