Skip to content

Commit

Permalink
added tags with pools and implemented running by tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Celiant committed Jul 4, 2024
1 parent e39bafc commit 4ec65c3
Show file tree
Hide file tree
Showing 141 changed files with 147 additions and 151 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/api-manual.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Guardian CI API Tests(Manual)
on:
workflow_dispatch:
inputs:
tags:
type: string
description: Tags for run(smoke, accounts, firstPool and etc.)
default: 'all'
description: 'Manual run'

jobs:
Expand Down Expand Up @@ -108,7 +113,7 @@ jobs:
run: |
pushd e2e-tests
npm install --force
npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }}" --spec cypress/e2e/api-tests/**/*.cy.js
npx cypress run --env "portApi=3002,operatorId=${{ secrets.CI_HEDERA_ACCOUNT }},operatorKey=${{ secrets.CI_HEDERA_PRIV_KEY }}" grepTags=${{ inputs.tags }},grepFilterSpecs=true --spec cypress/e2e/api-tests/**/*.cy.js
popd
- name: Publish API Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/accounts/getAccounts.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Accounts", { tags: '@accounts' },() => {
context("Accounts", { tags: ['accounts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");

it("Get list of users", () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/accounts/getBalance.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Accounts", { tags: '@accounts' }, () => {
context("Accounts", { tags: ['accounts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
it("Get Standard Registry balance", () => {
cy.request({
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/accounts/getSession.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context('Accounts', { tags: '@accounts' }, () => {
context('Accounts', { tags: ['accounts', 'firstPool'] }, () => {
const authorization = Cypress.env('authorization');


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Accounts", { tags: '@accounts' }, () => {
context("Accounts", { tags: ['accounts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");

it("Get list of Standard Registries", () => {
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/accounts/postLogin.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";


context('Accounts', { tags: '@accounts' }, () => {
context('Accounts', { tags: ['accounts', 'firstPool'] }, () => {
it('Login as Standard Registry', { tags: ['smoke'] }, () => {
const username = "StandardRegistry";
cy.request({
Expand Down
6 changes: 2 additions & 4 deletions e2e-tests/cypress/e2e/api-tests/accounts/postRegister.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Accounts", { tags: ['accounts'] }, () => {
it("Register and login as new user", { tags: ['smoke'] }, () => {
context("Accounts", { tags: ['accounts', 'firstPool'] }, () => {
it("Register and login as new user", { tags: ['smoke', 'firstPool'] }, () => {
const name = Math.floor(Math.random() * 999) + "PostRegTest";
cy.request({
method: METHOD.POST,
Expand Down Expand Up @@ -78,7 +78,6 @@ context("Accounts", { tags: ['accounts'] }, () => {
});
});


it('Register with invalid type of username - Negative', () => {
cy.request({
method: METHOD.POST,
Expand Down Expand Up @@ -138,7 +137,6 @@ context("Accounts", { tags: ['accounts'] }, () => {
});
});


it('Register with extra data - Negative', () => {
const name = Math.floor(Math.random() * 999) + "test001";
cy.request({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Analytics", { tags: '@analytics' }, () => {
context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let moduleId1, moduleId2
before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Analytics", { tags: '@analytics' }, () => {
context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let policyId1, policyId2
before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Analytics", { tags: '@analytics' }, () => {
context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let schemaId1, schemaId2
before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Analytics", { tags: '@analytics' }, () => {
context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let toolId1, toolId2
before(() => {
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/analytics/search.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Analytics", { tags: '@analytics' }, () => {
context("Analytics", { tags: ['analytics', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let policyId

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Artifacts", { tags: "@artifacts" }, () => {
context("Artifacts", { tags: ['artifacts', 'secondPool'] }, () => {

const authorization = Cypress.env("authorization");
let artifactId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Artifacts", { tags: '@artifacts' },() => {
context("Artifacts", { tags: ['artifacts', 'secondPool'] },() => {
const authorization = Cypress.env("authorization");

before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Artifacts", { tags: "@artifacts" }, () => {
context("Artifacts", { tags: ['artifacts', 'secondPool'] }, () => {
const authorization = Cypress.env("authorization");
let policyId

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {

const authorization = Cypress.env("authorization");
const optionKey = "option";
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/contracts/clearPools.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {

const authorization = Cypress.env("authorization");
const optionKey = "option";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const optionKey = "option";
let username = Math.floor(Math.random() * 99999) + "UserContReqTests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const optionKey = "option";
let username = Math.floor(Math.random() * 99999) + "UserContReqTests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
before(() => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
let contractIdR, contractIdW;
let contractIdHedW;
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/contracts/getPools.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests";
const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' },() => {
context("Contracts", { tags: ['contracts', 'firstPool'] },() => {
const authorization = Cypress.env("authorization");
const username = Math.floor(Math.random() * 999) + "User";
const contractNameR = Math.floor(Math.random() * 999) + "RCon4RequestsTests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {

const authorization = Cypress.env("authorization");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const importedContractName = Math.floor(Math.random() * 999) + "Con4Import";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' },() => {
context("Contracts", { tags: ['contracts', 'firstPool'] },() => {
const authorization = Cypress.env("authorization");
const contractNameR = Math.floor(Math.random() * 999) + "APIContractR";
const contractNameW = Math.floor(Math.random() * 999) + "APIContractW";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
let contractIdR, contractIdW
before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const optionKey = "option";
let username = Math.floor(Math.random() * 99999) + "UserContReqTests";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const username = "Verra";
let contractIdR, contractIdW, hederaIdVerra, contractUuidR, contractUuidW, contractIdWVerra, contractIdRVerra;
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/contracts/setPools.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests";
const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests";
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/contracts/syncPools.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Contracts", { tags: '@contracts' }, () => {
context("Contracts", { tags: ['contracts', 'firstPool'] }, () => {
const authorization = Cypress.env("authorization");
const contractNameR = Math.floor(Math.random() * 999) + "RCon4GetPoolsTests";
const contractNameW = Math.floor(Math.random() * 999) + "WCon4GetPoolsTests";
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/demo/getRandomKey.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Demo", { tags: '@demo' }, () => {
context("Demo", { tags: ['demo', 'secondPool'] }, () => {
const authorization = Cypress.env("authorization");

it("Generates a new Hedera account with a random private key", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Demo", { tags: '@demo' }, () => {
context("Demo", { tags: ['demo', 'secondPool'] }, () => {

it("Returns list of registered users", () => {
cy.request({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("External", { tags: '@external' }, () => {
context("External", { tags: ['external', 'thirdPool'] }, () => {

const authorization = Cypress.env("authorization");
let policyTag, owner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("IPFS", { tags: '@ipfs' }, () => {
context("IPFS", { tags: ['ipfs', 'secondPool'] }, () => {
const authorization = Cypress.env("authorization");
let cid

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("IPFS", { tags: '@ipfs' }, () => {
context("IPFS", { tags: ['ipfs', 'secondPool'] }, () => {

const authorization = Cypress.env("authorization");
let cid, policyId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Logs", { tags: '@logs' }, () => {
context("Logs", { tags: ['logs', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let workerName, workersNumber;

Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/cypress/e2e/api-tests/modules/deleteModule.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Modules", { tags: "@modules" }, () => {
context("Modules", { tags: ['modules', 'thirdPool'] }, () => {
const authorization = Cypress.env("authorization");
let moduleId;
const moduleName = Math.floor(Math.random() * 999) + "APIModule";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Modules", { tags: '@modules' },() => {
context("Modules", { tags: ['modules', 'thirdPool'] },() => {
const authorization = Cypress.env("authorization");
const moduleName = Math.floor(Math.random() * 999) + "APIModuleExp";
let moduleUuid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Modules", { tags: '@modules' },() => {
context("Modules", { tags: ['modules', 'thirdPool'] },() => {
const authorization = Cypress.env("authorization");
const moduleName = Math.floor(Math.random() * 999) + "APIModuleExp";
let moduleUuid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { METHOD, STATUS_CODE } from "../../../support/api/api-const";
import API from "../../../support/ApiUrls";

context("Modules", { tags: '@modules' },() => {
context("Modules", { tags: ['modules', 'thirdPool'] },() => {
const authorization = Cypress.env("authorization");
it("Get list of modules", () => {
cy.request({
Expand Down
Loading

0 comments on commit 4ec65c3

Please sign in to comment.