@@ -5,7 +5,10 @@ test('deploy upgrade', async ({ page }) => {
5
5
test . setTimeout ( 15 * 60 * 1000 ) ; // 15 minutes
6
6
await login ( page ) ;
7
7
await page . getByRole ( 'link' , { name : 'Version history' , exact : true } ) . click ( ) ;
8
- await page . locator ( '.available-update-row' , { hasText : process . env . APP_UPGRADE_VERSION } ) . getByRole ( 'button' , { name : 'Deploy' , exact : true } ) . click ( ) ;
8
+ // TODO NOW: uncomment this
9
+ // await page.locator('.available-update-row', { hasText: process.env.APP_UPGRADE_VERSION }).getByRole('button', { name: 'Deploy', exact: true }).click();
10
+ // TODO NOW: remove this line
11
+ await page . getByText ( process . env . APP_UPGRADE_VERSION , { exact : true } ) . locator ( '../../..' ) . getByRole ( 'button' , { name : 'Deploy' , exact : true } ) . click ( ) ;
9
12
const iframe = page . frameLocator ( '#upgrade-service-iframe' ) ;
10
13
await expect ( iframe . locator ( 'h3' ) ) . toContainText ( 'The First Config Group' , { timeout : 20 * 1000 } ) ;
11
14
await expect ( iframe . locator ( 'input[type="text"]' ) ) . toHaveValue ( 'initial-hostname.com' ) ;
@@ -23,11 +26,13 @@ test('deploy upgrade', async ({ page }) => {
23
26
await expect ( iframe . locator ( '#app' ) ) . toContainText ( 'All preflight checks passed' ) ;
24
27
await expect ( iframe . getByRole ( 'button' , { name : 'Back: Preflight checks' } ) ) . toBeVisible ( ) ;
25
28
await iframe . getByRole ( 'button' , { name : 'Deploy' , exact : true } ) . click ( ) ;
26
- await expect ( page . locator ( '.Modal-body' ) ) . toContainText ( 'Cluster update in progress' ) ;
27
- await expect ( page . locator ( '.Modal-body' ) . getByText ( 'Cluster update in progress' ) ) . not . toBeVisible ( { timeout : 10 * 60 * 1000 } ) ;
28
- // wait for the page to refresh after cluster update
29
- await page . waitForTimeout ( 5000 ) ;
30
- await expect ( page . locator ( '.available-update-row' , { hasText : process . env . APP_UPGRADE_VERSION } ) ) . not . toBeVisible ( ) ;
29
+
30
+ if ( process . env . SKIP_CLUSTER_UPGRADE_CHECK !== 'true' ) {
31
+ await expect ( page . locator ( '.Modal-body' ) ) . toContainText ( 'Cluster update in progress' ) ;
32
+ await expect ( page . locator ( '.Modal-body' ) . getByText ( 'Cluster update in progress' ) ) . not . toBeVisible ( { timeout : 10 * 60 * 1000 } ) ;
33
+ }
34
+
35
+ await expect ( page . locator ( '.available-update-row' , { hasText : process . env . APP_UPGRADE_VERSION } ) ) . not . toBeVisible ( { timeout : 10 * 1000 } ) ;
31
36
await expect ( page . locator ( '.VersionHistoryRow' , { hasText : process . env . APP_UPGRADE_VERSION } ) ) . toContainText ( 'Currently deployed version' , { timeout : 30 * 1000 } ) ;
32
37
await page . getByRole ( 'link' , { name : 'Dashboard' , exact : true } ) . click ( ) ;
33
38
await expect ( page . locator ( '.VersionCard-content--wrapper' ) ) . toContainText ( process . env . APP_UPGRADE_VERSION ) ;
0 commit comments