test: Cypress - separated exclude airgap cases and tagged them (#30588)
## Description > Moved the it blocks which has exclude airgap tag in app/client/cypress/e2e/Regression/ClientSide/AdminSettings/Admin_settings_spec.js and app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js to a new file app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_3_spec.ts and tagged them #### Type of change - Bug fix (non-breaking change which fixes an issue) #### 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 - **Tests** - Improved tagging consistency across test suites for better categorization and exclusion control. - **Chores** - Removed outdated test cases related to authentication page redirections, release notes access, tab redirections, and button states. - **Refactor** - Introduced new test scenarios for admin settings, including authentication and configuration link redirections. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
e9610b5ace
commit
ba6c095167
|
|
@ -45,28 +45,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
|
||||||
cy.wait("@getEnvVariables");
|
cy.wait("@getEnvVariables");
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
|
||||||
"4. Should test that settings page tab redirects",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
agHelper.VisitNAssert("/applications", "getReleaseItems");
|
|
||||||
cy.get(".admin-settings-menu-option").click();
|
|
||||||
cy.wait("@getEnvVariables");
|
|
||||||
cy.get(adminsSettings.generalTab).click();
|
|
||||||
cy.url().should("contain", "/settings/general");
|
|
||||||
cy.get(adminsSettings.advancedTab).click();
|
|
||||||
cy.url().should("contain", "/settings/advanced");
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication");
|
|
||||||
cy.get(adminsSettings.emailTab).click();
|
|
||||||
cy.url().should("contain", "/settings/email");
|
|
||||||
cy.get(adminsSettings.developerSettingsTab).click();
|
|
||||||
cy.url().should("contain", "/settings/developer-settings");
|
|
||||||
cy.get(adminsSettings.versionTab).click();
|
|
||||||
cy.url().should("contain", "/settings/version");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"airgap",
|
"airgap",
|
||||||
"4. Should test that settings page tab redirects and developer settings doesn't exist - airgap",
|
"4. Should test that settings page tab redirects and developer settings doesn't exist - airgap",
|
||||||
|
|
@ -91,25 +69,6 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
|
||||||
"5. Should test that authentication page redirects",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication");
|
|
||||||
cy.get(adminsSettings.googleButton).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication/google-auth");
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication");
|
|
||||||
cy.get(adminsSettings.githubButton).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication/github-auth");
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication");
|
|
||||||
cy.get(adminsSettings.formloginButton).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication/form-login");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"airgap",
|
"airgap",
|
||||||
|
|
@ -145,26 +104,8 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
|
||||||
"7. Should test that configure link redirects to github signup setup doc",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication");
|
|
||||||
cy.get(adminsSettings.githubButton).click();
|
|
||||||
cy.url().should("contain", "/settings/authentication/github-auth");
|
|
||||||
cy.get(adminsSettings.readMoreLink).within(() => {
|
|
||||||
cy.get("a")
|
|
||||||
.should("have.attr", "target", "_blank")
|
|
||||||
.invoke("removeAttr", "target")
|
|
||||||
.click();
|
|
||||||
cy.url().should("contain", GITHUB_SIGNUP_SETUP_DOC);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it("8. Should test save and clear buttons disabled state", () => {
|
it("7. Should test save and clear buttons disabled state", () => {
|
||||||
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
||||||
const assertVisibilityAndDisabledState = () => {
|
const assertVisibilityAndDisabledState = () => {
|
||||||
cy.get(adminsSettings.saveButton).should("be.visible");
|
cy.get(adminsSettings.saveButton).should("be.visible");
|
||||||
|
|
@ -183,7 +124,7 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
|
||||||
assertVisibilityAndDisabledState();
|
assertVisibilityAndDisabledState();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("9. Should test saving a setting value", () => {
|
it("8. Should test saving a setting value", () => {
|
||||||
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
||||||
|
|
||||||
cy.get(adminsSettings.restartNotice).should("not.exist");
|
cy.get(adminsSettings.restartNotice).should("not.exist");
|
||||||
|
|
@ -205,7 +146,7 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("10.Should test saving settings value from different tabs", () => {
|
it("9.Should test saving settings value from different tabs", () => {
|
||||||
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
agHelper.VisitNAssert("/settings/general", "getEnvVariables");
|
||||||
cy.get(adminsSettings.restartNotice).should("not.exist");
|
cy.get(adminsSettings.restartNotice).should("not.exist");
|
||||||
cy.get(adminsSettings.instanceName).should("be.visible");
|
cy.get(adminsSettings.instanceName).should("be.visible");
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import EditorNavigation, {
|
||||||
|
|
||||||
describe(
|
describe(
|
||||||
"Fix UQI query switching",
|
"Fix UQI query switching",
|
||||||
{ tags: ["@tag.Datasource", " @tag.excludeForAirgap"] },
|
{ tags: ["@tag.Datasource", "@tag.excludeForAirgap"] },
|
||||||
function () {
|
function () {
|
||||||
it("1. The command of the Mongo query must be preserved and should not default to initial value after changed.", function () {
|
it("1. The command of the Mongo query must be preserved and should not default to initial value after changed.", function () {
|
||||||
dataSources.NavigateToDSCreateNew();
|
dataSources.NavigateToDSCreateNew();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import EditorNavigation, {
|
||||||
|
|
||||||
describe(
|
describe(
|
||||||
"Widget property navigation",
|
"Widget property navigation",
|
||||||
{ tags: ["@tag.Widget", " @tag.excludeForAirgap"] },
|
{ tags: ["@tag.Widget", "@tag.excludeForAirgap"] },
|
||||||
() => {
|
() => {
|
||||||
it("1. Collapsed field navigation", () => {
|
it("1. Collapsed field navigation", () => {
|
||||||
_.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.AUDIO);
|
_.entityExplorer.DragDropWidgetNVerify(_.draggableWidgets.AUDIO);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import * as _ from "../../../../support/Objects/ObjectsCore";
|
import * as _ from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Help Button on editor", function () {
|
describe(
|
||||||
it(
|
"Help Button on editor",
|
||||||
"excludeForAirgap",
|
{ tags: ["@tag.excludeForAirgap"] },
|
||||||
"1. Chat with us and Intercom consent should be visible on Help Menu",
|
function () {
|
||||||
() => {
|
it("1. Chat with us and Intercom consent should be visible on Help Menu", () => {
|
||||||
_.agHelper.GetNClick(
|
_.agHelper.GetNClick(
|
||||||
_.debuggerHelper.locators._helpButton,
|
_.debuggerHelper.locators._helpButton,
|
||||||
0,
|
0,
|
||||||
|
|
@ -22,6 +22,6 @@ describe("Help Button on editor", function () {
|
||||||
"Can we have your email for better support?",
|
"Can we have your email for better support?",
|
||||||
"contain.text",
|
"contain.text",
|
||||||
);
|
);
|
||||||
},
|
});
|
||||||
);
|
},
|
||||||
});
|
);
|
||||||
|
|
|
||||||
|
|
@ -69,28 +69,6 @@ describe("Admin settings page", { tags: ["@tag.IDE"] }, function () {
|
||||||
cy.url().should("contain", routes.GENERAL);
|
cy.url().should("contain", routes.GENERAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
|
||||||
"5. should test that settings page tab redirects not airgap",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
cy.visit(routes.APPLICATIONS, { timeout: 60000 });
|
|
||||||
cy.wait(3000);
|
|
||||||
cy.get(".admin-settings-menu-option").click();
|
|
||||||
cy.get(adminsSettings.generalTab).click();
|
|
||||||
cy.url().should("contain", routes.GENERAL);
|
|
||||||
cy.get(adminsSettings.advancedTab).click();
|
|
||||||
cy.url().should("contain", routes.ADVANCED);
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.emailTab).click();
|
|
||||||
cy.url().should("contain", routes.EMAIL);
|
|
||||||
cy.get(adminsSettings.developerSettingsTab).click();
|
|
||||||
cy.url().should("contain", routes.DEVELOPER_SETTINGS);
|
|
||||||
cy.get(adminsSettings.versionTab).click();
|
|
||||||
cy.url().should("contain", routes.VERSION);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"airgap",
|
"airgap",
|
||||||
"5. should test that settings page tab redirects and google maps doesn't exist - airgap",
|
"5. should test that settings page tab redirects and google maps doesn't exist - airgap",
|
||||||
|
|
|
||||||
|
|
@ -34,26 +34,6 @@ describe("Admin settings page", { tags: ["@tag.IDE"] }, function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(
|
|
||||||
"excludeForAirgap",
|
|
||||||
"2. should test that authentication page redirects",
|
|
||||||
() => {
|
|
||||||
cy.visit(routes.GENERAL, { timeout: 60000 });
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.googleButton).click();
|
|
||||||
cy.url().should("contain", routes.GOOGLEAUTH);
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.githubButton).click();
|
|
||||||
cy.url().should("contain", routes.GITHUBAUTH);
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.formloginButton).click();
|
|
||||||
cy.url().should("contain", routes.FORMLOGIN);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"airgap",
|
"airgap",
|
||||||
"2. should test that authentication page redirects and google and github auth doesn't exist - airgap",
|
"2. should test that authentication page redirects and google and github auth doesn't exist - airgap",
|
||||||
|
|
@ -68,70 +48,6 @@ describe("Admin settings page", { tags: ["@tag.IDE"] }, function () {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
it(
|
|
||||||
"3. should test that configure link redirects to google signup setup doc",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
cy.visit(routes.GENERAL, { timeout: 60000 });
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.googleButton).click();
|
|
||||||
cy.url().should("contain", routes.GOOGLEAUTH);
|
|
||||||
cy.get(adminsSettings.readMoreLink).within(() => {
|
|
||||||
cy.get("a")
|
|
||||||
.should("have.attr", "target", "_blank")
|
|
||||||
.invoke("removeAttr", "target")
|
|
||||||
.click()
|
|
||||||
.wait(3000); //for page to load fully;
|
|
||||||
cy.url().should("contain", GOOGLE_SIGNUP_SETUP_DOC);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
|
||||||
"4. should test that configure link redirects to github signup setup doc",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
cy.visit(routes.GENERAL, { timeout: 60000 });
|
|
||||||
cy.get(adminsSettings.authenticationTab).click();
|
|
||||||
cy.url().should("contain", routes.AUTHENTICATION);
|
|
||||||
cy.get(adminsSettings.githubButton).click();
|
|
||||||
cy.url().should("contain", routes.GITHUBAUTH);
|
|
||||||
cy.get(adminsSettings.readMoreLink).within(() => {
|
|
||||||
cy.get("a")
|
|
||||||
.should("have.attr", "target", "_blank")
|
|
||||||
.invoke("removeAttr", "target")
|
|
||||||
.click()
|
|
||||||
.wait(3000); //for page to load fully
|
|
||||||
cy.url().should("contain", GITHUB_SIGNUP_SETUP_DOC);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
|
||||||
"5. should test that read more on version opens up release notes",
|
|
||||||
{ tags: ["@tag.excludeForAirgap"] },
|
|
||||||
() => {
|
|
||||||
cy.visit(routes.GENERAL, { timeout: 60000 });
|
|
||||||
cy.get(adminsSettings.versionTab).click();
|
|
||||||
cy.url().should("contain", routes.VERSION);
|
|
||||||
cy.get(adminsSettings.readMoreLink).within(() => {
|
|
||||||
cy.get("a").click();
|
|
||||||
});
|
|
||||||
cy.wait(2000);
|
|
||||||
cy.get(".ads-v2-modal__content").should("be.visible");
|
|
||||||
cy.get(".ads-v2-modal__content-header").should("be.visible");
|
|
||||||
cy.get(".ads-v2-modal__content-header").should(
|
|
||||||
"contain",
|
|
||||||
"Product updates",
|
|
||||||
);
|
|
||||||
cy.get(".ads-v2-button__content-icon-start").should("be.visible");
|
|
||||||
cy.get(".ads-v2-button__content-icon-start").click();
|
|
||||||
cy.wait(2000);
|
|
||||||
cy.get(".ads-v2-modal__content").should("not.exist");
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(
|
||||||
"airgap",
|
"airgap",
|
||||||
"5. should test that read more on version is hidden for airgap",
|
"5. should test that read more on version is hidden for airgap",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
/// <reference types="cypress-tags" />
|
||||||
|
import adminsSettings from "../../../../locators/AdminsSettings";
|
||||||
|
import { agHelper } from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
|
const {
|
||||||
|
GITHUB_SIGNUP_SETUP_DOC,
|
||||||
|
GOOGLE_MAPS_SETUP_DOC,
|
||||||
|
GOOGLE_SIGNUP_SETUP_DOC,
|
||||||
|
} = require("../../../../../src/constants/ThirdPartyConstants");
|
||||||
|
|
||||||
|
const routes = {
|
||||||
|
APPLICATIONS: "/applications",
|
||||||
|
SETTINGS: "/settings",
|
||||||
|
GENERAL: "/settings/general",
|
||||||
|
EMAIL: "/settings/email",
|
||||||
|
DEVELOPER_SETTINGS: "/settings/developer-settings",
|
||||||
|
AUTHENTICATION: "/settings/authentication",
|
||||||
|
GOOGLEAUTH: "/settings/authentication/google-auth",
|
||||||
|
GITHUBAUTH: "/settings/authentication/github-auth",
|
||||||
|
FORMLOGIN: "/settings/authentication/form-login",
|
||||||
|
VERSION: "/settings/version",
|
||||||
|
ADVANCED: "/settings/advanced",
|
||||||
|
};
|
||||||
|
|
||||||
|
describe(
|
||||||
|
"Admin settings page",
|
||||||
|
{ tags: ["@tag.IDE", "@tag.excludeForAirgap"] },
|
||||||
|
function () {
|
||||||
|
it("1. should test that authentication page redirects", () => {
|
||||||
|
cy.visit(routes.GENERAL, { timeout: 60000 });
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.googleButton).click();
|
||||||
|
cy.url().should("contain", routes.GOOGLEAUTH);
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.githubButton).click();
|
||||||
|
cy.url().should("contain", routes.GITHUBAUTH);
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.formloginButton).click();
|
||||||
|
cy.url().should("contain", routes.FORMLOGIN);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("2. should test that configure link redirects to google signup setup doc", () => {
|
||||||
|
cy.visit(routes.GENERAL, { timeout: 60000 });
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.googleButton).click();
|
||||||
|
cy.url().should("contain", routes.GOOGLEAUTH);
|
||||||
|
cy.get(adminsSettings.readMoreLink).within(() => {
|
||||||
|
cy.get("a")
|
||||||
|
.should("have.attr", "target", "_blank")
|
||||||
|
.invoke("removeAttr", "target")
|
||||||
|
.click()
|
||||||
|
.wait(3000); //for page to load fully;
|
||||||
|
cy.url().should("contain", GOOGLE_SIGNUP_SETUP_DOC);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("3. should test that configure link redirects to github signup setup doc", () => {
|
||||||
|
cy.visit(routes.GENERAL, { timeout: 60000 });
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.githubButton).click();
|
||||||
|
cy.url().should("contain", routes.GITHUBAUTH);
|
||||||
|
cy.get(adminsSettings.readMoreLink).within(() => {
|
||||||
|
cy.get("a")
|
||||||
|
.should("have.attr", "target", "_blank")
|
||||||
|
.invoke("removeAttr", "target")
|
||||||
|
.click()
|
||||||
|
.wait(3000); //for page to load fully
|
||||||
|
cy.url().should("contain", GITHUB_SIGNUP_SETUP_DOC);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("4. should test that read more on version opens up release notes", () => {
|
||||||
|
cy.visit(routes.GENERAL, { timeout: 60000 });
|
||||||
|
cy.get(adminsSettings.versionTab).click();
|
||||||
|
cy.url().should("contain", routes.VERSION);
|
||||||
|
cy.get(adminsSettings.readMoreLink).within(() => {
|
||||||
|
cy.get("a").click();
|
||||||
|
});
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get(".ads-v2-modal__content").should("be.visible");
|
||||||
|
cy.get(".ads-v2-modal__content-header").should("be.visible");
|
||||||
|
cy.get(".ads-v2-modal__content-header").should(
|
||||||
|
"contain",
|
||||||
|
"Product updates",
|
||||||
|
);
|
||||||
|
cy.get(".ads-v2-button__content-icon-start").should("be.visible");
|
||||||
|
cy.get(".ads-v2-button__content-icon-start").click();
|
||||||
|
cy.wait(2000);
|
||||||
|
cy.get(".ads-v2-modal__content").should("not.exist");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("5. should test that settings page tab redirects not airgap", () => {
|
||||||
|
agHelper.VisitNAssert(routes.APPLICATIONS, "getReleaseItems");
|
||||||
|
cy.get(".admin-settings-menu-option").click();
|
||||||
|
cy.wait("@getEnvVariables");
|
||||||
|
cy.get(adminsSettings.generalTab).click();
|
||||||
|
cy.url().should("contain", routes.GENERAL);
|
||||||
|
cy.get(adminsSettings.advancedTab).click();
|
||||||
|
cy.url().should("contain", routes.ADVANCED);
|
||||||
|
cy.get(adminsSettings.authenticationTab).click();
|
||||||
|
cy.url().should("contain", routes.AUTHENTICATION);
|
||||||
|
cy.get(adminsSettings.emailTab).click();
|
||||||
|
cy.url().should("contain", routes.EMAIL);
|
||||||
|
cy.get(adminsSettings.developerSettingsTab).click();
|
||||||
|
cy.url().should("contain", routes.DEVELOPER_SETTINGS);
|
||||||
|
cy.get(adminsSettings.versionTab).click();
|
||||||
|
cy.url().should("contain", routes.VERSION);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
@ -7,105 +7,113 @@ import {
|
||||||
assertHelper,
|
assertHelper,
|
||||||
} from "../../../../support/Objects/ObjectsCore";
|
} from "../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("excludeForAirgap", "SSO with Github test functionality", function () {
|
describe(
|
||||||
it("1. Go to admin settings and enable Github with not all mandatory fields filled", function () {
|
"SSO with Github test functionality",
|
||||||
homePage.Signout();
|
{ tags: ["@tag.Authentication", "@tag.excludeForAirgap"] },
|
||||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
function () {
|
||||||
adminSettings.NavigateToAdminSettings();
|
it("1. Go to admin settings and enable Github with not all mandatory fields filled", function () {
|
||||||
// click authentication tab
|
homePage.Signout();
|
||||||
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||||
agHelper.AssertURL("/settings/authentication");
|
adminSettings.NavigateToAdminSettings();
|
||||||
assertHelper.AssertContains(
|
// click authentication tab
|
||||||
"Enable",
|
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
||||||
"be.visible",
|
agHelper.AssertURL("/settings/authentication");
|
||||||
adminSettingsLocators.githubButton,
|
assertHelper.AssertContains(
|
||||||
);
|
"Enable",
|
||||||
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
"be.visible",
|
||||||
agHelper.Sleep(2000);
|
adminSettingsLocators.githubButton,
|
||||||
// fill github form
|
);
|
||||||
cy.fillGithubFormPartly();
|
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
||||||
agHelper.AssertElementVisibility(locators._toastMsg);
|
agHelper.Sleep(2000);
|
||||||
agHelper.AssertElementVisibility(
|
// fill github form
|
||||||
locators._specificToast("Mandatory fields cannot be empty"),
|
cy.fillGithubFormPartly();
|
||||||
);
|
agHelper.AssertElementVisibility(locators._toastMsg);
|
||||||
});
|
agHelper.AssertElementVisibility(
|
||||||
|
locators._specificToast("Mandatory fields cannot be empty"),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("2. Go to admin settings and enable Github", function () {
|
it("2. Go to admin settings and enable Github", function () {
|
||||||
homePage.Signout();
|
homePage.Signout();
|
||||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||||
adminSettings.NavigateToAdminSettings();
|
adminSettings.NavigateToAdminSettings();
|
||||||
// click authentication tab
|
// click authentication tab
|
||||||
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
||||||
agHelper.AssertURL("/settings/authentication");
|
agHelper.AssertURL("/settings/authentication");
|
||||||
assertHelper.AssertContains(
|
assertHelper.AssertContains(
|
||||||
"Enable",
|
"Enable",
|
||||||
"be.visible",
|
"be.visible",
|
||||||
adminSettingsLocators.githubButton,
|
adminSettingsLocators.githubButton,
|
||||||
);
|
);
|
||||||
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
||||||
agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
// fill github form
|
// fill github form
|
||||||
cy.fillGithubForm();
|
cy.fillGithubForm();
|
||||||
agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
// assert server is restarting
|
// assert server is restarting
|
||||||
agHelper.AssertElementVisibility(adminSettingsLocators.restartNotice);
|
agHelper.AssertElementVisibility(adminSettingsLocators.restartNotice);
|
||||||
// adding wait for server to restart
|
// adding wait for server to restart
|
||||||
cy.waitUntil(() =>
|
cy.waitUntil(() =>
|
||||||
cy
|
cy
|
||||||
.contains("GitHub authentication", { timeout: 180000 })
|
.contains("GitHub authentication", { timeout: 180000 })
|
||||||
.should("be.visible"),
|
.should("be.visible"),
|
||||||
);
|
);
|
||||||
cy.waitUntil(() => agHelper.AssertElementVisibility(homePage._profileMenu));
|
cy.waitUntil(() =>
|
||||||
homePage.Signout();
|
agHelper.AssertElementVisibility(homePage._profileMenu),
|
||||||
// validating sso with github is enabled
|
);
|
||||||
assertHelper.AssertContains(
|
homePage.Signout();
|
||||||
"Continue with Github",
|
// validating sso with github is enabled
|
||||||
"be.visible",
|
assertHelper.AssertContains(
|
||||||
adminSettingsLocators.loginWithGithub,
|
"Continue with Github",
|
||||||
);
|
"be.visible",
|
||||||
});
|
adminSettingsLocators.loginWithGithub,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("3. Go to admin settings and disable Github", function () {
|
it("3. Go to admin settings and disable Github", function () {
|
||||||
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
homePage.LogintoApp(Cypress.env("USERNAME"), Cypress.env("PASSWORD"));
|
||||||
adminSettings.NavigateToAdminSettings();
|
adminSettings.NavigateToAdminSettings();
|
||||||
// click authentication tab
|
// click authentication tab
|
||||||
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
agHelper.GetNClick(adminSettingsLocators.authenticationTab);
|
||||||
agHelper.AssertURL("/settings/authentication");
|
agHelper.AssertURL("/settings/authentication");
|
||||||
assertHelper.AssertContains(
|
assertHelper.AssertContains(
|
||||||
"Edit",
|
"Edit",
|
||||||
"be.visible",
|
"be.visible",
|
||||||
adminSettingsLocators.githubButton,
|
adminSettingsLocators.githubButton,
|
||||||
);
|
);
|
||||||
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
agHelper.GetNClick(adminSettingsLocators.githubButton);
|
||||||
agHelper.Sleep(2000);
|
agHelper.Sleep(2000);
|
||||||
assertHelper.AssertContains(
|
assertHelper.AssertContains(
|
||||||
"Disconnect",
|
"Disconnect",
|
||||||
"be.visible",
|
"be.visible",
|
||||||
adminSettingsLocators.disconnectBtn,
|
adminSettingsLocators.disconnectBtn,
|
||||||
);
|
);
|
||||||
agHelper.GetNClick(adminSettingsLocators.disconnectBtn);
|
agHelper.GetNClick(adminSettingsLocators.disconnectBtn);
|
||||||
assertHelper.AssertContains(
|
assertHelper.AssertContains(
|
||||||
"Are you sure?",
|
"Are you sure?",
|
||||||
"be.visible",
|
"be.visible",
|
||||||
adminSettingsLocators.disconnectBtn,
|
adminSettingsLocators.disconnectBtn,
|
||||||
);
|
);
|
||||||
agHelper.GetNClick(adminSettingsLocators.disconnectBtn);
|
agHelper.GetNClick(adminSettingsLocators.disconnectBtn);
|
||||||
|
|
||||||
// assert server is restarting
|
// assert server is restarting
|
||||||
agHelper.AssertElementVisibility(adminSettingsLocators.restartNotice);
|
agHelper.AssertElementVisibility(adminSettingsLocators.restartNotice);
|
||||||
// adding wait for server to restart
|
// adding wait for server to restart
|
||||||
cy.waitUntil(() =>
|
cy.waitUntil(() =>
|
||||||
cy
|
cy
|
||||||
.contains("GitHub authentication", { timeout: 180000 })
|
.contains("GitHub authentication", { timeout: 180000 })
|
||||||
.should("be.visible"),
|
.should("be.visible"),
|
||||||
);
|
);
|
||||||
cy.waitUntil(() => agHelper.AssertElementVisibility(homePage._profileMenu));
|
cy.waitUntil(() =>
|
||||||
homePage.Signout();
|
agHelper.AssertElementVisibility(homePage._profileMenu),
|
||||||
// validating sso with github is disabled
|
);
|
||||||
assertHelper.AssertContains(
|
homePage.Signout();
|
||||||
"Continue with Github",
|
// validating sso with github is disabled
|
||||||
"not.exist",
|
assertHelper.AssertContains(
|
||||||
adminSettingsLocators.loginWithGithub,
|
"Continue with Github",
|
||||||
);
|
"not.exist",
|
||||||
});
|
adminSettingsLocators.loginWithGithub,
|
||||||
});
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user