Skip to content

Commit

Permalink
test: Cypress - added @tag.excludeForAirgap, @tag.Templates tags (#29790
Browse files Browse the repository at this point in the history
)

## Description
> Added excludeForAirgap tgs 

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
> running tbp
> /ok-to-test tags="@tag.excludeForAirgap" 

#### How Has This Been Tested?
- [ ] Manual
- [ ] Cypress
>
>

## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Test Enhancements**
- Improved test descriptions and added relevant tags for better
categorization and filtering across various test suites.
- Consolidated test logic and descriptions for clarity and coherence in
test suites.

- **Bug Fixes**
- Updated test cases to reflect accurate scenarios for bugs and feature
testing.
- Adjusted test sequences and assertions for enhanced reliability and
coverage.

- **Refactor**
- Restructured test suites for a more logical flow and clearer
objectives.
- Enhanced test setup steps and assertions for comprehensive validation.

- **Chores**
- Implemented a new tagging functionality for organizing test suites and
cases.
  - Added new tags to the tagging system for improved test management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
sharanya-appsmith authored Dec 27, 2023
1 parent 830ccaa commit 0ce1780
Show file tree
Hide file tree
Showing 53 changed files with 1,494 additions and 1,425 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ jobs:
run: |
yarn install --immutable
- name: Set cypress tags to exclude
if: steps.run_result.outputs.run_result != 'success'
run: |
echo 'tags_to_exclude=airgap' >> "$GITHUB_ENV"
echo "CYPRESS_grepTags=${{ inputs.tags }}" >> $GITHUB_ENV
- name: Print the tags
run: |
echo "tags_to_exclude: ${{ env.tags_to_exclude }}"
echo "_grepTags: ${{ env.CYPRESS_grepTags }}"
- name: Setting up the cypress tests
if: steps.run_result.outputs.run_result != 'success'
shell: bash
Expand Down Expand Up @@ -307,7 +318,7 @@ jobs:
CYPRESS_APPSMITH_OAUTH2_OIDC_JWKS_URL: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_OIDC_JWKS_URL }}
CYPRESS_APPSMITH_OAUTH2_OIDC_OKTA_PASSWORD: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_OIDC_OKTA_PASSWORD }}
CYPRESS_APPSMITH_OAUTH2_OIDC_DIRECT_URL: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_OIDC_DIRECT_URL }}
CYPRESS_EXCLUDE_TAGS: "airgap"
CYPRESS_EXCLUDE_TAGS: ${{ env.tags_to_exclude }}
CYPRESS_AIRGAPPED: false
APPSMITH_DISABLE_TELEMETRY: true
APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }}
Expand All @@ -329,7 +340,7 @@ jobs:
CYPRESS_DB_PWD: ${{ secrets.CYPRESS_DB_PWD }}
CYPRESS_S3_ACCESS: ${{ secrets.CYPRESS_S3_ACCESS }}
CYPRESS_S3_SECRET: ${{ secrets.CYPRESS_S3_SECRET }}
CYPRESS_grepTags: ${{ inputs.tags }} # This is a comma separated list of tags to run a subset of the suite
CYPRESS_grepTags: ${{ env.CYPRESS_grepTags }} # This is a comma separated list of tags to run a subset of the suite
CYPRESS_SKIP_FLAKY: true
CYPRESS_STATIC_ALLOCATION: true
DEBUG: ${{secrets.CYPRESS_GREP_DEBUG }} # This is derived from secrets so that we can toggle it without having to change any workflow. Only acceptable value is: @cypress/grep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
});

it(
"excludeForAirgap",
"4. Should test that settings page tab redirects",
{ tags: ["@tag.excludeForAirgap"] },
() => {
Expand Down Expand Up @@ -93,7 +92,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
);

it(
"excludeForAirgap",
"5. Should test that authentication page redirects",
{ tags: ["@tag.excludeForAirgap"] },
() => {
Expand Down Expand Up @@ -129,7 +127,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
);

it(
"excludeForAirgap",
"6. Should test that configure link redirects to google signup setup doc",
{ tags: ["@tag.excludeForAirgap"] },
() => {
Expand All @@ -149,7 +146,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
);

it(
"excludeForAirgap",
"7. Should test that configure link redirects to github signup setup doc",
{ tags: ["@tag.excludeForAirgap"] },
() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ describe("Autocomplete bug fixes", { tags: ["@tag.JS"] }, function () {
});

it(
"excludeForAirgap",
"7. Installed library should show up in autocomplete",
{ tags: ["@tag.excludeForAirgap"] },
function () {
AppSidebar.navigate(AppSidebarButton.Libraries);
installer.OpenInstaller();
Expand All @@ -106,8 +106,8 @@ describe("Autocomplete bug fixes", { tags: ["@tag.JS"] }, function () {
);

it(
"excludeForAirgap",
"8. No autocomplete for Removed libraries",
{ tags: ["@tag.excludeForAirgap"] },
function () {
entityExplorer.RenameEntityFromExplorer("Text1Copy", "UUIDTEXT");
AppSidebar.navigate(AppSidebarButton.Libraries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const testdata = require("../../../../fixtures/testdata.json");
import * as _ from "../../../../support/Objects/ObjectsCore";

describe(
"excludeForAirgap",
"Binding the Button widget with Text widget using Recpatcha v3",
{ tags: ["@tag.excludeForAirgap", "@tag.Binding"] },
function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,38 @@
import * as _ from "../../../../support/Objects/ObjectsCore";

describe(
"excludeForAirgap",
"Welcome tour spec",
{ tags: ["@tag.excludeForAirgap"] },
function () {
it("1. Bug: 22275: Debugger should not render in preview mode", function () {
//Open debugger
_.agHelper.GetNClick(_.debuggerHelper.locators._debuggerIcon);
//Enter preview mode
_.agHelper.GetNClick(_.locators._enterPreviewMode);
//verify debugger is not present
_.agHelper.AssertElementAbsence(_.locators._errorTab);
//Exit preview mode
_.agHelper.GetNClick(_.locators._exitPreviewMode);
//verify debugger is present
_.agHelper.GetNAssertContains(_.locators._errorTab, "Errors");
});
it("2. Bug: 22281: Debugger should not open by default in welcome tour", function () {
//Get back to application page
_.homePage.NavigateToHome();
_.agHelper.WaitUntilEleAppear(_.homePage._homePageAppCreateBtn);

// Temporary workaround until https://github.com/appsmithorg/appsmith/issues/24665 is fixed
_.agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
_.homePage.CreateNewWorkspace("GuidedtourWorkspace" + uid);
_.homePage.CreateAppInWorkspace(
"GuidedtourWorkspace" + uid,
`GuidedtourApp${uid}`,
);
_.homePage.NavigateToHome();
});
describe("Welcome tour spec", { tags: ["@tag.excludeForAirgap"] }, function () {
it("1. Bug: 22275: Debugger should not render in preview mode", function () {
//Open debugger
_.agHelper.GetNClick(_.debuggerHelper.locators._debuggerIcon);
//Enter preview mode
_.agHelper.GetNClick(_.locators._enterPreviewMode);
//verify debugger is not present
_.agHelper.AssertElementAbsence(_.locators._errorTab);
//Exit preview mode
_.agHelper.GetNClick(_.locators._exitPreviewMode);
//verify debugger is present
_.agHelper.GetNAssertContains(_.locators._errorTab, "Errors");
});
it("2. Bug: 22281: Debugger should not open by default in welcome tour", function () {
//Get back to application page
_.homePage.NavigateToHome();
_.agHelper.WaitUntilEleAppear(_.homePage._homePageAppCreateBtn);

//Start welcome tour
_.agHelper.GetNClick(_.homePage._welcomeTour);
_.agHelper.WaitUntilEleAppear(_.homePage._welcomeTourBuildingButton);
//Verify debugger is not present
_.agHelper.AssertElementAbsence(_.locators._errorTab);
// Temporary workaround until https://github.com/appsmithorg/appsmith/issues/24665 is fixed
_.agHelper.GenerateUUID();
cy.get("@guid").then((uid) => {
_.homePage.CreateNewWorkspace("GuidedtourWorkspace" + uid);
_.homePage.CreateAppInWorkspace(
"GuidedtourWorkspace" + uid,
`GuidedtourApp${uid}`,
);
_.homePage.NavigateToHome();
});
},
);

//Start welcome tour
_.agHelper.GetNClick(_.homePage._welcomeTour);
_.agHelper.WaitUntilEleAppear(_.homePage._welcomeTourBuildingButton);
//Verify debugger is not present
_.agHelper.AssertElementAbsence(_.locators._errorTab);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ const dataSources = ObjectsRegistry.DataSources,
agHelper = ObjectsRegistry.AggregateHelper;

describe(
"excludeForAirgap",
"Bug 18035: Updates save button text on datasource discard popup",
{ tags: ["@tag.Datasource"] },
{ tags: ["@tag.Datasource", "@tag.excludeForAirgap"] },
function () {
it("1. Create gsheet datasource, click on back button, discard popup should contain save and authorize", function () {
dataSources.NavigateToDSCreateNew();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import EditorNavigation, {
let dsName: any, userMock: string, movieMock: string;

describe(
"excludeForAirgap",
"Bug 26716: Datasource selected from entity explorer should be correctly highlighted",
{ tags: ["@tag.Datasource"] },
{ tags: ["@tag.Datasource", "@tag.excludeForAirgap"] },
function () {
it("1. Create users and movies mock datasources and switch between them through entity explorer, check the active state", function () {
dataSources.CreateMockDB("Users").then((mockDBName) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@ import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";

describe(
"Datasource structure schema preview data",
{ tags: ["@tag.Datasource"] },
{ tags: ["@tag.Datasource", "@tag.excludeForAirgap"] },
() => {
before(() => {
featureFlagIntercept({ ab_gsheet_schema_enabled: true });
dataSources.CreateMockDB("Users");
});

it(
"excludeForAirgap",
"1. Verify if the schema table accordions is collapsed in case of search",
() => {
agHelper.TypeText(
dataSources._datasourceStructureSearchInput,
"public.us",
);
agHelper.Sleep(1000);
agHelper.AssertElementAbsence(
`${dataSources._dsStructurePreviewMode} ${dataSources._datasourceSchemaColumn}`,
);
},
);
it("1. Verify if the schema table accordions is collapsed in case of search", () => {
agHelper.TypeText(
dataSources._datasourceStructureSearchInput,
"public.us",
);
agHelper.Sleep(1000);
agHelper.AssertElementAbsence(
`${dataSources._dsStructurePreviewMode} ${dataSources._datasourceSchemaColumn}`,
);
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import EditorNavigation, {
} from "../../../../support/Pages/EditorNavigation";

describe(
"excludeForAirgap",
"Fix UQI query switching",
{ tags: ["@tag.Datasource"] },
{ tags: ["@tag.Datasource", " @tag.excludeForAirgap"] },
function () {
it("1. The command of the Mongo query must be preserved and should not default to initial value after changed.", function () {
dataSources.NavigateToDSCreateNew();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ describe(
});

it(
"excludeForAirgap",
"3. Verify if schema (table and column) exist in query editor and searching works",
{ tags: ["@tag.excludeForAirgap"] },
() => {
agHelper.RefreshPage();
dataSources.CreateMockDB("Users");
Expand All @@ -87,8 +87,8 @@ describe(
);

it(
"excludeForAirgap",
"4. Verify if collapsible opens when refresh button is opened.",
{ tags: ["@tag.excludeForAirgap"] },
() => {
agHelper.RefreshPage();
dataSources.CreateMockDB("Users");
Expand Down
Loading

0 comments on commit 0ce1780

Please sign in to comment.