In old release versions run small package of most important tests (#2379)
* In old version release run small package of most important tests * add to releases tests for stocks, warehouses and orders * Update .github/workflows/tests-nightly.yml Co-authored-by: Mika <6186720+NyanKiyoshi@users.noreply.github.com> * remove set-output command Co-authored-by: Mika <6186720+NyanKiyoshi@users.noreply.github.com>
This commit is contained in:
parent
1fc82a08a0
commit
4d1e41517d
19 changed files with 83 additions and 47 deletions
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require("commander");
|
const { Command } = require("commander");
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
|
const { Octokit } = require("@octokit/core");
|
||||||
|
|
||||||
const program = new Command();
|
const program = new Command();
|
||||||
|
|
||||||
|
@ -10,8 +11,10 @@ program
|
||||||
.option("--version <version>", "version of a project")
|
.option("--version <version>", "version of a project")
|
||||||
.option("--token <token>", "token fo login to cloud")
|
.option("--token <token>", "token fo login to cloud")
|
||||||
.action(async options => {
|
.action(async options => {
|
||||||
|
const isOldVersion = await checkIfOldVersion(options.version);
|
||||||
|
core.setOutput("IS_OLD_VERSION", isOldVersion);
|
||||||
|
|
||||||
if (!isPatchRelease(options.version)) {
|
if (!isPatchRelease(options.version)) {
|
||||||
const environmentId = "2dPjdMTU";
|
|
||||||
const taskId = await updateEnvironment(
|
const taskId = await updateEnvironment(
|
||||||
environmentId,
|
environmentId,
|
||||||
options.version,
|
options.version,
|
||||||
|
@ -63,7 +66,7 @@ async function updateEnvironment(environmentId, version, token) {
|
||||||
return responseInJson.task_id;
|
return responseInJson.task_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function waitUntilTaskInProgress(taskId, token, throwErrorAfterTimeout) {
|
async function waitUntilTaskInProgress(taskId, token) {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://staging-cloud.saleor.io/api/service/task-status/${taskId}/`,
|
`https://staging-cloud.saleor.io/api/service/task-status/${taskId}/`,
|
||||||
{
|
{
|
||||||
|
@ -119,3 +122,24 @@ async function getDomainForUpdatedEnvironment(environmentId, token) {
|
||||||
const responseInJson = await response.json();
|
const responseInJson = await response.json();
|
||||||
return responseInJson.domain;
|
return responseInJson.domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function checkIfOldVersion(version) {
|
||||||
|
const newestVersion = await getTheNewestVersion();
|
||||||
|
const howManyVersionsBehind =
|
||||||
|
getFormattedVersion(newestVersion) - getFormattedVersion(version);
|
||||||
|
//All versions besides last three are old versions
|
||||||
|
return howManyVersionsBehind > 2 ? "true" : "false";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getTheNewestVersion() {
|
||||||
|
const octokit = new Octokit();
|
||||||
|
|
||||||
|
const response = await octokit.request(
|
||||||
|
"GET /repos/{owner}/{repo}/releases/latest",
|
||||||
|
{
|
||||||
|
owner: "saleor",
|
||||||
|
repo: "saleor-dashboard",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return response.data["tag_name"];
|
||||||
|
}
|
42
.github/workflows/tests-nightly.yml
vendored
42
.github/workflows/tests-nightly.yml
vendored
|
@ -12,6 +12,7 @@ on:
|
||||||
- '@allEnv'
|
- '@allEnv'
|
||||||
- '@critical'
|
- '@critical'
|
||||||
- '@stable'
|
- '@stable'
|
||||||
|
- '@oldRelease'
|
||||||
environment:
|
environment:
|
||||||
required: true
|
required: true
|
||||||
description: 'Environment to run tests against'
|
description: 'Environment to run tests against'
|
||||||
|
@ -97,7 +98,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# run copies of the current job in parallel
|
# run copies of the current job in parallel
|
||||||
containers: [1, 2, 3, 4]
|
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -145,12 +146,13 @@ jobs:
|
||||||
record: true
|
record: true
|
||||||
tag: ${{ steps.get-env-uri.outputs.ENV_URI }},${{ github.event.inputs.tags }}
|
tag: ${{ steps.get-env-uri.outputs.ENV_URI }},${{ github.event.inputs.tags }}
|
||||||
|
|
||||||
get-url:
|
get-environment-variables:
|
||||||
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
outputs:
|
outputs:
|
||||||
url: ${{ steps.get-url.outputs.url }}
|
url: ${{ steps.get-environment-variables.outputs.url }}
|
||||||
|
is_old_version: ${{ steps.get-environment-variables.outputs.IS_OLD_VERSION }}
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.CLOUD_ACCESS_TOKEN }}
|
TOKEN: ${{ secrets.CLOUD_ACCESS_TOKEN }}
|
||||||
VERSION: ${{github.event.client_payload.version}}
|
VERSION: ${{github.event.client_payload.version}}
|
||||||
|
@ -168,16 +170,16 @@ jobs:
|
||||||
cd .github/workflows
|
cd .github/workflows
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
- name: get-url
|
- name: get environment variables
|
||||||
id: get-url
|
id: get-environment-variables
|
||||||
run: |
|
run: |
|
||||||
node .github/workflows/getUrlForReleaseTests.js \
|
node .github/workflows/getEnvironmentVariables.js \
|
||||||
--version $VERSION \
|
--version $VERSION \
|
||||||
--token "$TOKEN"
|
--token "$TOKEN"
|
||||||
|
|
||||||
run-tests-on-release:
|
run-tests-on-release:
|
||||||
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
if: ${{ github.event_name == 'repository_dispatch' && (github.event.client_payload.environment == 'SANDBOX' || github.event.client_payload.environment == 'STAGING')}}
|
||||||
needs: get-url
|
needs: get-environment-variables
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
status: ${{ steps.cypress.outcome }}
|
status: ${{ steps.cypress.outcome }}
|
||||||
|
@ -187,7 +189,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# run copies of the current job in parallel
|
# run copies of the current job in parallel
|
||||||
containers: [1, 2, 3, 4, 5, 6]
|
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Get branch
|
- name: Get branch
|
||||||
|
@ -201,15 +203,28 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ steps.branch.outputs.ref }}
|
ref: ${{ steps.branch.outputs.ref }}
|
||||||
|
|
||||||
|
- name: Set tag for tests
|
||||||
|
id: set-tag-for-tests
|
||||||
|
env:
|
||||||
|
is_old_version: ${{ needs.get-environment-variables.outputs.is_old_version }}
|
||||||
|
old_version_test_tag: "@oldRelease"
|
||||||
|
new_version_test_tag: "@stable"
|
||||||
|
run: |
|
||||||
|
if [[ $is_old_version == "true" ]]; then
|
||||||
|
echo "TEST_TAG=$old_version_test_tag" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "TEST_TAG=$new_version_test_tag" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Cypress run - automatically
|
- name: Cypress run - automatically
|
||||||
id: cypress
|
id: cypress
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: cypress-io/github-action@v4
|
uses: cypress-io/github-action@v4
|
||||||
env:
|
env:
|
||||||
API_URI: ${{ needs.get-url.outputs.url }}graphql/
|
API_URI: ${{ needs.get-environment-variables.outputs.url }}graphql/
|
||||||
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
APP_MOUNT_URI: ${{ secrets.APP_MOUNT_URI }}
|
||||||
CYPRESS_baseUrl: ${{ needs.get-url.outputs.url }}dashboard/
|
CYPRESS_baseUrl: ${{ needs.get-environment-variables.outputs.url }}dashboard/
|
||||||
CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }}
|
CYPRESS_USER_NAME: ${{ secrets.CYPRESS_USER_NAME }}
|
||||||
CYPRESS_SECOND_USER_NAME: ${{ secrets.CYPRESS_SECOND_USER_NAME }}
|
CYPRESS_SECOND_USER_NAME: ${{ secrets.CYPRESS_SECOND_USER_NAME }}
|
||||||
CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }}
|
CYPRESS_USER_PASSWORD: ${{ secrets.CYPRESS_USER_PASSWORD }}
|
||||||
|
@ -219,13 +234,14 @@ jobs:
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CYPRESS_mailHogUrl: ${{ secrets.CYPRESS_MAILHOG }}
|
CYPRESS_mailHogUrl: ${{ secrets.CYPRESS_MAILHOG }}
|
||||||
COMMIT_INFO_MESSAGE: Critical triggered via release - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}, ${{github.event.client_payload.pullRequestUrl}}
|
COMMIT_INFO_MESSAGE: Triggered via release - ${{github.event.client_payload.project}} ${{github.event.client_payload.version}}, ${{github.event.client_payload.pullRequestUrl}}
|
||||||
CYPRESS_grepTags: '@stable'
|
CYPRESS_grepTags: ${{steps.set-tag-for-tests.outputs.TEST_TAG}}
|
||||||
with:
|
with:
|
||||||
parallel: true
|
parallel: true
|
||||||
group: 'UI - Chrome'
|
group: 'UI - Chrome'
|
||||||
record: true
|
record: true
|
||||||
tag: ${{github.event.client_payload.project}}, ${{github.event.client_payload.environment}}, Critical, ${{ needs.get-url.outputs.url }}
|
tag: ${{github.event.client_payload.project}}, ${{github.event.client_payload.environment}}, ${{ needs.get-environment-variables.outputs.url }}
|
||||||
|
|
||||||
|
|
||||||
add-review-and-merge-patch:
|
add-review-and-merge-patch:
|
||||||
if: ${{ always() && (needs.run-tests-on-release.outputs.status == 'success' || needs.run-tests-on-release.outputs.status == 'failure') }}
|
if: ${{ always() && (needs.run-tests-on-release.outputs.status == 'success' || needs.run-tests-on-release.outputs.status == 'failure') }}
|
||||||
|
|
|
@ -93,7 +93,7 @@ describe("As a staff user I want to manage apps", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create app. TC: SALEOR_3001",
|
"should be able to create app. TC: SALEOR_3001",
|
||||||
{ tags: ["@app", "@allEnv", "@stable"] },
|
{ tags: ["@app", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const randomAppName = `${startsWith}${faker.datatype.number()}`;
|
const randomAppName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ describe("As an admin I want to manage categories", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create category. TC: SALEOR_0201",
|
"should be able to create category. TC: SALEOR_0201",
|
||||||
{ tags: ["@category", "@allEnv"] },
|
{ tags: ["@category", "@allEnv", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const categoryName = `${startsWith}${faker.datatype.number()}`;
|
const categoryName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ describe("As an admin I want to manage collections.", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should create published collection. TC: SALEOR_0302",
|
"should create published collection. TC: SALEOR_0302",
|
||||||
{ tags: ["@collection", "@allEnv", "@stable"] },
|
{ tags: ["@collection", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const collectionName = `${startsWith}${faker.datatype.number()}`;
|
const collectionName = `${startsWith}${faker.datatype.number()}`;
|
||||||
let collection;
|
let collection;
|
||||||
|
|
|
@ -49,7 +49,7 @@ describe("As an unlogged customer I want to order physical and digital products"
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should purchase digital product as unlogged customer. TC: SALEOR_0402",
|
"should purchase digital product as unlogged customer. TC: SALEOR_0402",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createAndCompleteCheckoutWithoutShipping({
|
createAndCompleteCheckoutWithoutShipping({
|
||||||
channelSlug: defaultChannel.slug,
|
channelSlug: defaultChannel.slug,
|
||||||
|
@ -73,7 +73,7 @@ describe("As an unlogged customer I want to order physical and digital products"
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should purchase physical product as unlogged customer. TC: SALEOR_0403",
|
"should purchase physical product as unlogged customer. TC: SALEOR_0403",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createWaitingForCaptureOrder({
|
createWaitingForCaptureOrder({
|
||||||
channelSlug: defaultChannel.slug,
|
channelSlug: defaultChannel.slug,
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe("Manage products stocks in checkout", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should not be possible to add product with quantity greater than stock to checkout. TC: SALEOR_0405",
|
"should not be possible to add product with quantity greater than stock to checkout. TC: SALEOR_0405",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createCheckout({
|
createCheckout({
|
||||||
channelSlug: defaultChannel.slug,
|
channelSlug: defaultChannel.slug,
|
||||||
|
@ -85,7 +85,7 @@ describe("Manage products stocks in checkout", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should buy product with no quantity if tracking is not set. TC: SALEOR_0406",
|
"should buy product with no quantity if tracking is not set. TC: SALEOR_0406",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createWaitingForCaptureOrder({
|
createWaitingForCaptureOrder({
|
||||||
address,
|
address,
|
||||||
|
@ -101,7 +101,7 @@ describe("Manage products stocks in checkout", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should create checkout with last product in stock. TC: SALEOR_0419",
|
"should create checkout with last product in stock. TC: SALEOR_0419",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createWaitingForCaptureOrder({
|
createWaitingForCaptureOrder({
|
||||||
address,
|
address,
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe("Warehouses in checkout", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should not be possible to buy product for country not listed in warehouse",
|
"should not be possible to buy product for country not listed in warehouse",
|
||||||
{ tags: ["@checkout", "@allEnv", "@stable"] },
|
{ tags: ["@checkout", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.clearSessionData().loginUserViaRequest();
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
deleteShippingStartsWith(startsWith);
|
deleteShippingStartsWith(startsWith);
|
||||||
|
|
|
@ -66,7 +66,7 @@ describe("As an admin I want to create product attribute", () => {
|
||||||
attributesTypes.forEach(attributeType => {
|
attributesTypes.forEach(attributeType => {
|
||||||
it(
|
it(
|
||||||
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
`should be able to create ${attributeType.type} attribute. TC:${attributeType.testCase}`,
|
||||||
{ tags: ["@attribute", "@allEnv", "@stable"] },
|
{ tags: ["@attribute", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
const attributeName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe("Tests for customer", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should create customer. TC: SALEOR_1201",
|
"should create customer. TC: SALEOR_1201",
|
||||||
{ tags: ["@customer", "@allEnv", "@stable"] },
|
{ tags: ["@customer", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const randomName = `${startsWith}${faker.datatype.number()}`;
|
const randomName = `${startsWith}${faker.datatype.number()}`;
|
||||||
const email = `${randomName}@example.com`;
|
const email = `${randomName}@example.com`;
|
||||||
|
|
|
@ -25,7 +25,7 @@ describe("As an admin I want to create product types", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create product type without shipping required. TC: SALEOR_1501",
|
"should be able to create product type without shipping required. TC: SALEOR_1501",
|
||||||
{ tags: ["@productType", "@allEnv", "@stable"] },
|
{ tags: ["@productType", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,6 @@ describe("As a staff user I want to create shipping zone and rate", () => {
|
||||||
let secondVariantsList;
|
let secondVariantsList;
|
||||||
let warehouse;
|
let warehouse;
|
||||||
let attribute;
|
let attribute;
|
||||||
let category;
|
|
||||||
let productType;
|
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.clearSessionData().loginUserViaRequest();
|
cy.clearSessionData().loginUserViaRequest();
|
||||||
|
@ -68,8 +66,6 @@ describe("As a staff user I want to create shipping zone and rate", () => {
|
||||||
attribute: attributeResp,
|
attribute: attributeResp,
|
||||||
}) => {
|
}) => {
|
||||||
attribute = attributeResp;
|
attribute = attributeResp;
|
||||||
category = categoryResp;
|
|
||||||
productType = productTypeResp;
|
|
||||||
|
|
||||||
productsUtils.createProductInChannel({
|
productsUtils.createProductInChannel({
|
||||||
name,
|
name,
|
||||||
|
@ -108,7 +104,7 @@ describe("As a staff user I want to create shipping zone and rate", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create price based shipping method. TC: SALEOR_0803",
|
"should be able to create price based shipping method. TC: SALEOR_0803",
|
||||||
{ tags: ["@shipping", "@allEnv", "@stable"] },
|
{ tags: ["@shipping", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const shippingName = `${startsWith}${faker.datatype.number()}`;
|
const shippingName = `${startsWith}${faker.datatype.number()}`;
|
||||||
cy.clearSessionData().loginUserViaRequest(
|
cy.clearSessionData().loginUserViaRequest(
|
||||||
|
|
|
@ -44,7 +44,7 @@ describe("As an admin I want to manage warehouses", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create warehouse. TC: SALEOR_1101",
|
"should be able to create warehouse. TC: SALEOR_1101",
|
||||||
{ tags: ["@warehouse", "@allEnv", "@stable"] },
|
{ tags: ["@warehouse", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
cy.visit(urlList.warehouses)
|
cy.visit(urlList.warehouses)
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { expectWelcomeMessageIncludes } from "../../support/pages/homePage";
|
||||||
describe("Displaying welcome message on home page", () => {
|
describe("Displaying welcome message on home page", () => {
|
||||||
it(
|
it(
|
||||||
"should display user name on home page",
|
"should display user name on home page",
|
||||||
{ tags: ["@homePage", "@allEnv", "@stable"] },
|
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.loginUserViaRequest().visit(urlList.homePage);
|
cy.loginUserViaRequest().visit(urlList.homePage);
|
||||||
expectWelcomeMessageIncludes(
|
expectWelcomeMessageIncludes(
|
||||||
|
@ -19,7 +19,7 @@ describe("Displaying welcome message on home page", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should display user email on home page",
|
"should display user email on home page",
|
||||||
{ tags: ["@homePage", "@allEnv", "@stable"] },
|
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME).visit(urlList.homePage);
|
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME).visit(urlList.homePage);
|
||||||
expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`);
|
expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`);
|
||||||
|
@ -28,7 +28,7 @@ describe("Displaying welcome message on home page", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should refresh page without errors",
|
"should refresh page without errors",
|
||||||
{ tags: ["@homePage", "@allEnv", "@stable"] },
|
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.loginUserViaRequest()
|
cy.loginUserViaRequest()
|
||||||
.visit(urlList.homePage)
|
.visit(urlList.homePage)
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe("User authorization", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should successfully log in an user",
|
"should successfully log in an user",
|
||||||
{ tags: ["@login", "@allEnv", "@stable"] },
|
{ tags: ["@login", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.homePage);
|
cy.visit(urlList.homePage);
|
||||||
cy.loginUser();
|
cy.loginUser();
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe("As a staff user I want to navigate through shop using different permis
|
||||||
if (key !== "all") {
|
if (key !== "all") {
|
||||||
it(
|
it(
|
||||||
`should be able to navigate through shop as a staff member using ${key} permission. ${permissionsOptions[key].testCase}`,
|
`should be able to navigate through shop as a staff member using ${key} permission. ${permissionsOptions[key].testCase}`,
|
||||||
{ tags: ["@allEnv", "@navigation", "@stable"] },
|
{ tags: ["@allEnv", "@navigation", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const permissionOption = permissionsOptions[key];
|
const permissionOption = permissionsOptions[key];
|
||||||
const permissions = permissionOption.permissions;
|
const permissions = permissionOption.permissions;
|
||||||
|
@ -85,7 +85,7 @@ describe("As a staff user I want to navigate through shop using different permis
|
||||||
|
|
||||||
it(
|
it(
|
||||||
`should be able to navigate through shop as a staff member using all permissions. ${permissionsOptions.all.testCase}`,
|
`should be able to navigate through shop as a staff member using all permissions. ${permissionsOptions.all.testCase}`,
|
||||||
{ tags: ["@critical", "@allEnv", "@navigation", "@stable"] },
|
{ tags: ["@critical", "@allEnv", "@navigation", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const permissionOption = permissionsOptions.all;
|
const permissionOption = permissionsOptions.all;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ describe("Orders", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should create order with selected channel. TC: SALEOR_2104",
|
"should create order with selected channel. TC: SALEOR_2104",
|
||||||
{ tags: ["@orders", "@allEnv", "@stable"] },
|
{ tags: ["@orders", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
cy.visit(urlList.orders)
|
cy.visit(urlList.orders)
|
||||||
.get(ORDERS_SELECTORS.createOrder)
|
.get(ORDERS_SELECTORS.createOrder)
|
||||||
|
@ -125,7 +125,7 @@ describe("Orders", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should not be possible to change channel in order. TC: SALEOR_2105",
|
"should not be possible to change channel in order. TC: SALEOR_2105",
|
||||||
{ tags: ["@orders", "@allEnv", "@stable"] },
|
{ tags: ["@orders", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
createOrder({
|
createOrder({
|
||||||
customerId: customer.id,
|
customerId: customer.id,
|
||||||
|
@ -145,7 +145,7 @@ describe("Orders", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should cancel fulfillment. TC: SALEOR_2106",
|
"should cancel fulfillment. TC: SALEOR_2106",
|
||||||
{ tags: ["@orders", "@allEnv", "@stable"] },
|
{ tags: ["@orders", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
let order;
|
let order;
|
||||||
createFulfilledOrder({
|
createFulfilledOrder({
|
||||||
|
@ -184,7 +184,7 @@ describe("Orders", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should make a refund. TC: 2107",
|
"should make a refund. TC: 2107",
|
||||||
{ tags: ["@orders", "@allEnv", "@stable"] },
|
{ tags: ["@orders", "@allEnv", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
let order;
|
let order;
|
||||||
createReadyToFulfillOrder({
|
createReadyToFulfillOrder({
|
||||||
|
|
|
@ -63,7 +63,7 @@ describe("As an admin I should be able to create product", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create product with variants as an admin. SALEOR_2701",
|
"should be able to create product with variants as an admin. SALEOR_2701",
|
||||||
{ tags: ["@products", "@allEnv", "@critical", "@stable"] },
|
{ tags: ["@products", "@allEnv", "@critical", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const randomName = `${startsWith}${faker.datatype.number()}`;
|
const randomName = `${startsWith}${faker.datatype.number()}`;
|
||||||
seo.slug = randomName;
|
seo.slug = randomName;
|
||||||
|
@ -99,7 +99,7 @@ describe("As an admin I should be able to create product", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create product without variants as an admin. SALEOR_2702",
|
"should be able to create product without variants as an admin. SALEOR_2702",
|
||||||
{ tags: ["@products", "@allEnv", "@critical", "@stable"] },
|
{ tags: ["@products", "@allEnv", "@critical", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const prices = { sellingPrice: 6, costPrice: 3 };
|
const prices = { sellingPrice: 6, costPrice: 3 };
|
||||||
const randomName = `${startsWith}${faker.datatype.number()}`;
|
const randomName = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
|
@ -60,7 +60,7 @@ describe("As an admin I should be able to create variant", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create variant visible for the customers in all channels. TC: SALEOR_2901",
|
"should be able to create variant visible for the customers in all channels. TC: SALEOR_2901",
|
||||||
{ tags: ["@variants", "@allEnv", "@critical", "@stable"] },
|
{ tags: ["@variants", "@allEnv", "@critical", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
const price = 10;
|
const price = 10;
|
||||||
|
@ -113,7 +113,7 @@ describe("As an admin I should be able to create variant", () => {
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"should be able to create several variants visible for the customers. TC: SALEOR_2902",
|
"should be able to create several variants visible for the customers. TC: SALEOR_2902",
|
||||||
{ tags: ["@variants", "@allEnv", "@critical", "@stable"] },
|
{ tags: ["@variants", "@allEnv", "@critical", "@stable", "@oldRelease"] },
|
||||||
() => {
|
() => {
|
||||||
const name = `${startsWith}${faker.datatype.number()}`;
|
const name = `${startsWith}${faker.datatype.number()}`;
|
||||||
const secondVariantSku = `${startsWith}${faker.datatype.number()}`;
|
const secondVariantSku = `${startsWith}${faker.datatype.number()}`;
|
||||||
|
|
Loading…
Reference in a new issue