forked from microsoft/chat-copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scenario test readme (microsoft#272)
### Motivation and Context <!-- Thank you for your contribution to the copilot-chat repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> We fix the scenario tests. It' time to document how to run the tests locally. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> 1. Create a README with setup instructions to run the tests locally. 2. Add a timeout of 30 seconds for each test. 3. Rename some secrets so that they make more sense. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
- Loading branch information
1 parent
ad0234c
commit d3b19f1
Showing
3 changed files
with
73 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copilot Chat Web App Scenario Tests | ||
|
||
## How to set up the tests to run locally | ||
|
||
### Install Playwright | ||
|
||
Playwright is a dependency included in package.json. You just need to run `yarn install` followed by `yarn playwright install --with-deps` at the webapp/ root to install Playwright. | ||
|
||
> (Optional) Install the [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright). | ||
### Set up App registrations | ||
|
||
Follow the [instructions](https://github.com/microsoft/chat-copilot#optional-enable-backend-authentication-via-azure-ad) to create two app registrations. This is needed for the multi-user chat test. | ||
|
||
### Configure the environment | ||
|
||
- Follow the [instructions](https://github.com/microsoft/chat-copilot#optional-enable-backend-authentication-via-azure-ad) to configure the /webapp/.env file and the /webapi/appsettings.josn file. | ||
|
||
- You need two test accounts to run the multi-user chat. Make sure the two accounts are under the correct tenant. Enter the account credentials in the .env file. | ||
|
||
### Running the tests | ||
|
||
- Open a terminal window to start the webapi. | ||
|
||
- Once the webapi is ready, run `yarn playwright test` in another terminal or use the [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright). |