From 627c73a84a4ca57b0865037e965fb0bb6748edf7 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Thu, 17 Sep 2020 11:08:47 -0500 Subject: [PATCH] Change compared page object to match by name (#8915) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I believe this test became flaky after #8833, you can see an example failure here: https://app.circleci.com/pipelines/github/hashicorp/nomad/11809/workflows/0dc3c8f4-187c-44af-8bdb-6f010d653081/jobs/100848 The goal here is not to assert that the first task group in the server database matches the first row displayed, but before #8833 it could be assumed that they did match. This changes to find the row corresponding to the first server task group instead of assuming it’ll be first. --- ui/tests/acceptance/job-deployments-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/tests/acceptance/job-deployments-test.js b/ui/tests/acceptance/job-deployments-test.js index e501eaff016..c4fb897ede9 100644 --- a/ui/tests/acceptance/job-deployments-test.js +++ b/ui/tests/acceptance/job-deployments-test.js @@ -178,7 +178,7 @@ module('Acceptance | job deployments', function(hooks) { ); const taskGroup = taskGroupSummaries[0]; - const taskGroupRow = deploymentRow.taskGroups.objectAt(0); + const taskGroupRow = deploymentRow.taskGroups.findOneBy('name', taskGroup.name); assert.equal(taskGroupRow.name, taskGroup.name, 'Name'); assert.equal(taskGroupRow.promotion, promotionTestForTaskGroup(taskGroup), 'Needs Promotion');