This commit is contained in:
19
e2e/package.json
Normal file
19
e2e/package.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "e2e",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"dependencies": {
|
||||
"cypress": "^9.1.1"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"open": "./node_modules/.bin/cypress open",
|
||||
"smoke-ff": "./node_modules/.bin/cypress run --browser firefox --spec ./tests/regression/smoke/*.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
/*
|
||||
pre-beta release updated all backend server modules and now get an error "Internal server error" viewing the wolist
|
||||
|
||||
server log:
|
||||
2021-12-16 09:33:44.5982|INFO|AyaNova.Api.Controllers.AuthController|User "AyaNova SuperUser" logged in from "::ffff:127.0.0.1" ok
|
||||
2021-12-16 09:33:49.0623|ERROR|AyaNova.Api.Controllers.DataListController|DataListFetcher:GetResponseAsync unexpected failure. Data Query was:
|
||||
2021-12-16 09:33:49.0623|ERROR|AyaNova.Api.Controllers.DataListController|SELECT viewworkorder.serial, viewworkorder.id, acustomer.name, acustomer.id, viewworkorder.servicedate, viewworkorder.completebydate, aworkorderstatus.name, viewworkorder.laststatusid, aworkorderstatus.color, aproject.name, aproject.id, expwoage from viewworkorder left join aworkorderstatus on (viewworkorder.laststatusid = aworkorderstatus.id) left join acustomer on (viewworkorder.customerid=acustomer.id) left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left join aproject on (viewworkorder.projectid=aproject.id) left join acontract on (viewworkorder.contractid=acontract.id)left join apm on (viewworkorder.frompmid=apm.id)left join aquote on (viewworkorder.fromquoteid=aquote.id) ORDER BY viewworkorder.serial DESC LIMIT 10 OFFSET 0
|
||||
2021-12-16 09:33:49.0623|ERROR|AyaNova.Api.Controllers.DataListController|Count Query was:
|
||||
2021-12-16 09:33:49.0623|ERROR|AyaNova.Api.Controllers.DataListController|SELECT COUNT(*) from viewworkorder left join aworkorderstatus on (viewworkorder.laststatusid = aworkorderstatus.id) left join acustomer on (viewworkorder.customerid=acustomer.id) left join aheadoffice on (acustomer.headofficeid=aheadoffice.id) left join aproject on (viewworkorder.projectid=aproject.id) left join acontract on (viewworkorder.contractid=acontract.id)left join apm on (viewworkorder.frompmid=apm.id)left join aquote on (viewworkorder.fromquoteid=aquote.id)
|
||||
2021-12-16 09:33:49.0623|ERROR|AyaNova.Api.Controllers.DataListController|Exception=>System.InvalidCastException: Cannot convert interval value with non-zero months to TimeSpan
|
||||
at NpgsqlTypes.NpgsqlTimeSpan.ToTimeSpan(NpgsqlTimeSpan& interval)
|
||||
at Npgsql.Internal.TypeHandlers.DateTimeHandlers.IntervalHandler.Read(NpgsqlReadBuffer buf, Int32 len, FieldDescription fieldDescription)
|
||||
at Npgsql.Internal.TypeHandling.NpgsqlTypeHandler.Read[TAny](NpgsqlReadBuffer buf, Int32 len, Boolean async, FieldDescription fieldDescription)
|
||||
at Npgsql.Internal.TypeHandling.NpgsqlTypeHandler`1.ReadAsObject(NpgsqlReadBuffer buf, Int32 len, Boolean async, FieldDescription fieldDescription)
|
||||
at Npgsql.NpgsqlDataReader.GetValue(Int32 ordinal)
|
||||
at AyaNova.DataList.DataListFetcher.GetResponseAsync(AyContext ct, DataListTableProcessingOptions dataListTableProcessingOptions, IDataListProcessing DataList, AuthorizationRoles userRoles, ILogger log, Int64 userId) in C:\data\code\raven\server\AyaNova\DataList\DataListFetcher.cs:line 125
|
||||
2021-12-16 09:33:49.1374|ERROR|SERVER|Error=>System.Exception: DataListFetcher:GetResponseAsync - unexpected failure see log
|
||||
at AyaNova.DataList.DataListFetcher.GetResponseAsync(AyContext ct, DataListTableProcessingOptions dataListTableProcessingOptions, IDataListProcessing DataList, AuthorizationRoles userRoles, ILogger log, Int64 userId) in C:\data\code\raven\server\AyaNova\DataList\DataListFetcher.cs:line 201
|
||||
at AyaNova.Api.Controllers.DataListController.List(DataListTableRequest tableRequest) in C:\data\code\raven\server\AyaNova\Controllers\DataListController.cs:line 106
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
|
||||
|
||||
Test should check for this issue
|
||||
*/
|
||||
|
||||
|
||||
describe("When work order data table listed", () => {
|
||||
it("should not show an error", () => {
|
||||
cy.visit("/login");
|
||||
cy.get("input[name=username]").clear().type(Cypress.env("serviceuser"));
|
||||
// {enter} causes the form to submit
|
||||
cy.get("input[name=password]")
|
||||
.clear()
|
||||
.type(`${Cypress.env("servicepassword")}{enter}`);
|
||||
|
||||
cy.url().should("include", "/ay-evaluate");
|
||||
|
||||
|
||||
//WORKORDER
|
||||
cy.get("[data-cy=navicon]").click();
|
||||
cy.get("[data-cy=service]").click(); //only if not setting project above
|
||||
cy.get("[data-cy='nav/svc-workorders']").click();
|
||||
cy.url().should("include", "/svc-workorders");
|
||||
cy.get("[data-cy=workordersTable]");
|
||||
//wait for load, once it's done refresh button will appear and can then check for errors etc
|
||||
cy.get("[data-cy=refresh]").should('exist');
|
||||
cy.get("[data-cy=generalerror]").should('not.exist');
|
||||
cy.contains('Internal server error', { matchCase: false }).should('not.exist')
|
||||
//END OF TEST
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user