test: Cypress | App level Import test (non-Gsheet) + CI Stabilize (#27683)
## Description - This PR includes script for App level import for ds - MySql (non Gsheet) - Fixes flaky Replay_Editor_spec.js #### Type of change - Script update (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [X] Cypress ## Checklist: #### QA activity: - [X] Added `Test Plan Approved` label after Cypress tests were reviewed
This commit is contained in:
parent
0e00302317
commit
c3d546d434
4
.github/workflows/ci-test.yml
vendored
4
.github/workflows/ci-test.yml
vendored
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59]
|
||||
job: [0]
|
||||
|
||||
# Service containers to run with this job. Required for running tests
|
||||
services:
|
||||
|
|
@ -315,7 +315,7 @@ jobs:
|
|||
if [[ ${{ inputs.pr }} -ne 0 ]]; then
|
||||
echo "COMMIT_INFO_MESSAGE=${{ env.COMMIT_INFO_MESSAGE }}" >> $GITHUB_ENV
|
||||
else
|
||||
if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then
|
||||
if [[ '${{env.EVENT_COMMITS}}' == 'null' ]]; then
|
||||
echo "COMMIT_INFO_MESSAGE=${{ github.event_name }} by ${{ env.COMMIT_INFO_AUTHOR }}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "COMMIT_INFO_MESSAGE=$(echo \"${{ env.EVENT_COMMITS }}\" | awk -F '\\\\n' '{print $1}' | sed 's/^\"//')" >> $GITHUB_ENV
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import {
|
|||
dataSources,
|
||||
homePage,
|
||||
} from "../../../../support/Objects/ObjectsCore";
|
||||
import reconnectDSLocator from "../../../../locators/ReconnectLocators.js";
|
||||
|
||||
let workspaceId: string;
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ describe("Undo/Redo functionality", function () {
|
|||
cy.get("body").click(0, 0);
|
||||
cy.get("body").type(`{${modifierKey}}z`);
|
||||
cy.get("input[name='url']").should("have.value", "");
|
||||
cy.get("body").type(`{${modifierKey}}z`);
|
||||
cy.get("input[name='headers[0].key']").should("have.value", "");
|
||||
cy.get("body").click(0, 0);
|
||||
cy.get("body").type(`{${modifierKey}}{shift}z`);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
import {
|
||||
agHelper,
|
||||
appSettings,
|
||||
homePage,
|
||||
dataSources,
|
||||
jsEditor,
|
||||
deployMode,
|
||||
locators,
|
||||
draggableWidgets,
|
||||
} from "../../../../support/Objects/ObjectsCore";
|
||||
|
||||
describe("App level import with Datasource", () => {
|
||||
before(() => {
|
||||
homePage.CreateNewWorkspace("AppLevelImport", true);
|
||||
homePage.CreateAppInWorkspace("AppLevelImport");
|
||||
});
|
||||
|
||||
//this tests coveres Applevel import for MySql, Gsheet is covered in Gsheet folder
|
||||
it("1. Bug #26024 - Import an app at App Level with Datasource - MySql", () => {
|
||||
appSettings.OpenAppSettings();
|
||||
appSettings.GoToImport();
|
||||
agHelper.ClickButton("Import");
|
||||
homePage.ImportApp("ImportApps/JSOnLoadImport.json", "JSOnLoadTest", true);
|
||||
cy.wait("@importNewApplication").then(() => {
|
||||
agHelper.Sleep();
|
||||
dataSources.ReconnectSingleDSNAssert("MySQL-Ds", "MySQL");
|
||||
});
|
||||
jsEditor.ConfirmationClick("Yes");
|
||||
agHelper.ClickButton("Got it");
|
||||
deployMode.DeployApp();
|
||||
jsEditor.ConfirmationClick("Yes");
|
||||
agHelper.AssertElementLength(
|
||||
locators._widgetInDeployed(draggableWidgets.IMAGE),
|
||||
10,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -195,7 +195,7 @@ describe("Validate Oracle DS", () => {
|
|||
TO_DATE('2020-01-15', 'YYYY-MM-DD'),
|
||||
TO_DATE('{{DatePicker1.formattedDate}}', 'YYYY-MM-DD'),
|
||||
'This aircraft is used for domestic flights.')`;
|
||||
entityExplorer.ActionTemplateMenuByEntityName(guid.toUpperCase(), "SELECT");
|
||||
entityExplorer.ActionTemplateMenuByEntityName(guid.toUpperCase(), "Select");
|
||||
dataSources.RunQuery();
|
||||
agHelper
|
||||
.GetText(dataSources._noRecordFound)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ describe(
|
|||
let placeholderText =
|
||||
'{\n "name": {{nameInput.text}},\n "dob": {{dobPicker.formattedDate}},\n "gender": {{genderSelect.selectedOptionValue}} \n}';
|
||||
|
||||
//Skiiping due to open bug #18035: Should the Save button be renamed as "Save and Authorise" in case of Google sheets for datasource discard popup?
|
||||
//Skiiping due to open bug #18035: Should the Save button be renamed as "Save and Authorise" in case of Google sheets for datasource discard popup? -
|
||||
//Bug #18035: Bug is to be taken in ds experience activation phase
|
||||
it.skip("1. Bug: 16391 - Google Sheets DS, placeholder objects keys should have quotes", function () {
|
||||
// create new Google Sheets datasource
|
||||
dataSources.NavigateToDSCreateNew();
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export class AppSettings {
|
|||
_generalSettingsHeader: "#t--general-settings-header",
|
||||
_embedSettingsHeader: "#t--share-embed-settings",
|
||||
_navigationSettingsTab: "#t--navigation-settings-header",
|
||||
_importHeader: "#t--update-via-import",
|
||||
_navigationSettings: {
|
||||
_showNavbar: "#t--navigation-settings-show-navbar",
|
||||
_showSignIn: "#t--navigation-settings-show-sign-in",
|
||||
|
|
@ -87,6 +88,10 @@ export class AppSettings {
|
|||
this.agHelper.GetNClick(this.locators._embedSettingsHeader);
|
||||
}
|
||||
|
||||
public GoToImport() {
|
||||
this.agHelper.GetNClick(this.locators._importHeader);
|
||||
}
|
||||
|
||||
public GoToPageSettings(pageName: string) {
|
||||
this.agHelper.GetNClick(this.locators._getPageSettingsHeader(pageName));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { propPane } from "../../Objects/ObjectsCore";
|
||||
import { ObjectsRegistry } from "../../Objects/Registry";
|
||||
|
||||
export class EmbedSettings {
|
||||
|
|
|
|||
|
|
@ -796,9 +796,9 @@ export class DataSources {
|
|||
);
|
||||
}
|
||||
|
||||
public TestSaveDatasource(expectedRes = true, isForkModal = false) {
|
||||
public TestSaveDatasource(expectedRes = true, isReconnectModal = false) {
|
||||
this.TestDatasource(expectedRes);
|
||||
this.SaveDatasource(isForkModal);
|
||||
this.SaveDatasource(isReconnectModal);
|
||||
}
|
||||
|
||||
public TestDatasource(expectedRes = true) {
|
||||
|
|
@ -810,10 +810,10 @@ export class DataSources {
|
|||
}
|
||||
}
|
||||
|
||||
public SaveDatasource(isForkModal = false, isSavingEnvInOldDS = false) {
|
||||
public SaveDatasource(isReconnectModal = false, isSavingEnvInOldDS = false) {
|
||||
this.agHelper.Sleep(500); //bit of time for CI!
|
||||
this.agHelper.GetNClick(this._saveDs);
|
||||
if (!isForkModal) {
|
||||
if (!isReconnectModal) {
|
||||
this.assertHelper.AssertNetworkStatus("@saveDatasource", 201);
|
||||
if (!isSavingEnvInOldDS)
|
||||
this.agHelper.AssertContains("datasource created");
|
||||
|
|
@ -1096,7 +1096,7 @@ export class DataSources {
|
|||
if (dsName == "PostgreSQL") this.FillPostgresDSForm();
|
||||
else if (dsName == "MySQL") this.FillMySqlDSForm();
|
||||
else if (dsName == "MongoDB") this.FillMongoDSForm();
|
||||
this.SaveDatasource(true);
|
||||
this.TestSaveDatasource(true, true);
|
||||
this.assertHelper.AssertNetworkStatus("@getPage", 200);
|
||||
this.assertHelper.AssertNetworkStatus("getWorkspace");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -491,13 +491,21 @@ export class HomePage {
|
|||
this.NavigateToHome();
|
||||
}
|
||||
|
||||
public ImportApp(fixtureJson: string, intoWorkspaceName = "") {
|
||||
cy.get(this._homeIcon).click({ force: true });
|
||||
if (intoWorkspaceName)
|
||||
this.agHelper.GetNClick(this._optionsIconInWorkspace(intoWorkspaceName));
|
||||
else this.agHelper.GetNClick(this._optionsIcon);
|
||||
this.agHelper.GetNClick(this._workspaceImport, 0, true);
|
||||
this.agHelper.AssertElementVisibility(this._workspaceImportAppModal);
|
||||
public ImportApp(
|
||||
fixtureJson: string,
|
||||
intoWorkspaceName = "",
|
||||
onlyImport = false,
|
||||
) {
|
||||
if (onlyImport === false) {
|
||||
cy.get(this._homeIcon).click({ force: true });
|
||||
if (intoWorkspaceName)
|
||||
this.agHelper.GetNClick(
|
||||
this._optionsIconInWorkspace(intoWorkspaceName),
|
||||
);
|
||||
else this.agHelper.GetNClick(this._optionsIcon);
|
||||
this.agHelper.GetNClick(this._workspaceImport, 0, true);
|
||||
this.agHelper.AssertElementVisibility(this._workspaceImportAppModal);
|
||||
}
|
||||
cy.xpath(this._uploadFile).selectFile("cypress/fixtures/" + fixtureJson, {
|
||||
force: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user