Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mgmt] playwrighttesting ga #32199

Merged
merged 21 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 27 additions & 14 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 3 additions & 36 deletions sdk/playwrighttesting/arm-playwrighttesting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,7 @@
# Release History

## 1.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 1.0.0-beta.2 (2024-01-31)

### Features Added

- Added Interface AccountProperties
- Added Interface AccountUpdateProperties
- Added Interface QuotaProperties
- Interface Account has a new optional parameter properties
- Interface AccountUpdate has a new optional parameter properties
- Interface Quota has a new optional parameter properties

### Breaking Changes
## 1.0.0 (2024-12-13)

- Interface Account no longer has parameter dashboardUri
- Interface Account no longer has parameter provisioningState
- Interface Account no longer has parameter regionalAffinity
- Interface Account no longer has parameter reporting
- Interface Account no longer has parameter scalableExecution
- Interface AccountUpdate no longer has parameter regionalAffinity
- Interface AccountUpdate no longer has parameter reporting
- Interface AccountUpdate no longer has parameter scalableExecution
- Interface Quota no longer has parameter freeTrial
- Interface Quota no longer has parameter provisioningState


## 1.0.0-beta.1 (2023-09-27)
### Features Added

The package of @azure/arm-playwrighttesting is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
This is the first stable version with the package of @azure/arm-playwrighttesting.
31 changes: 15 additions & 16 deletions sdk/playwrighttesting/arm-playwrighttesting/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Azure PlaywrightTesting client library for JavaScript
# AzurePlaywrightService client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure PlaywrightTesting client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzurePlaywrightService client.

Azure Playwright testing management service
Microsoft.AzurePlaywrightService Resource Provider Management API.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-playwrighttesting) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting?view=azure-node-preview) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-playwrighttesting) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand All @@ -24,16 +24,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

### Install the `@azure/arm-playwrighttesting` package

Install the Azure PlaywrightTesting client library for JavaScript with `npm`:
Install the AzurePlaywrightService client library for JavaScript with `npm`:

```bash
npm install @azure/arm-playwrighttesting
```

### Create and authenticate a `PlaywrightTestingClient`
### Create and authenticate a `AzurePlaywrightServiceClient`

qiaozha marked this conversation as resolved.
Show resolved Hide resolved
To create a client object to access the Azure PlaywrightTesting API, you will need the `endpoint` of your Azure PlaywrightTesting resource and a `credential`. The Azure PlaywrightTesting client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure PlaywrightTesting resource in the [Azure Portal][azure_portal].
To create a client object to access the AzurePlaywrightService API, you will need the `endpoint` of your AzurePlaywrightService resource and a `credential`. The AzurePlaywrightService client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your AzurePlaywrightService resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

Expand All @@ -43,25 +43,24 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure PlaywrightTesting** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
You will also need to **register a new AAD application and grant access to AzurePlaywrightService** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).

For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

```javascript
const { PlaywrightTestingClient } = require("@azure/arm-playwrighttesting");
const { AzurePlaywrightServiceClient } = require("@azure/arm-playwrighttesting");
const { DefaultAzureCredential } = require("@azure/identity");
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new PlaywrightTestingClient(new DefaultAzureCredential(), subscriptionId);
const client = new AzurePlaywrightServiceClient(new DefaultAzureCredential(), subscriptionId);

// For client-side applications running in the browser, use this code instead:
// const credential = new InteractiveBrowserCredential({
// tenantId: "<YOUR_TENANT_ID>",
// clientId: "<YOUR_CLIENT_ID>"
// });
// const client = new PlaywrightTestingClient(credential, subscriptionId);
// const client = new AzurePlaywrightServiceClient(credential, subscriptionId);
```

### JavaScript Bundle
Expand All @@ -70,9 +69,9 @@ To use this client library in the browser, first you need to use a bundler. For

## Key concepts

### PlaywrightTestingClient
### AzurePlaywrightServiceClient

`PlaywrightTestingClient` is the primary interface for developers using the Azure PlaywrightTesting client library. Explore the methods on this client object to understand the different features of the Azure PlaywrightTesting service that you can access.
`AzurePlaywrightServiceClient` is the primary interface for developers using the AzurePlaywrightService client library. Explore the methods on this client object to understand the different features of the AzurePlaywrightService service that you can access.

## Troubleshooting

Expand All @@ -89,7 +88,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/playwrighttesting/arm-playwrighttesting/samples) directory for detailed examples on how to use this library.

## Contributing

Expand Down
8 changes: 0 additions & 8 deletions sdk/playwrighttesting/arm-playwrighttesting/_meta.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
"mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
Expand All @@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-playwrighttesting.d.ts"
"publicTrimmedFilePath": "dist/arm-playwrighttesting.d.ts"
},
"messages": {
"tsdocMessageReporting": {
Expand All @@ -28,4 +28,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion sdk/playwrighttesting/arm-playwrighttesting/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/playwrighttesting/arm-playwrighttesting",
"Tag": "js/playwrighttesting/arm-playwrighttesting_4638cdcb91"
"Tag": "js/playwrighttesting/arm-playwrighttesting_de8e95b7f7"
}
17 changes: 17 additions & 0 deletions sdk/playwrighttesting/arm-playwrighttesting/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
];
Loading
Loading