-
Notifications
You must be signed in to change notification settings - Fork 136
GA Test Plan
Wassim Chegham edited this page May 11, 2022
·
19 revisions
Before running each test plan, install the latest source code from the GA branch:
git clone -b ga http://github.com/Azure/static-web-apps-cli.gitcd static-web-apps-clinpm installnpm run buildnpm testnpm run e2e:staticnpm link- make sure there are no issues during
npm install - make sure there are no issues during
npm run build - make sure there are no issues during
npm test
Click here for the list of tested frameworks.
TODO
TODO
Test plan:
- login using keychain:
node ./dist/cli/bin.js login --use-keychain- you might be asked to enter your system password.
- the browser window will open
- login with your Azure account
- login without keychain:
node ./dist/cli/bin.js login --no-use-keychain- the browser window will open
- login with your Azure account
- make sure the file
.envhas been created with the right project credentialsAZURE_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 AZURE_TENANT_ID=00000000-0000-0000-0000-000000000000 - make sure the
.gitignorefile got updated with the.enventry.- only applicable if you are in a git project.
- run
node ./dist/cli/bin.js login --no-use-keychainagain, the.envfile will be used (no prompts) - run
node ./dist/cli/bin.js login --use-keychain trueagain, the.envfile will be used (no prompts) - try a different combination of flags (see
swa login -h)
TODO
-
swa startshould start the default config -
swa start nameshould: - start a config called
nameif found - start an
outputLocationcallednameif no config found 1. should print a warning message that we are usingoutputLocationinstead of a config
TODO
Test plan for supported scenarios when deploying:
-
the user should be authenticated
- if a user is logged out, they should be able to login in during deployment if they are not
- if the user is already logged in, they should process to deployment without being prompted
- if the Azure tenant is not selected, the user should be able to select one during the deployment
- if only one Azure tenant is available, it will be automatically selected without prompting the user
- if no Azure tenant is found, the deployment process is stopped.
- if an Azure subscription is not selected, the user should be able to select one during the deployment
- if only one Azure subscription is available, it will be automatically selected without prompting the user
- if no Azure subscription is found, the deployment process is stopped.
-
the user should select a valid project
- if no project details were found, the user should be able to select a project
- if multiple projects are found, list all projects in the format
resource-group/swa - if no project was found, prompt the user to create a new project
- if the user provides
appName, use it as a default name - if the user provides does not provide an
appName, use the current folder name as a defaultappName - if the user has a set
configurations.ID.deploy.appNamein theswa-cli.config.jsonfile, use it as a defaultappName - if multiple projects are found:
- if the project is available, show a list of projects and highlight that project
- if the project is NOT available, show a list of projects and highlight the CREATE option
- if one project is found:
- the project is available, automatically select that project without prompting the user
- the project is NOT available, prompt the user to create a new project using the provided name
- when creating a project, if the project already exists, prompt the user to override the existing project
- on success, the user should be able to see the URL of the deployed project
- users should access their custom domain (if it's set)
-
the
--yesmode (will be added later. Cc @sinedied )- if the user provides
appName, use it as a default name - if the user provides does not provide an
appName, use the current folder name as anappName - do not prompt the user for any questions (assume
yesto all prompts) and use these defaults: - if no project is found, automatically create a new one using
appName - if one project is found
1. if it matched
appName, use it 1. if it doesn't matchappName, create a new project usingappName - if multiple projects were found
1. if
appNameis in the list, use it 1. ifappNameis NOT in the list, create a new project usingappName
- if the user provides
-
the
--dry-runmode- skip the whole deployment process
- ignore the missing deployment token error message (that's expected until StaticSitesClient implements a dry-run mode)
-
error handling
- the deployment should exit on any error
- if the user press CTRL+C during any step, the deployment should exit.
- if the selected project is already linked to a different provider, error, and exit.
- if the users reach the quota in the default Azure region, they should be able to override the default location using
AZURE_REGION_LOCATION="azure-region"
-
other
- deployment token should NOT be stored in
swa-cli.config.jsonfile
- deployment token should NOT be stored in