@@ -29,10 +29,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
2929 await pageObjects . svlCommonPage . loginAsViewer ( ) ;
3030 } ) ;
3131
32- beforeEach ( async ( ) => {
33- await browser . execute ( ( ) => window . localStorage . clear ( ) ) ;
34- } ) ;
35-
3632 describe ( 'Getting Started redirect flow' , function ( ) {
3733 it ( 'redirects to Getting Started on first load' , async ( ) => {
3834 await pageObjects . common . navigateToApp ( 'searchHomepage' , {
@@ -62,6 +58,71 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
6258 } ) ;
6359 } ) ;
6460
61+ describe ( 'Getting Started page interactions' , function ( ) {
62+ beforeEach ( async ( ) => {
63+ await pageObjects . common . navigateToApp ( 'searchGettingStarted' ) ;
64+ } ) ;
65+
66+ describe ( 'Add data button' , function ( ) {
67+ it ( 'navigates to the sample data page when option is selected' , async ( ) => {
68+ await pageObjects . searchGettingStarted . selectAddDataOption (
69+ 'gettingStartedSampleDataMenuItem'
70+ ) ;
71+ await retry . tryWithRetries (
72+ 'wait for URL to change' ,
73+ async ( ) => {
74+ expect ( await browser . getCurrentUrl ( ) ) . to . contain ( '/tutorial_directory/sampleData' ) ;
75+ } ,
76+ { initialDelay : 200 , retryCount : 5 , retryDelay : 500 }
77+ ) ;
78+ } ) ;
79+ } ) ;
80+
81+ describe ( 'Elasticsearch endpoint and API Keys' , function ( ) {
82+ it ( 'renders endpoint field and copy button' , async ( ) => {
83+ await testSubjects . existOrFail ( 'endpointValueField' ) ;
84+ await testSubjects . existOrFail ( 'copyEndpointButton' ) ;
85+ const endpointValue = await testSubjects . getVisibleText ( 'endpointValueField' ) ;
86+ expect ( endpointValue ) . to . contain ( 'https://' ) ;
87+ await testSubjects . existOrFail ( 'apiKeyFormNoUserPrivileges' ) ;
88+ } ) ;
89+ } ) ;
90+
91+ describe ( 'View connection details' , function ( ) {
92+ it ( 'renders the view connection details button' , async ( ) => {
93+ await testSubjects . existOrFail ( 'viewConnectionDetailsLink' ) ;
94+ } ) ;
95+ it ( 'opens the connection flyout when the button is clicked' , async ( ) => {
96+ await testSubjects . click ( 'viewConnectionDetailsLink' ) ;
97+ await testSubjects . existOrFail ( 'connectionDetailsModalTitle' ) ;
98+ } ) ;
99+ } ) ;
100+
101+ describe ( 'Connect to your application' , function ( ) {
102+ it ( 'renders the JavaScript code example when selected in Language Selector' , async ( ) => {
103+ await pageObjects . searchGettingStarted . selectCodingLanguage ( 'javascript' ) ;
104+ await pageObjects . searchGettingStarted . expectCodeSampleContainsValue (
105+ 'import { Client } from'
106+ ) ;
107+ } ) ;
108+ } ) ;
109+
110+ describe ( 'Footer content' , function ( ) {
111+ it ( 'renders Search Labs callout and navigates correctly' , async ( ) => {
112+ await pageObjects . searchGettingStarted . expectFooterCallout (
113+ 'gettingStartedSearchLabs' ,
114+ 'search-labs'
115+ ) ;
116+ } ) ;
117+ } ) ;
118+ } ) ;
119+ } ) ;
120+
121+ describe ( 'as developer' , function ( ) {
122+ before ( async ( ) => {
123+ await pageObjects . svlCommonPage . loginAsDeveloper ( ) ;
124+ } ) ;
125+
65126 describe ( 'Getting Started page interactions' , function ( ) {
66127 beforeEach ( async ( ) => {
67128 await pageObjects . common . navigateToApp ( 'searchGettingStarted' ) ;
@@ -114,16 +175,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
114175 } ) ;
115176 } ) ;
116177
117- describe ( 'Elasticsearch endpoint and API Keys' , function ( ) {
118- it ( 'renders endpoint field and copy button' , async ( ) => {
119- await testSubjects . existOrFail ( 'endpointValueField' ) ;
120- await testSubjects . existOrFail ( 'copyEndpointButton' ) ;
121- const endpointValue = await testSubjects . getVisibleText ( 'endpointValueField' ) ;
122- expect ( endpointValue ) . to . contain ( 'https://' ) ;
123- await testSubjects . existOrFail ( 'apiKeyFormNoUserPrivileges' ) ;
124- } ) ;
125- } ) ;
126-
127178 describe ( 'View connection details' , function ( ) {
128179 it ( 'renders the view connection details button' , async ( ) => {
129180 await testSubjects . existOrFail ( 'viewConnectionDetailsLink' ) ;
@@ -135,18 +186,35 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
135186 } ) ;
136187
137188 describe ( 'Explore the API' , function ( ) {
138- it ( 'clicking on search basics tutorial opens console ' , async ( ) => {
139- await pageObjects . searchGettingStarted . expectConsoleTutorial (
140- 'consoleTutorialsSearchBasics'
141- ) ;
189+ it ( 'opens the console when you click the search basics tutorial card ' , async ( ) => {
190+ await testSubjects . existOrFail ( 'console_tutorials_search_basics' ) ;
191+ await testSubjects . click ( 'console_tutorials_search_basics' ) ;
192+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
142193 } ) ;
143- it ( 'clicking on semantic search tutorial open console' , async ( ) => {
144- await pageObjects . searchGettingStarted . expectConsoleTutorial (
145- 'consoleTutorialsSemanticSearch'
146- ) ;
194+ it ( 'opens the console when you click the search basics tutorial button' , async ( ) => {
195+ await testSubjects . existOrFail ( 'console_tutorials_search_basics-btn' ) ;
196+ await testSubjects . click ( 'console_tutorials_search_basics' ) ;
197+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
198+ } ) ;
199+ it ( 'opens the console when you click the semantic search tutorial card' , async ( ) => {
200+ await testSubjects . existOrFail ( 'console_tutorials_semantic_search' ) ;
201+ await testSubjects . click ( 'console_tutorials_semantic_search' ) ;
202+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
203+ } ) ;
204+ it ( 'opens the console when you click the semantic search tutorial button' , async ( ) => {
205+ await testSubjects . existOrFail ( 'console_tutorials_semantic_search-btn' ) ;
206+ await testSubjects . click ( 'console_tutorials_semantic_search-btn' ) ;
207+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
208+ } ) ;
209+ it ( 'opens the console when you click the esql tutorial card' , async ( ) => {
210+ await testSubjects . existOrFail ( 'console_tutorials_esql' ) ;
211+ await testSubjects . click ( 'console_tutorials_esql' ) ;
212+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
147213 } ) ;
148- it ( 'clicking on esql tutorial open console' , async ( ) => {
149- await pageObjects . searchGettingStarted . expectConsoleTutorial ( 'consoleTutorialsEsql' ) ;
214+ it ( 'opens the console when you click the esql tutorial button' , async ( ) => {
215+ await testSubjects . existOrFail ( 'console_tutorials_esql-btn' ) ;
216+ await testSubjects . click ( 'console_tutorials_esql-btn' ) ;
217+ await pageObjects . embeddedConsole . expectEmbeddedConsoleToBeOpen ( ) ;
150218 } ) ;
151219 } ) ;
152220
0 commit comments