From f02b3258db8ad77adaa44d5a7bfa7293c7ae4d20 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Wed, 25 Apr 2018 14:28:18 -0500 Subject: [PATCH] Update Harbor UI test (#1633) (#1636) --- .../Project-Repositories-Page-Util.robot | 14 +++++++++++++- tests/test-cases/Group4-Harbor/4-01-Harbor.robot | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/resources/page-objects/Project-Repositories-Page-Util.robot b/tests/resources/page-objects/Project-Repositories-Page-Util.robot index f2db0830bd..96329b333a 100644 --- a/tests/resources/page-objects/Project-Repositories-Page-Util.robot +++ b/tests/resources/page-objects/Project-Repositories-Page-Util.robot @@ -19,6 +19,8 @@ Documentation This resource contains any keywords dealing with Project Reposito # css locators ${pr-title} css=.content-area .title ${pr-repositories-table-row} css=div.datagrid-body .datagrid-row +${pr-repositories-card-item} css=div.grid-content .card-item +${pr-repositories-card-title} css=.card-media-title *** Keywords *** Verify Project Repositories Page @@ -32,4 +34,14 @@ Verify Row Value In Project Repositories Table \ ${row-text}= Get Text ${element} \ ${status}= Run Keyword And Return Status Should Contain ${row-text} ${expected} \ Exit For Loop If ${status} == True - [Return] ${row-text} \ No newline at end of file + [Return] ${row-text} + +Verify Row Value In Project Repositories Grid + [Arguments] ${expected} + ${visible}= Run Keyword And Return Status Element Should Be Visible ${pr-repositories-card-item} + @{card-title-elements}= Run Keyword If ${visible} == True Get Webelements ${pr-repositories-card-title} + :FOR ${element} IN @{card-title-elements} + \ ${card-title}= Get Text ${element} + \ ${status}= Run Keyword And Return Status Should Contain ${title} ${expected} + \ Exit For Loop If ${status} == True + [Return] ${card-title} \ No newline at end of file diff --git a/tests/test-cases/Group4-Harbor/4-01-Harbor.robot b/tests/test-cases/Group4-Harbor/4-01-Harbor.robot index 848d3e6c26..32e24c5b73 100644 --- a/tests/test-cases/Group4-Harbor/4-01-Harbor.robot +++ b/tests/test-cases/Group4-Harbor/4-01-Harbor.robot @@ -62,7 +62,7 @@ Push an image to harbor and create a container Push Docker Image To Harbor Registry %{OVA_IP} ${harbor-image-tagged} Navigate To VIC UI Home Page Navigate To Project Repositories Page - Wait Until Keyword Succeeds 3x 2s Verify Row Value In Project Repositories Table ${harbor-image-name} + Wait Until Keyword Succeeds 3x 2s Verify Row Value In Project Repositories Grid ${harbor-image-name} # create container from harbor image Download VIC Engine If Not Already Download CA Cert %{OVA_IP}