Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjsheets/teams-tab-test-fixture
https://github.com/cjsheets/teams-tab-test-fixture
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/cjsheets/teams-tab-test-fixture
- Owner: cjsheets
- License: mit
- Created: 2021-03-24T03:57:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T18:44:53.000Z (over 1 year ago)
- Last Synced: 2024-12-07T21:56:56.574Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 168 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Teams Tab Test Fixture
Simulated Teams desktop and mobile platforms for testing tab apps. Useful for CI testing scenarios.
## Authentication
This library expects you to bring your own authentication. This is done by providing an object or class with the following methods:
* `getAccessToken`
* `getUser`A sample that uses [teams-authenticator](https://github.com/cjsheets/teams-authenticator) (MSAL helper library) is included: `/src/authentication.example.ts`.
This auth class is provided to Teams Tab Test Fixture one of three ways:
* [Recommended] Add a global property "`window.AuthenticationProvider`" to the page running the test fixture.
* If you're building this repository locally, you can add a module `authentication.js` to the root and it will be loaded
* Host the `authentication.js` file on a server and load it by passing "authScriptUrl" to `startServer`## Quick Start
Install the package from npm.
```
npm install teams-tab-test-fixture
```In your project, require and run the test fixture server.
```
const { startServer, stopServer } = require('teams-tab-test-fixture');startServer({
appContext: {
urlTemplate: 'https://localhost:8181?tenantId={tid}&groupId={groupId}'
},
});```
With the server running, you can access Teams Tab Test Fixture on https://localhost:8080
### appContext.urlTemplate
`urlTemplate` is a string that uses the same variable replacement signature as teams tab apps. It's the url that the nested iframe will be set to.