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

[Playwright] Add CLI support for Playwright testing extension #8389

Merged
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
8 changes: 8 additions & 0 deletions src/playwright-cli-extension/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

1.0.0b1
++++++
* Initial release.
141 changes: 141 additions & 0 deletions src/playwright-cli-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Azure CLI PlaywrightCliExtension Extension #
This is an extension to Azure CLI to create and manage Playwright Testing resources.

## How to use ##
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please implement this file as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added


Install this extension using the below CLI command
```
az extension add --name playwright-cli-extension
```

### Create Azure Playwright Testing resource ###

```
az playwright-testing workspace create \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace \
--location westus \
--regional-affinity Enabled
```

```
az playwright-testing workspace create \
-g SampleRG \
-n myPlaywrightWorkspace \
-l westus \
--regional-affinity Enabled
```

```
az playwright-testing workspace create \
-g SampleRG \
-n myPlaywrightWorkspace \
-l westus \
--local-auth Enabled
```
---
<br/>

### Update Azure Playwright Testing resource ###

```
az playwright-testing workspace update \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace \
--regional-affinity Disabled
```

```
az playwright-testing workspace update \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace \
--reporting Disabled
```
---
<br/>

### List Azure Playwright Testing resource ###

```
az playwright-testing workspace list \
--resource-group sample-rg
```

```
az playwright-testing workspace list
```
---
<br/>

### Show Azure Playwright Testing resource ###

```
az playwright-testing workspace show \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace
```
---
<br/>

### Delete Azure Playwright Testing resource ###

```
az playwright-testing workspace delete \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace
```
---
<br/>

### List Azure Playwright Testing resource quota ###

```
az playwright-testing workspace quota list \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace
```
---
<br/>

### Show Azure Playwright Testing resource quota ###

```
az playwright-testing workspace quota show \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace \
--quota-name ScalableExecution
```

```
az playwright-testing workspace quota show \
--resource-group SampleRG \
--workspace-name myPlaywrightWorkspace \
--quota-name Reporting
```
---
<br/>

### List Azure Playwright Testing quota ###

```
az playwright-testing quota list \
--location eastus
```
---
<br/>

### Show Azure Playwright Testing quota ###

```
az playwright-testing quota show \
--location eastus \
--quota-name ScalableExecution
```

```
az playwright-testing quota show \
--location eastus \
--quota-name Reporting
```
---
<br/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_playwright_cli_extension._help import helps # pylint: disable=unused-import


class PlaywrightCliExtensionCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
custom_command_type = CliCommandType(
operations_tmpl='azext_playwright_cli_extension.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_playwright_cli_extension.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from azext_playwright_cli_extension._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = PlaywrightCliExtensionCommandsLoader
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-lines

from knack.help_files import helps # pylint: disable=unused-import
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=too-many-lines
# pylint: disable=too-many-statements


def load_arguments(self, _): # pylint: disable=unused-argument
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"playwright-testing",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Microsoft Playwright Testing service
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._check_name_availability import *
Loading
Loading