Commit 71e1b7aa authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Fix e2e tests

parent f7fd2cbc
Pipeline #139193 passed with stages
in 8 minutes and 20 seconds
......@@ -74,12 +74,7 @@
}
]
],
"relationshipTypes": [
"requires",
"excludes",
"supports",
"hurts"
],
"relationshipTypes": ["requires", "excludes", "supports", "hurts"],
"_id": "1625144329606"
},
{
......@@ -123,9 +118,7 @@
{
"module": "Canvas Module",
"method": "editCanvas",
"outputMappings": [
[]
]
"outputMappings": [[]]
}
],
"_id": "1635786343509"
......@@ -239,9 +232,7 @@
"module": "Canvas Module",
"method": "editCanvas",
"predefinedInput": null,
"outputMappings": [
[]
]
"outputMappings": [[]]
}
],
"_id": "1635787346356"
......
......@@ -77,7 +77,7 @@ describe('Enaction', () => {
cy.contains('.btn', 'Execute next step').click();
cy.get('#name').clear();
cy.get('#name').type('TestInstance');
cy.contains('.btn', 'Create Feature Model Instance').click();
cy.contains('.btn', 'Create Canvas Artifact').click();
cy.contains('.btn', 'Execute next step').click();
cy.contains('app-canvas-building-block', 'Products & Services')
.find('.fa-plus-square')
......@@ -117,7 +117,12 @@ describe('Enaction', () => {
'have.text',
'Select Method Building Block to add to TODO'
);
cy.get(':nth-child(2) > app-development-method-selection-form > .d-flex > .btn').click();
cy.get('.modal-title').should('have.text', ' Configure Building Block Complete ');
cy.get(
':nth-child(2) > app-development-method-selection-form > .d-flex > .btn'
).click();
cy.get('.modal-title').should(
'have.text',
' Configure Building Block Complete '
);
});
});
import Chainable = Cypress.Chainable;
const expertModels = (): Chainable => {
return cy.getPane('List of Expert Business Knowledge Models');
return cy.getPane('Canvas Building Blocks');
};
const modelInfo = (): Chainable => {
return cy.getPane('Model Info');
return cy.getPane('Info');
};
const authorInfo = (): Chainable => {
......@@ -16,7 +16,7 @@ describe('Expert Models', () => {
it('import expert model', () => {
cy.fixture('expertModel').then((model) => {
cy.visit('http://localhost:4200/expertModels/');
cy.contains('div.bg-white', 'Import Expert Model').within(() => {
cy.contains('div.bg-white', 'Import Canvas Building Block').within(() => {
cy.get('input[type=file]').then((input: JQuery<HTMLInputElement>) => {
const file = new File([JSON.stringify(model)], 'Test.json', {
type: 'application/json',
......@@ -26,13 +26,10 @@ describe('Expert Models', () => {
input.get()[0].files = dataTransfer.files;
input.get()[0].dispatchEvent(new Event('change'));
});
cy.contains('.btn', 'Import Expert Model').click();
cy.contains('.btn', 'Import Canvas Building Block').click();
});
});
cy.contains(
'div.bg-white',
'List of Expert Business Knowledge Models'
).within(() => {
expertModels().within(() => {
cy.get('li').should('contain.text', 'Mobile Todo-Apps');
cy.contains('.btn', 'View').click();
});
......@@ -61,7 +58,7 @@ describe('Expert Models', () => {
cy.get('#name').type('Test Model');
cy.get('#description').clear();
cy.get('#description').type('Test Description');
cy.contains('.btn', 'Add Expert Business Knowledge Model').click();
cy.contains('.btn', 'Add Canvas Building Block').click();
expertModels().within(() => {
cy.get('.text-gray-dark').should('have.text', 'Test Model');
cy.contains('.btn', 'View').click();
......@@ -73,13 +70,13 @@ describe('Expert Models', () => {
cy.contains('tr', 'Name').find('td').should('have.text', 'Test Author');
});
cy.contains('.nav-link', '2. Edit').click();
cy.contains('.btn', 'Edit Expert Model').click();
cy.contains('.btn', 'Edit Canvas Building Block').click();
cy.get('#name').clear();
cy.get('#name').type('Test Feature A');
cy.get('#description').clear();
cy.get('#description').type('My Feature Description');
cy.contains('.btn', 'Add Feature').click();
cy.getPane('Model List').within(() => {
cy.getPane('Feature tree').within(() => {
cy.contains('li', 'Key Partners').within(() => {
cy.contains('div', 'Test Feature A')
.find('small')
......@@ -92,7 +89,7 @@ describe('Expert Models', () => {
cy.get('#type').select('Yes');
cy.contains('.btn', 'Update Feature').click();
});
cy.getPane('Model List').within(() => {
cy.getPane('Feature tree').within(() => {
cy.contains('li', 'Key Activities').within(() => {
cy.contains('li', 'Test Feature A').within(() => {
cy.get('div > :first-child > i').should(
......
......@@ -30,7 +30,7 @@ Cypress.Commands.add(
);
Cypress.Commands.add('getPane', (heading) => {
return cy.contains('div.bg-white', heading);
return cy.contains('div.bg-white.rounded', heading);
});
Cypress.Commands.add('getModal', () => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment