mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	(core) Fix deployment tests.
Summary: - Skip welcome questions in HomeIntro - Make Funnel test less flaky, and increase its timeout Test Plan: Both tests pass staging_deployment when run locally Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3218
This commit is contained in:
		
							parent
							
								
									215bb90e68
								
							
						
					
					
						commit
						9c57b565b2
					
				@ -66,7 +66,7 @@ describe('HomeIntro', function() {
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      // Open doc-menu
 | 
			
		||||
      await session.loadDocMenu('/');
 | 
			
		||||
      await session.loadDocMenu('/', 'skipWelcomeQuestions');
 | 
			
		||||
 | 
			
		||||
      // Check message specific to logged-in user
 | 
			
		||||
      assert.match(await driver.find('.test-welcome-title').getText(), new RegExp(`Welcome.* ${session.name}`));
 | 
			
		||||
@ -91,7 +91,7 @@ describe('HomeIntro', function() {
 | 
			
		||||
      await session.resetSite();
 | 
			
		||||
 | 
			
		||||
      // Open doc-menu
 | 
			
		||||
      await session.loadDocMenu('/');
 | 
			
		||||
      await session.loadDocMenu('/', 'skipWelcomeQuestions');
 | 
			
		||||
 | 
			
		||||
      // Check message specific to logged-in user
 | 
			
		||||
      assert.match(await driver.find('.test-welcome-title').getText(), new RegExp(`Welcome.* ${session.name}`));
 | 
			
		||||
 | 
			
		||||
@ -1364,9 +1364,20 @@ export class Session {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // Load a DocMenu on a site.
 | 
			
		||||
  public async loadDocMenu(relPath: string, wait: boolean = true) {
 | 
			
		||||
  // If loading for a potentially first-time user, you may give 'skipWelcomeQuestions' for second
 | 
			
		||||
  // argument to dismiss the popup with welcome questions, if it gets shown.
 | 
			
		||||
  public async loadDocMenu(relPath: string, wait: boolean|'skipWelcomeQuestions' = true) {
 | 
			
		||||
    await this.loadRelPath(relPath);
 | 
			
		||||
    if (wait) { await waitForDocMenuToLoad(); }
 | 
			
		||||
 | 
			
		||||
    if (wait === 'skipWelcomeQuestions') {
 | 
			
		||||
      // When waitForDocMenuToLoad() returns, welcome questions should also render, so that we
 | 
			
		||||
      // don't need to wait extra for them.
 | 
			
		||||
      if (await driver.find('.test-welcome-questions').isPresent()) {
 | 
			
		||||
        await driver.sendKeys(Key.ESCAPE);
 | 
			
		||||
        assert.equal(await driver.find('.test-welcome-questions').isPresent(), false);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public async loadRelPath(relPath: string) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user