Skip to content
Snippets Groups Projects
Commit 24c28b9f authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch '#1084955_cypress' into '2021.2.0'

#1084955: cypress into basic

See merge request xrm/basic!1301
parents b3213aee 65226cdf
No related branches found
No related tags found
No related merge requests found
Showing
with 631 additions and 1 deletion
......@@ -6,4 +6,12 @@
/others/db_changes/liqui_reset.ps1
/others/jsdocOut
/userhelp
/system/dev_local
\ No newline at end of file
/system/dev_local
# NodeJS
node_modules/
# NodeJS / Cypress
cypress/videos
cypress/screenshots
cypress/reports
{
"baseUrl": "https://localhost:8443",
"defaultCommandTimeout": 25000,
"env": {
"DEFAULT_LOCALE": "de-DE",
"CYPRESS_INCLUDE_TAGS": "DEFAULT,QA"
},
"reporter": "../node_modules/mochawesome/src/mochawesome.js",
"reporterOptions": {
"overwrite": false,
"html": false,
"json": true,
"charts": true,
"reportDir": "cypress/reports/temp"
},
"retries": {
"runMode": 2,
"openMode": 2
}
}
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
describe("Index Search", () =>
{
it("Should find a specific company in the index search component", () =>
{
cy.login();
cy.searchIndex("meineFirma");
});
it("Should search for a company in the indexsearch and open the 'show more' context", () =>
{
cy.login();
cy.openIndexResult("Bucher");
});
});
describe("Login", () => {
it([Tag.DEFAULT], "should login with admin account properly", () => {
cy.login();
cy.openGlobalMenu();
})
})
\ No newline at end of file
describe("Admin-Menu", () => {
it([Tag.DEFAULT], "Should show all Admin Menu-Points", () => {
cy.login();
cy.wait(1000);
cy.assertNoPopup();
cy.openGlobalMenu();
cy.get(".neon-navigation-bar-popup[data-test-misc-popup-type='CONTEXT_GROUPS']").first().within(() =>
{
cy.contains("Kontakt");
cy.contains("Firma");
cy.contains("Aktivität");
cy.contains("Aufgabe");
cy.contains("Vertriebsdashboard");
cy.contains("Planung");
cy.contains("Vertriebsprojekt");
cy.contains("Angebot");
cy.contains("Beleg");
cy.contains("Vertrag");
cy.contains("Produkt");
cy.contains("Preise");
cy.contains("Conversion Rate");
cy.contains("Werbemittel");
cy.contains("Umsatzprognose");
cy.contains("Besuchsvorschlag");
cy.contains("Besuchsplanung");
cy.contains("Marketingdashboard");
cy.contains("Kampagnenplanung");
cy.contains("Kampagne");
cy.contains("Serienmail");
cy.contains("Serienbrief");
cy.contains("Dokumentvorlage");
cy.contains("Weblink");
cy.contains("Interesse");
cy.contains("Leadimport");
cy.contains("Supportticket");
cy.contains("Wissen");
cy.contains("Eigenschaft");
cy.contains("Schlüsselwort-Kategorie");
cy.contains("Schlüsselwort-Eintrag");
cy.contains("Schlüsselwort-Eigenschaft");
cy.contains("Beziehungstyp");
cy.contains("Klassifizierung");
cy.contains("Anrede");
cy.contains("Dublettenkonfiguration");
cy.contains("Audit Log");
cy.contains("Exportvorlage");
cy.contains("Workflowdefinition");
cy.contains("Userhelp");
cy.contains("Gebietsdefinition");
cy.contains("Vertriebsprojektphasen");
cy.contains("DSGVO Konfiguration");
cy.contains("Mitarbeiter");
})
})
})
describe("Marketing-Menu", () => {
it([Tag.DEFAULT], "Should show all Marketing Menu-Points", () => {
cy.login("lisa sommer")
cy.wait(1000);
cy.assertNoPopup();
// Open global menu
cy.openGlobalMenu();
cy.get(".neon-navigation-bar-popup[data-test-misc-popup-type='CONTEXT_GROUPS']").first().within(() =>
{
cy.contains("Kontakt");
cy.contains("Firma");
cy.contains("Aktivität");
cy.contains("Aufgabe");
cy.contains("Vertriebsdashboard");
cy.contains("Planung");
cy.contains("Vertriebsprojekt");
cy.contains("Angebot");
cy.contains("Beleg");
cy.contains("Vertrag");
cy.contains("Produkt");
cy.contains("Preise");
cy.contains("Conversion Rate");
cy.contains("Werbemittel");
cy.contains("Umsatzprognose");
cy.contains("Besuchsvorschlag");
cy.contains("Besuchsplanung");
cy.contains("Marketingdashboard");
cy.contains("Kampagnenplanung");
cy.contains("Kampagne");
cy.contains("Serienmail");
cy.contains("Serienbrief");
cy.contains("Dokumentvorlage");
cy.contains("Weblink");
cy.contains("Interesse");
cy.contains("Leadimport").should('not.exist');
cy.contains("Supportticket").should('not.exist');
cy.contains("Wissen");
cy.contains("Eigenschaft").should('not.exist');
cy.contains("Schlüsselwort-Kategorie").should('not.exist');
cy.contains("Schlüsselwort-Eintrag").should('not.exist');
cy.contains("Schlüsselwort-Eigenschaft").should('not.exist');
cy.contains("Beziehungstyp").should('not.exist');
cy.contains("Klassifizierung").should('not.exist');
cy.contains("Anrede").should('not.exist');
cy.contains("Dublettenkonfiguration").should('not.exist');
cy.contains("Audit-Log").should('not.exist');
cy.contains("Exportvorlage").should('not.exist');
cy.contains("Workflowdefinition").should('not.exist');
cy.contains("Userhelp").should('not.exist');
cy.contains("Gebietsdefinition").should('not.exist');
cy.contains("Vertriebsprojektphasen").should('not.exist');
cy.contains("DSGVO Konfiguration").should('not.exist');
cy.contains("Mitarbeiter").should('not.exist');
})
})
})
//This is kept for historical purposes. This is what a first test looked like.
/*
describe('test', () => {
it([Tag.DEFAULT], 'should support example case', () => {
cy.viewport("macbook-15")
// Clear the cookie to get a new session on page reload
cy.clearCookie('JSESSIONID')
// Load the login route
cy.visit("/client/login")
// Fill the login form
cy.get(".neon-login-form > .neon-login-input-user").first().type("admin")
// Click the login submit button
cy.get(".neon-login-form > .neon-login-action-submit").first().click()
// Wait until the client is1 ready.
cy.get(".neon-root-container")
// Add additional wait time until the client is ready to accept next actions. TODO Decrease wait time or use an actual element to wait for.
cy.wait(2500)
// Open the QuickEntry popup
cy.get(".neon-navigation-bar-popup[data-test-misc-popup-type='QUICK_ENTRY']").click()
// Search the Person/PersonEdit_view Quick entry and open it.
cy.get(".neon-navigation-bar-popup[data-test-misc-popup-type='QUICK_ENTRY'] .quickentry-popup-item[data-test-misc-popup-qe-item-context-name='Person'][data-test-misc-popup-qe-item-view-name='PersonEdit_view']").click()
// Wait until the view is loaded
cy.get(".neon-main-display[data-test-display-view-name='PersonEdit_view']")
cy.wait(1000)
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-lookup-field[data-test-component-vt-generic-field='ORGANISATION_CONTACTID']").then($lookup => {
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-lookup-field[data-test-component-vt-generic-field='ORGANISATION_CONTACTID'] .v-textfield").first().type("Meine Firma")
cy.get(".neon-lookup-content[data-test-component-lookup-overlay-identification='" + $lookup.attr("data-test-component-lookup-identification") + "']").first()
.get(".v-grid-row >.v-grid-cell").first().click()
cy.wait(1000)
})
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-lookup-field[data-test-component-vt-generic-field='SALUTATION']").then($lookup => {
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-lookup-field[data-test-component-vt-generic-field='SALUTATION'] .v-textfield").first().type("Herr")
cy.wait(1000)
cy.get(".neon-lookup-content-default[data-test-component-lookup-overlay-identification='" + $lookup.attr("data-test-component-lookup-identification") + "']").first()
.get(".v-grid-row > .v-grid-cell").first().click({force: true})
cy.wait(1000)
})
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-textfield[data-test-component-vt-generic-field='FIRSTNAME']").type("Sepp")
cy.get(".neon-viewtemplate-generic[data-test-component-name='Edit'] .neon-textfield[data-test-component-vt-generic-field='LASTNAME']").type("Huber")
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] .neon-lookup-field[data-test-component-name='Zip_ws'] .neon-textfield").type("84144")
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] .neon-lookup-field[data-test-component-name='City_ws'] .neon-textfield").type("Geisenhausen")
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] .neon-lookup-field[data-test-component-name='Address_ws'] .neon-textfield").type("Konrad Zuse Str.")
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] .neon-textfield[data-test-component-name='BUILDINGNO']").type("4")
cy.get(".neon-multiple-value-edit[data-test-component-name='GenericMultiple'] .neon-combobox[data-test-component-name='VALUE']").type("gross")
cy.wait(500)
cy.get(".neon-multiple-value-edit[data-test-component-name='GenericMultiple'] .neon-combobox[data-test-component-name='VALUE']").type("{enter}")
// Click save.
cy.get(".neon-main-display .neon-display-content-edit-buttons .neon-button-strip-menu-do-action").first().click()
// DSGVO Dialog...
cy.get(".neon-question-window .neon-window-footer .neon-accent-button").first().click()
// Wait for the Full View
cy.get(".neon-main-display[data-test-display-view-name='PersonMain_view'][data-test-display-context-name='Person']")
cy.get(".neon-register .neon-register-tab-header[data-test-misc-register-tab-header='4b50b784-484f-4cdf-a705-4c356da763fa']").first().click()
cy.get(".neon-group-layout[data-test-component-viewcontainer-reference-entity-field-name='Documents'] .neon-button-strip .user-action").first().click()
cy.get(".neon-preview-display[data-test-display-context-name='Document'][data-test-display-view-name='DocumentEdit_view']")
cy.fixture("adito.png").then(logoImage => {
const dt = new DataTransfer()
const file = new File([Cypress.Blob.base64StringToBlob(logoImage, 'image/png')], "test.png", {type: "image/png"})
dt.items.add(file)
cy.get(".neon-preview-display[data-test-display-context-name='Document'][data-test-display-view-name='DocumentEdit_view'] .neon-upload[data-test-component-vt-generic-field='BINDATA_UPLOAD']")
.first()
.trigger('drop', {dataTransfer: dt})
cy.get(".neon-preview-display[data-test-display-context-name='Document'][data-test-display-view-name='DocumentEdit_view'] .neon-upload[data-test-component-vt-generic-field='BINDATA_UPLOAD'] .neon-label").should("have.text", "test.png")
cy.get(".neon-preview-display[data-test-display-context-name='Document'][data-test-display-view-name='DocumentEdit_view'] .neon-display-content-edit-buttons .neon-button-strip-menu-do-action").first().click()
cy.get(".neon-group-layout[data-test-component-viewcontainer-reference-entity-field-name='Documents'] .tiles[data-test-component-tiles-row-count='1']")
})
cy.visit("/client/Person/filter")
cy.get(".neon-main-display[data-test-display-view-name='PersonFilter_view'][data-test-display-context-name='Person']")
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-filter-action-add").first().click()
// cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] > .neon-drawer-header").first().click()
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-input-field").first().type("Vorname")
cy.wait(500)
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-input-field").first().type("{enter}")
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-container-input[data-test-misc-filter-input-type='text'] > input").first().type("Sepp{enter}")
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-filter-action-add").first().click()
// cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] > .neon-drawer-header").first().click()
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-input-field").first().type("Nachname")
cy.wait(500)
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-input-field").first().type("{enter}")
cy.get(".neon-preview-display[data-test-display-type='filter'] .neon-drawer[data-test-misc-filter-leaf-empty='true'] .neon-filter-leaf-container-input[data-test-misc-filter-input-type='text'] > input").first().type("Huber{enter}")
cy.wait(5000)
cy.get(".neon-table[data-test-component-name='Persons'] tbody > .v-grid-row:nth-child(1) > .v-grid-cell:not(.frozen)").first().click()
cy.wait(5000)
})
})
*/
\ No newline at end of file
describe("Create Activity", () =>
{
it([Tag.DEFAULT], "Should try to create an Activity, but as it is in the future it should not be possible", () =>
{
cy.login();
cy.openContext("Activity", "ActivityEdit_view", PresentationMode.EDIT, {});
cy.getEditField("SUBJECT").type("Test");
cy.getDateField("ENTRYDATE").clear();
cy.getDateField("ENTRYDATE").type("01.01.2025 15:27{enter}");
cy.fillLookUpField("CATEGORY", "E-Mail");
cy.fillLookUpField("DIRECTION", "ausgehend");
cy.pressSwitch("hasAdvertising");
cy.get(".neon-multiple-value-edit[data-test-component-name='genericMultiple'] [data-test-component-mve-action='delete']").last().click();
cy.get(".neon-label-error").contains("Datum darf nicht in der Zukunft liegen").should("be.visible");
cy.get(".neon-label-error").contains("Pflichteingabe fehlt").should("not.exist");
});
it([Tag.DEFAULT], "Create an Activity and delete it", () =>
{
cy.login();
cy.openContext("Activity", "ActivityEdit_view", PresentationMode.EDIT, {});
cy.getEditField("SUBJECT").type("Test");
cy.getHTMLField("INFO").type("Test text so much texty text text");// - this is pretty unstable :(
cy.getDateField("ENTRYDATE").clear();
cy.getDateField("ENTRYDATE").type("01.01.2021 15:27{enter}");
cy.fillLookUpField("CATEGORY", "E-Mail");
cy.fillLookUpField("DIRECTION", "ausgehend");
cy.pressSwitch("hasAdvertising");
cy.get(".neon-multiple-value-edit[data-test-component-name='genericMultiple'] [data-test-component-mve-action='delete']").last().click();
cy.saveEdit();
cy.deleteAfterCreation("Activity");
});
});
describe("Add, change, cancel, delete Attribute in Person", () =>
{
it([Tag.DEFAULT], "Should add Attribute in Person", () =>
{
cy.login();
cy.openMainFromFilter("Person", 2);
cy.openTabInMain("Eigenschaften");
cy.pressInsert();
cy.getLookUpField("AB_ATTRIBUTE_ID").openLookupWithSearch({query: 'Geburtstagsliste', select: 1}, true);
cy.fillComboField("VALUE", "Ja");
cy.pressSave();
});
it([Tag.DEFAULT], "Should change Attribute in Person", () =>
{
cy.login();
cy.openMainFromFilter("Person", 2);
cy.openTabInMain("Eigenschaften");
cy.selectValue("Geb", "tree");
cy.pressButton(0);
cy.fillComboField("VALUE", "Nein");
cy.pressSave();
});
it([Tag.DEFAULT], "Should start to change but cancel the change of Attribute in Person", () =>
{
cy.login();
cy.openMainFromFilter("Person", 2);
cy.openTabInMain("Eigenschaften");
cy.selectValue("Geb", "tree");
cy.pressButton(0);
cy.fillComboField("VALUE", "Nein");
cy.pressCancel();
});
it([Tag.DEFAULT], "Should delete Attribute in Person", () =>
{
cy.login();
cy.openMainFromFilter("Person", 2);
cy.openTabInMain("Eigenschaften");
cy.selectValue(1, "tree");
cy.pressButton(1);
cy.get(".neon-button").type("{enter}");
});
});
describe("Upload and delete document from Organisation", () =>
{
it([Tag.DEFAULT], "Should upload a document to an organisation", () =>
{
cy.login();
cy.openMainFromFilter("Organisation", 2);
cy.openTabInMain("Dokumente");
cy.pressInsert();
cy.uploadDocument("adito.png", "image/png"); //the file needs to be stored in "fixtures"
cy.pressSave();
});
it([Tag.DEFAULT], "Should delete the uploaded document", () =>
{
cy.login();
cy.openMainFromFilter("Organisation", 2);
cy.openTabInMain("Dokumente");
cy.selectValue(0, "tile");
cy.pressButton(1);
cy.get(".neon-button").type("{enter}");
});
});
describe("Create Organisation", () =>
{
it([Tag.DEFAULT], "Should create an organisation with all necessary fields", () =>
{
cy.login();
var name = "myTestOrg";
cy.openContext("Organisation", "OrganisationEdit_view", PresentationMode.EDIT, {});
cy.getEditField("NAME").type(name);
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] [data-test-component-mve-action='delete']").first().click();
cy.get(".is-required[data-test-component-name='VALUE']").first().type("gering");
cy.get(".is-required[data-test-component-name='VALUE']").first().type("{enter}");
cy.get(".is-required[data-test-component-name='VALUE']").last().type("Logistik");
cy.get(".is-required[data-test-component-name='VALUE']").last().type("{enter}");
cy.saveEdit();
cy.filterField("Name", name, FilterType.TEXT, [{type: 'ist gleich', count: 1}], "Organisation"); //filter for the org and see if it is there
cy.openMainFromFilter(null, 0);
cy.deleteAfterCreation("Organisation");//delete it again
});
});
describe("Create Organisation with all fields", () =>
{
it([Tag.DEFAULT], "Should create an organisation with all fields", () =>
{
cy.login();
var name = "myTestOrg";
cy.openContext("Organisation", "OrganisationEdit_view", PresentationMode.EDIT, {});
cy.getEditField("NAME").type(name);
cy.getEditField("CUSTOMERCODE").type("777");
cy.getLargeEditField("INFO").type("There is so much info for this company!");
cy.fillLookUpField("TYPE", "Hersteller").wait(500);
//Address fields
cy.getMultiEditField("ZIP").type("84144{enter}");
cy.getMultiEditField("CITY").type("Geisenhausen{enter}");
cy.getMultiEditField("ADDRESS").type("Gutenbergweg{enter}");
cy.getMultiEditField("BUILDINGNO").type("4{enter}");
cy.getMultiEditField("STATE").type("Niederbayern{enter}");
cy.getMultiEditField("ADDRESSADDITION").type("3. Wohnung rechts{enter}");
cy.getMultiEditField("ADDRIDENTIFIER").type("Test{enter}");
cy.get(".neon-lookup-field[data-test-component-name='MEDIUM_ID']").type("Website").wait(500);
cy.get(".neon-none-layout[data-test-component-name='DefaultLookup_view']").children().contains('Website').click().wait(500);
cy.get(".neon-textfield[data-test-component-name='ADDR']").type(name + ".com");
cy.get(".neon-textfield[data-test-component-name='ADDR']").type("{enter}");
cy.get(".is-required[data-test-component-name='VALUE']").first().type("gering");
cy.get(".is-required[data-test-component-name='VALUE']").first().type("{enter}");
cy.get(".is-required[data-test-component-name='VALUE']").last().type("Logistik");
cy.get(".is-required[data-test-component-name='VALUE']").last().type("{enter}");
cy.saveEdit();
cy.filterField("Kommunikation: Webseite", name , FilterType.TEXT, [{type: 'enhält', count: 1}], "Organisation"); //filter for the org and see if it is there
cy.openMainFromFilter(null, 0);
cy.deleteAfterCreation("Organisation");//delete it again
});
});
describe("Filter Organisation data", () =>
{
it([Tag.DEFAULT], "Should open filterview, group and reset filter and groups", () =>
{
cy.login();
cy.groupField("Sprache",2,"Organisation");
cy.groupField("Status",1);
cy.groupMultiFields(["Sprache","Status"], 2);
cy.resetFilter();
cy.resetGroup();
});
});
describe("Open Organisation", () =>
{
it([Tag.DEFAULT], "Should open main view and change the tabs", () =>
{
cy.login();
cy.openMainFromFilter("Organisation", 2);
cy.openTabInMain("Aktivitäten");
cy.openTabInMain("Eigenschaften");
});
});
describe("Set a favorite organisation", () => {
it([Tag.DEFAULT], "Should set a favorite organisation without tag", () =>
{
cy.login();
cy.setFavorite(6, null, "Organisation"); //careful! The number needs to be adjusted if you have i.e. more favorites
});
it([Tag.DEFAULT], "Should set a favorite organisation with tag", () =>
{
cy.login();
cy.setFavorite(1, "myTag", "Organisation"); //careful! The number needs to be adjusted if you have i.e. more favorites with that tag
});
});
describe("Create Person", () =>
{
it([Tag.DEFAULT], "Should create a person with all necessary fields", () =>
{
cy.login();
var lastname = "Testoteles";
cy.openContext("Person", "PersonEdit_view", PresentationMode.EDIT, {});
cy.fillLookUpField("SALUTATION", "Herr");
cy.getEditField("LASTNAME").type(lastname);
//delete address fields with [-]
cy.get(".neon-multiple-value-edit[data-test-component-name='MultipleEdit'] [data-test-component-mve-action='delete']").first().click();
cy.get(".neon-multiple-value-edit[data-test-component-name='GenericMultiple'] .neon-combobox[data-test-component-type='COMBOBOX']").last().type("gering");
cy.get(".neon-multiple-value-edit[data-test-component-name='GenericMultiple'] .neon-combobox[data-test-component-type='COMBOBOX']").last().type("{enter}");
cy.saveEdit(true);
cy.filterField("Nachname", lastname, FilterType.TEXT, [{type: 'ist gleich', count: 1}], "Person");
cy.openMainFromFilter(null, 0);
cy.deleteAfterCreation("Person");
});
});
describe("Create Person", () =>
{
it([Tag.DEFAULT], "Should create a person with all fields", () =>
{
cy.login();
cy.openContext("Person", "PersonEdit_view", PresentationMode.EDIT, {}).wait(2000);
// base fields
cy.get(".neon-lookup-field[data-test-component-vt-generic-field='ORGANISATION_CONTACTID']").openLookupWithSearch({ query: "meine Firma", select: 0 }).click({ force: true }).wait(1000);
cy.fillLookUpField("SALUTATION", "Herr").wait(500);
cy.fillLookUpField("TITLE", "Dr.").wait(500);
cy.getEditField("FIRSTNAME").type("Test");
cy.getEditField("MIDDLENAME").type("Maria");
cy.getEditField("LASTNAME").type("Testoteles");
cy.getDateField("DATEOFBIRTH").type("01.01.2000{enter}");
cy.fillComboField("DEPARTMENT", "IT");
cy.fillComboField("CONTACTROLE", "IT-Leiter");
cy.fillComboField("POSITION", "Produktionsleiter");
//Address fields
cy.getMultiEditField("ZIP").type("84144{enter}");
cy.getMultiEditField("CITY").type("Geisenhausen{enter}");
cy.getMultiEditField("ADDRESS").type("Gutenbergweg{enter}");
cy.getMultiEditField("BUILDINGNO").type("4{enter}");
cy.getMultiEditField("STATE").type("Niederbayern{enter}");
cy.getMultiEditField("ADDRESSADDITION").type("3. Wohnung rechts{enter}");
cy.getMultiEditField("ADDRIDENTIFIER").type("Test{enter}");
//Communication fields
cy.get(".neon-lookup-field[data-test-component-name='MEDIUM_ID']").type("Blog").wait(500);
cy.get(".neon-none-layout[data-test-component-name='DefaultLookup_view']").children().contains('Blog').click().wait(500);
cy.get(".neon-textfield[data-test-component-name='ADDR']").type("tm-testoteles.de");
cy.get(".neon-textfield[data-test-component-name='ADDR']").type("{enter}");
//Attribute fields
cy.get(".is-required[data-test-component-name='VALUE']").type("gering");
cy.get(".is-required[data-test-component-name='VALUE']").type("{enter}");
cy.saveEdit(true);
cy.filterField("Kommunikation: Webseite", "tm-testoteles.de", FilterType.TEXT, [{type: 'ist gleich', count: 1}], "Person");
cy.openMainFromFilter(null, 0);
cy.deleteAfterCreation("Person");
});
});
describe("Filter Person data", () => {
it([Tag.DEFAULT], "Should filter person surname correctly", () =>
{
cy.login();
cy.filterField("Nachname", "test", FilterType.TEXT, null, "Person");
});
it([Tag.DEFAULT], "Should filter person 'Interessen / Beruf' correctly", () =>
{
cy.login();
cy.filterField("Interessen / Beruf", "Wirtschaft", FilterType.COMBO, null, "Person");
});
it([Tag.DEFAULT], "Should filter person duplicate correctly", () =>
{
cy.login();
cy.filterField("Dubletten", "1", FilterType.NUMBER, null, "Person");
});
it([Tag.DEFAULT], "Should filter person 'Empfangene Serienmail' correctly", () =>
{
cy.login();
cy.filterField("Empfangene Serienmail", "Produktinformationen", FilterType.LOOKUP, null,"Person");
});
it([Tag.DEFAULT], "Should filter person 'Geburtsdatum' correctly", () =>
{
cy.login();
var mytestfilter = [{type: 'gleich', count: 0}];
cy.filterField("Geburtsdatum", "07.01.2020", FilterType.DATE, mytestfilter, "Person");
});
});
describe("Filter Person data - specific types with assertion", () =>
{
it([Tag.DEFAULT], "Should filter person firstname correctly", () =>
{
cy.login();
var mytestfilter = [{type: 'ist leer', count: 0},{type: 'gleich', count: 3}, {type: 'ungleich', count: 23}];
cy.filterField("Vorname", "Markus", FilterType.TEXT, mytestfilter, "Person");
});
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment