Ejemplo n.º 1
0
 it('should show correct data', async () => {
   const expectedMetricValue = '156';
   await PageObjects.visualize.waitForVisualization();
   const value = await PageObjects.visualBuilder.getMetricValue();
   log.debug(`metric value: ${value}`);
   expect(value).to.eql(expectedMetricValue);
 });
Ejemplo n.º 2
0
 it('should show the correct count in the legend with 2h offset', async () => {
   await PageObjects.visualBuilder.clickSeriesOption();
   await PageObjects.visualBuilder.enterOffsetSeries('2h');
   await PageObjects.header.waitUntilLoadingHasFinished();
   const actualCount = await PageObjects.visualBuilder.getRhythmChartLegendValue();
   expect(actualCount).to.be('293');
 });
Ejemplo n.º 3
0
 .then(resp => {
   const lastEventTime = resp.data.source.LastEventTime;
   expect(lastEventTime).to.eql({
     __typename: 'LastEventTimeData',
     lastSeen: '2019-04-26T21:45:14.012Z',
   });
 });
Ejemplo n.º 4
0
 .then(resp => {
   const lastEventTime = resp.data.source.LastEventTime;
   expect(lastEventTime).to.eql({
     __typename: 'LastEventTimeData',
     lastSeen: '2019-02-09T16:45:34.135Z',
   });
 });
Ejemplo n.º 5
0
 const createExpectRbacForbidden = (type: string) => (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     statusCode: 403,
     error: 'Forbidden',
     message: `Unable to update ${type}`,
   });
 };
Ejemplo n.º 6
0
 const expectRbacForbiddenForUnknownType = (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     statusCode: 403,
     error: 'Forbidden',
     message: `Unable to bulk_create dashboard,globaltype,wigwags, missing action:saved_objects/wigwags/bulk_create`,
   });
 };
Ejemplo n.º 7
0
 const expectReservedSpaceResult = (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     error: 'Bad Request',
     statusCode: 400,
     message: `This Space cannot be deleted because it is reserved.`,
   });
 };
Ejemplo n.º 8
0
 const createExpectNotFoundResult = () => (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     error: 'Not Found',
     message: 'Not Found',
     statusCode: 404,
   });
 };
Ejemplo n.º 9
0
 const expectNotFound = (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     error: 'Not Found',
     statusCode: 404,
     message: 'Not Found',
   });
 };
Ejemplo n.º 10
0
 const expectRbacForbidden = (resp: { [key: string]: any }) => {
   expect(resp.body).to.eql({
     statusCode: 403,
     error: 'Forbidden',
     message: 'Unauthorized to delete spaces',
   });
 };