зеркало из
1
0
Форкнуть 0
communication-ui-library/samples/tests
edwardlee-msft b40b11601e
Update lock files and minimum typescript version (#5399)
* Update lock files

* Update node types

* Update node types

* Update minimum supported typescript version

* Update minimun typescript version and resolve styling issue with update packages for controlbar button

* Change files

* remove conflicting height
2024-11-07 11:34:38 -08:00
..
ComponentExamples Temporarily skip failing test due to infra to get CI green (#4959) 2024-07-26 20:38:22 +00:00
StaticHtmlComposites Add more robust checks to composite javascript tests to fix flakey tests (#5255) 2024-10-04 19:14:16 +00:00
common
snapshots GA ACS captions (#5084) 2024-09-11 14:06:27 -07:00
.env
CHANGELOG.json
README.md
globalSetup.ts [ bug fix Compliance issue ] remove Node-static (#5213) 2024-09-25 13:31:56 -07:00
package.json Update lock files and minimum typescript version (#5399) 2024-11-07 11:34:38 -08:00
playwright.config.ts
tsconfig.json

README.md

Live tests based on sample applications

This packlet contains some live browser tests (end-to-end tests that depend on Azure Communication Services backend services) based on sample applications included in this git repo. See the top-level testing documentation to understand how these tests fit into our overall testing strategy.

Setup

  • Build dependencies
    rush install
    rush build
    
  • Set connection string in ./.env file (replace [REPLACE_WITH_CONNECTION_STRING]).

See setup instructions in the composite browser test README for troubleshooting guidance.

Run tests

Tests for each sample are run via a separate script:

  • Run tests for a sample application that uses the static HTML composite bundles:
    rush test:e2e:bundle
    
  • Run tests for a sample application that builds upon the fine-grained UI components library:
    rush test:e2e:examples
    

Update snapshots

Snapshots for each sample are updated via a separate script. Note that snapshot updates are somewhat dependent on the machine environment. We use a GitHub workflow to update snapshots consistently. You should not need to run these scripts in most cases.

  • Update test snapshots for a sample application that uses the static HTML composite bundles:
    rush update:e2e:bundle
    
  • Update test snapshots for a sample application that builds upon the fine-grained UI components library:
    rush update:e2e:examples
    

Add new tests

Live-test are costly to run and maintain

Only include smoke tests that verify basic functionality of top-level API. For detailed tests, choose a more appropriate testing strategy.

If you are adding new tests for samples, please follow this folder structure:

.
├── [Sample Folder Name]                   # Tests for the sample folder
├── common                                 # utils and common code for testing
├── .env                                   # Environment file which setup a connection string for local tests
├── playwright.config.ts                   # playwright config file
├── globalSetup.ts                         # Setting up file server for automation test
├── package.json
└── README.md