@@ -15,63 +15,81 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
1515 const es = getService ( 'es' ) ;
1616
1717 describe ( 'certificates' , function ( ) {
18- before ( async ( ) => {
19- await makeCheck ( { es, tls : true } ) ;
20- await uptime . goToRoot ( true ) ;
21- } ) ;
18+ describe ( 'empty certificates' , function ( ) {
19+ before ( async ( ) => {
20+ await makeCheck ( { es } ) ;
21+ await uptime . goToRoot ( true ) ;
22+ } ) ;
2223
23- beforeEach ( async ( ) => {
24- await makeCheck ( { es, tls : true } ) ;
24+ it ( 'go to certs page' , async ( ) => {
25+ await uptimeService . common . waitUntilDataIsLoaded ( ) ;
26+ await uptimeService . cert . hasViewCertButton ( ) ;
27+ await uptimeService . navigation . goToCertificates ( ) ;
28+ } ) ;
29+ it ( 'displays empty message' , async ( ) => {
30+ await uptimeService . cert . displaysEmptyMessage ( ) ;
31+ } ) ;
2532 } ) ;
2633
27- it ( 'can navigate to cert page ', async ( ) => {
28- await uptimeService . common . waitUntilDataIsLoaded ( ) ;
29- await uptimeService . cert . hasViewCertButton ( ) ;
30- await uptimeService . navigation . goToCertificates ( ) ;
31- } ) ;
34+ describe ( 'with certs ', function ( ) {
35+ before ( async ( ) => {
36+ await makeCheck ( { es , tls : true } ) ;
37+ await uptime . goToRoot ( true ) ;
38+ } ) ;
3239
33- describe ( 'page' , ( ) => {
3440 beforeEach ( async ( ) => {
35- await uptimeService . navigation . goToCertificates ( ) ;
36- await uptimeService . navigation . refreshApp ( ) ;
41+ await makeCheck ( { es, tls : true } ) ;
3742 } ) ;
3843
39- it ( 'displays certificates' , async ( ) => {
40- await uptimeService . cert . hasCertificates ( ) ;
44+ it ( 'can navigate to cert page' , async ( ) => {
45+ await uptimeService . common . waitUntilDataIsLoaded ( ) ;
46+ await uptimeService . cert . hasViewCertButton ( ) ;
47+ await uptimeService . navigation . goToCertificates ( ) ;
4148 } ) ;
4249
43- it ( 'displays specific certificates' , async ( ) => {
44- const certId = getSha256 ( ) ;
45- const { monitorId } = await makeCheck ( {
46- es,
47- tls : {
48- sha256 : certId ,
49- } ,
50+ describe ( 'page' , ( ) => {
51+ beforeEach ( async ( ) => {
52+ await uptimeService . navigation . goToCertificates ( ) ;
53+ await uptimeService . navigation . refreshApp ( ) ;
5054 } ) ;
5155
52- await uptimeService . navigation . refreshApp ( ) ;
53- await uptimeService . cert . certificateExists ( { certId, monitorId } ) ;
54- } ) ;
56+ it ( 'displays certificates' , async ( ) => {
57+ await uptimeService . cert . hasCertificates ( ) ;
58+ } ) ;
59+
60+ it ( 'displays specific certificates' , async ( ) => {
61+ const certId = getSha256 ( ) ;
62+ const { monitorId } = await makeCheck ( {
63+ es,
64+ tls : {
65+ sha256 : certId ,
66+ } ,
67+ } ) ;
68+
69+ await uptimeService . navigation . refreshApp ( ) ;
70+ await uptimeService . cert . certificateExists ( { certId, monitorId } ) ;
71+ } ) ;
5572
56- it ( 'performs search against monitor id' , async ( ) => {
57- const certId = getSha256 ( ) ;
58- const { monitorId } = await makeCheck ( {
59- es,
60- monitorId : 'cert-test-check-id' ,
61- fields : {
62- monitor : {
63- name : 'Cert Test Check' ,
73+ it ( 'performs search against monitor id' , async ( ) => {
74+ const certId = getSha256 ( ) ;
75+ const { monitorId } = await makeCheck ( {
76+ es,
77+ monitorId : 'cert-test-check-id' ,
78+ fields : {
79+ monitor : {
80+ name : 'Cert Test Check' ,
81+ } ,
82+ url : {
83+ full : 'https://site-to-check.com/' ,
84+ } ,
6485 } ,
65- url : {
66- full : 'https://site-to-check.com/' ,
86+ tls : {
87+ sha256 : certId ,
6788 } ,
68- } ,
69- tls : {
70- sha256 : certId ,
71- } ,
89+ } ) ;
90+ await uptimeService . navigation . refreshApp ( ) ;
91+ await uptimeService . cert . searchIsWorking ( monitorId ) ;
7292 } ) ;
73- await uptimeService . navigation . refreshApp ( ) ;
74- await uptimeService . cert . searchIsWorking ( monitorId ) ;
7593 } ) ;
7694 } ) ;
7795 } ) ;
0 commit comments