Skip to content

Commit 6157ea5

Browse files
authored
[Playwright] Add CLI support for Playwright testing extension (#8389)
* playwright testing cli entension added * added service name changes * updated readme * updated readme
1 parent 77116f4 commit 6157ea5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4382
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
1.0.0b1
7+
++++++
8+
* Initial release.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Azure CLI PlaywrightCliExtension Extension #
2+
This is an extension to Azure CLI to create and manage Playwright Testing resources.
3+
4+
## How to use ##
5+
6+
Install this extension using the below CLI command
7+
```
8+
az extension add --name playwright-cli-extension
9+
```
10+
11+
### Create Azure Playwright Testing resource ###
12+
13+
```
14+
az playwright-testing workspace create \
15+
--resource-group SampleRG \
16+
--workspace-name myPlaywrightWorkspace \
17+
--location westus \
18+
--regional-affinity Enabled
19+
```
20+
21+
```
22+
az playwright-testing workspace create \
23+
-g SampleRG \
24+
-n myPlaywrightWorkspace \
25+
-l westus \
26+
--regional-affinity Enabled
27+
```
28+
29+
```
30+
az playwright-testing workspace create \
31+
-g SampleRG \
32+
-n myPlaywrightWorkspace \
33+
-l westus \
34+
--local-auth Enabled
35+
```
36+
---
37+
<br/>
38+
39+
### Update Azure Playwright Testing resource ###
40+
41+
```
42+
az playwright-testing workspace update \
43+
--resource-group SampleRG \
44+
--workspace-name myPlaywrightWorkspace \
45+
--regional-affinity Disabled
46+
```
47+
48+
```
49+
az playwright-testing workspace update \
50+
--resource-group SampleRG \
51+
--workspace-name myPlaywrightWorkspace \
52+
--reporting Disabled
53+
```
54+
---
55+
<br/>
56+
57+
### List Azure Playwright Testing resource ###
58+
59+
```
60+
az playwright-testing workspace list \
61+
--resource-group sample-rg
62+
```
63+
64+
```
65+
az playwright-testing workspace list
66+
```
67+
---
68+
<br/>
69+
70+
### Show Azure Playwright Testing resource ###
71+
72+
```
73+
az playwright-testing workspace show \
74+
--resource-group SampleRG \
75+
--workspace-name myPlaywrightWorkspace
76+
```
77+
---
78+
<br/>
79+
80+
### Delete Azure Playwright Testing resource ###
81+
82+
```
83+
az playwright-testing workspace delete \
84+
--resource-group SampleRG \
85+
--workspace-name myPlaywrightWorkspace
86+
```
87+
---
88+
<br/>
89+
90+
### List Azure Playwright Testing resource quota ###
91+
92+
```
93+
az playwright-testing workspace quota list \
94+
--resource-group SampleRG \
95+
--workspace-name myPlaywrightWorkspace
96+
```
97+
---
98+
<br/>
99+
100+
### Show Azure Playwright Testing resource quota ###
101+
102+
```
103+
az playwright-testing workspace quota show \
104+
--resource-group SampleRG \
105+
--workspace-name myPlaywrightWorkspace \
106+
--quota-name ScalableExecution
107+
```
108+
109+
```
110+
az playwright-testing workspace quota show \
111+
--resource-group SampleRG \
112+
--workspace-name myPlaywrightWorkspace \
113+
--quota-name Reporting
114+
```
115+
---
116+
<br/>
117+
118+
### List Azure Playwright Testing quota ###
119+
120+
```
121+
az playwright-testing quota list \
122+
--location eastus
123+
```
124+
---
125+
<br/>
126+
127+
### Show Azure Playwright Testing quota ###
128+
129+
```
130+
az playwright-testing quota show \
131+
--location eastus \
132+
--quota-name ScalableExecution
133+
```
134+
135+
```
136+
az playwright-testing quota show \
137+
--location eastus \
138+
--quota-name Reporting
139+
```
140+
---
141+
<br/>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
from azure.cli.core import AzCommandsLoader
9+
from azext_playwright_cli_extension._help import helps # pylint: disable=unused-import
10+
11+
12+
class PlaywrightCliExtensionCommandsLoader(AzCommandsLoader):
13+
14+
def __init__(self, cli_ctx=None):
15+
from azure.cli.core.commands import CliCommandType
16+
custom_command_type = CliCommandType(
17+
operations_tmpl='azext_playwright_cli_extension.custom#{}')
18+
super().__init__(cli_ctx=cli_ctx,
19+
custom_command_type=custom_command_type)
20+
21+
def load_command_table(self, args):
22+
from azext_playwright_cli_extension.commands import load_command_table
23+
from azure.cli.core.aaz import load_aaz_command_table
24+
try:
25+
from . import aaz
26+
except ImportError:
27+
aaz = None
28+
if aaz:
29+
load_aaz_command_table(
30+
loader=self,
31+
aaz_pkg_name=aaz.__name__,
32+
args=args
33+
)
34+
load_command_table(self, args)
35+
return self.command_table
36+
37+
def load_arguments(self, command):
38+
from azext_playwright_cli_extension._params import load_arguments
39+
load_arguments(self, command)
40+
41+
42+
COMMAND_LOADER_CLS = PlaywrightCliExtensionCommandsLoader
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=line-too-long
9+
# pylint: disable=too-many-lines
10+
11+
from knack.help_files import helps # pylint: disable=unused-import
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=too-many-lines
9+
# pylint: disable=too-many-statements
10+
11+
12+
def load_arguments(self, _): # pylint: disable=unused-argument
13+
pass
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"playwright-testing",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Microsoft Playwright Testing service
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
12+
from ._check_name_availability import *

0 commit comments

Comments
 (0)