Skip to content

Commit

Permalink
Chore: Release 7.2.0 (#2414)
Browse files Browse the repository at this point in the history
Feature: add general playwright tests (#2149)

Task: Add Graph Support Info on README.md (#2347)

Task: Add logging for script errors (#2351)

Task: Add language snippet telemetry (#2371)

Task: Rename sample query "all the items in my drive" to "list items in my drive" (#2350)

Fix: Response area container heights (#2372)

Fix: Re-order tests (#2354)

Fix: Inform user if URL is incomplete (#2367)

Fix: Autocollapsing of history items (#2331)

Fix: Screen blanking on render (#2403)

Fix: Add method to filter ResizeObserver exceptions (#2342)

Fix: enter key runs previous query (#2348)

Fix: autocomplete character selection (#2304)

Fix: Display beta resources subgroups for admin group (#2364)

Fix: Update deprecated aria-label (#2368)

Fix: Default overlay on collections review panel (#2377)

Chore: December dependabot upgrades (#2296)

Chore: Dependabot upgrades February (#2401)

chore: Dependabot upgrades (#2335)

Chore: Code cleanup (#2251)
  • Loading branch information
github-actions[bot] authored Feb 13, 2023
1 parent 399068a commit a6bd177
Show file tree
Hide file tree
Showing 141 changed files with 3,269 additions and 1,828 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ jobs:
needs: install
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
outputs:
static_web_app_url: ${{ steps.builddeploy.outputs.static_web_app_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -187,6 +189,11 @@ jobs:
app_location: "/" # App source code path
app_artifact_location: "build" # Built app content directory - optional

- name: Set url
run: |
echo "::set-output name=static_web_app_url::$PLAYWRIGHT_TESTS_BASE_URL"
echo $PLAYWRIGHT_TESTS_BASE_URL
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ yarn-error.log*
.idea
.vs
*.xml
playwright-report/index.html
test-results
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"ms-vscode.sublime-keybindings",
"redhat.vscode-yaml",
"redhat.vscode-commons",
"eamodio.gitlens"
"eamodio.gitlens",
"ms-playwright.playwright",
"nitayneeman.playwright-snippets"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
Expand Down
80 changes: 53 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,79 @@
# Microsoft Graph Explorer V4

[![Build Status](https://dev.azure.com/japhethobalak/japhethobalak/_apis/build/status/microsoftgraph.microsoft-graph-explorer-v2?branchName=dev)](https://dev.azure.com/japhethobalak/japhethobalak/_build/latest?definitionId=4&branchName=dev)

The [Microsoft Graph Explorer V4](https://developer.microsoft.com/graph/graph-explorer) lets developers quickly navigate and test API endpoints.

The Graph Explorer is written in [TypeScript](https://www.typescriptlang.org/) and powered by:
* [React](https://reactjs.org/)
* [Office Fabric](https://dev.office.com/fabric)

- [React](https://reactjs.org/)
- [Office Fabric](https://dev.office.com/fabric)

## Running the explorer locally

* `npm install` to install project dependencies. `npm` is installed by default with [Node.js](https://nodejs.org/).
* `npm start` starts the TypeScript compiler in watch mode and the local server. It should open your browser automatically with the Graph Explorer at [http://localhost:3000/](http://localhost:3000).
- `npm install` to install project dependencies. `npm` is installed by default with [Node.js](https://nodejs.org/).
- `npm start` starts the TypeScript compiler in watch mode and the local server. It should open your browser automatically with the Graph Explorer at [http://localhost:3000/](http://localhost:3000).

### Enabling authentication with your own credentials

#### Enabling authentication with your own credentials
* Sign in to your Microsoft account (or Create one) at the [Microsoft Azure Portal](https://ms.portal.azure.com/).
* Find the Azure service named App registrations. If you haven't used this service before, you might need to search for it in the search bar.
* In the App registrations page, click `+ New registration`. You will be redirected to a form in the Microsoft Azure portal where you Register an application. Fill out the form and set the Redirect URI to a `Single-page application (SPA)` with `http://localhost:3000`. You can also set it from authentication tab in the app you have just created.
* Create a `.env` file at the root of the project/repo and add the following keys.
- REACT_APP_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- REACT_APP_INSTRUMENTATION_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Where `REACT_APP_CLIENT_ID` is the `Application (client) ID` from the Azure portal and `REACT_APP_INSTRUMENTATION_KEY` is the `Object ID` from the portal.
- Sign in to your Microsoft account (or Create one) at the [Microsoft Azure Portal](https://ms.portal.azure.com/).
- Find the Azure service named App registrations. If you haven't used this service before, you might need to search for it in the search bar.
- In the App registrations page, click `+ New registration`. You will be redirected to a form in the Microsoft Azure portal where you Register an application. Fill out the form and set the Redirect URI to a `Single-page application (SPA)` with `http://localhost:3000`. You can also set it from authentication tab in the app you have just created.
- Create a `.env` file at the root of the project/repo and add the following keys. - REACT_APP_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - REACT_APP_INSTRUMENTATION_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Where `REACT_APP_CLIENT_ID` is the `Application (client) ID` from the Azure portal and `REACT_APP_INSTRUMENTATION_KEY` is the `Object ID` from the portal.

## Other commands
* `npm test` to run tests from the command line for scenarios like parsing metadata and functional explorer tests.
* `npm run ci` to run accessibility tests from the command line
* `npm run lint` linting your files

- `npm test` to run tests from the command line for scenarios like parsing metadata and functional explorer tests.
- `npm run lint` linting your files

## Getting Help & Guides
### Where To Get Support
Are you having any trouble with Micrososft Graph or would you like to request a Graph feature?
* Check the [Microsoft Graph - Microsoft Q&A](https://learn.microsoft.com/en-us/answers/tags/161/ms-graph) and [Microsoft Graph - Stack Overflow](https://stackoverflow.com/questions/tagged/msgraph) which provide solutions to commonly experienced issues and asked questions.

* If there is no similar issue, submit the issue on [Microsoft Q&A](https://learn.microsoft.com/en-us/answers/questions/ask/?displayLabel=Microsoft%20Graph) with the tag "Microsoft Graph" or ask questions on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=msgraph).

* For more information about Microsoft Graph, refer to the [Microsoft Graph Docs](https://learn.microsoft.com/en-us/graph/overview) and [Microsoft Graph REST API Docs](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0).

Are you new to Graph Explorer or would like to raise a bug or request a feature?
* Use our [Graph Explorer Getting Started Docs](https://learn.microsoft.com/en-us/graph/graph-explorer/graph-explorer-overview) to get guidance on how to quickly use Graph Explorer.

* Use [https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues](https://github.com/microsoftgraph/microsoft-graph-explorer-v4/issues) to report Graph Explorer bugs and to suggest new features or enhancements (and ask Graph Explorer related questions).

### Building Apps & Accessing M365 Data
* To simplify your Microsoft Graph app-building experience, use our [Microsoft Graph SDKs]((https://learn.microsoft.com/en-us/graph/sdks/sdks-overview)) and [Microsoft Graph Toolkit (MGT)]((https://learn.microsoft.com/en-us/graph/toolkit/overview)) which provide fully functional and out-of-the-box web components.

* Refer to [Microsoft Graph Quick Start](https://developer.microsoft.com/en-us/graph/quick-start) to get a pre-initialized SDK sample application up and running in less 3 minutes using the language of your choice.
## Contributing

Please see the [contributing guidelines](CONTRIBUTING.md).

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

## Testing Accessbility
* Download the latest stable chromedriver from [here](https://chromedriver.chromium.org/).
* In your `.env` file, create a variable `REACT_APP_CHROMEDRIVER_PATH` and save the path to your `chromedriver.exe` file.
For example (on a Windows PC) it would be : `REACT_APP_CHROMEDRIVER_PATH=C:\\SeleniumWebDrivers\\ChromeDriver\\chromedriver.exe`
Take note of the format.
* Save your changes.
* On your terminal run the command `npm install`.
* Once the installation is complete run the command `npm run ci`.
## E2E playwright testing

- Playwright requires a running GE Url to run against.
- In your `.env` file, create add variables:
- PLAYWRIGHT_TESTS_USERNAME='your demo tenant email address'
- PLAYWRIGHT_TESTS_PASSWORD='password to the demo tenant account'
- PLAYWRIGHT_TESTS_BASE_URL='url that you are running against' // http://localhost:3000 if testing locally
- Save your changes.
- On your terminal run the command `npx playwright install`
- On your terminal run the command `npx playwright install-deps`.
- Once the installation is complete run the command `npx playwright test ui`.
- Playwright commands can be extended using arguments described in the official documentation [Running tests](https://playwright.dev/docs/running-tests)

## Known issues
* You cannot remove permissions by using the Graph Explorer UI. You will need to [remove the application consent](http://shawntabrizi.com/aad/revoking-consent-azure-active-directory-applications/) and then re-consent to remove permissions. I know, this is far from a good experience.

- You cannot remove permissions by using the Graph Explorer UI. You will need to [remove the application consent](http://shawntabrizi.com/aad/revoking-consent-azure-active-directory-applications/) and then re-consent to remove permissions. I know, this is far from a good experience.

## Additional resources
* [Microsoft Graph website](https://graph.microsoft.io)
* [Office Dev Center](http://dev.office.com/)
* [Graph Explorer releases](https://github.com/microsoftgraph/microsoft-graph-explorer/releases)

- [Microsoft Graph website](https://graph.microsoft.io)
- [Office Dev Center](http://dev.office.com/)
- [Graph Explorer releases](https://github.com/microsoftgraph/microsoft-graph-explorer/releases)

## Copyright

Copyright (c) 2017 Microsoft. All rights reserved.
67 changes: 58 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ pr:
- azure-pipelines.yml
- package-lock.json

variables:
isMaster: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isDev: $[eq(variables['Build.SourceBranch'], 'refs/heads/dev')]

trigger:
branches:
include:
Expand Down Expand Up @@ -71,7 +75,7 @@ jobs:

- task: NodeTool@0
inputs:
versionSpec: "12.x"
versionSpec: "14.20.x"
displayName: "Install Node.js"

- script: |
Expand All @@ -86,10 +90,6 @@ jobs:
npm test
displayName: "Runs Unit tests"
- script: |
npm run ci
displayName: "Runs Accessibility tests"
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
Expand All @@ -102,13 +102,62 @@ jobs:
displayName: "Run build"
- job: Two
displayName: "Run playwright tests"
condition: eq(variables['isDev'], 'true')
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.20.x"
displayName: "Install npm"

- script: |
npm install
displayName: "npm install"
- script: |
npm install -D @playwright/test
npx playwright install-deps
displayName: "Install playwright dependancies"
- script: |
npx playwright install
displayName: "Install playwright"
- script: |
npm run test-playwright-accessibility
displayName: "Run accessibility tests"
- script: |
set CI=true
npm run test-playwright
env:
REACT_APP_CLIENT_ID: $(REACT_APP_PLAYWRIGHT_TEST_CLIENT_ID)
REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_STAGING_INSTRUMENTATION_KEY)
REACT_APP_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_STAGING_FEEDBACK_CAMPAIGN_ID)
REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID: $(REACT_APP_NPS_FEEDBACK_CAMPAIGN_ID)
REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD)
REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD)
REACT_APP_USAGE_TIME: $(REACT_APP_USAGE_TIME)
PLAYWRIGHT_TESTS_BASE_URL: $(PLAYWRIGHT_TESTS_BASE_URL)
PLAYWRIGHT_TESTS_USERNAME: $(PLAYWRIGHT_TESTS_USERNAME)
PLAYWRIGHT_TESTS_PASSWORD: $(PLAYWRIGHT_TESTS_PASSWORD)
displayName: "Run playwright tests"
- publish: $(System.DefaultWorkingDirectory)/playwright-report
artifact: playwright-report
condition: always()
displayName: "Publish test results"


- job: Three
displayName: "Publish artifacts"
dependsOn: One
condition: succeeded()
condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true')))
steps:
- task: NodeTool@0
inputs:
versionSpec: "12.x"
versionSpec: "14.20.x"
displayName: "Install Node.js"

- script: |
Expand All @@ -129,7 +178,7 @@ jobs:
- task: PowerShell@2
displayName: "Set version-number"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['isMaster'], 'true'))
inputs:
targetType: "inline"
script: |
Expand All @@ -141,7 +190,7 @@ jobs:
- script: |
npm run build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['isMaster'], 'true'))
env:
REACT_APP_CLIENT_ID: $(REACT_APP_PROD_CLIENT_ID)
REACT_APP_INSTRUMENTATION_KEY: $(REACT_APP_INSTRUMENTATION_KEY)
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
'!build/**',
'!src/**/*.d.ts',
'!src/index.tsx',
'!src/tests/accessibility/**',
'!src/app/middleware/telemetryMiddleware.ts',
'!src/telemetry/telemetry.ts'
],
Expand Down
Loading

0 comments on commit a6bd177

Please sign in to comment.