Skip to content

Commit

Permalink
test: Stablize e2e tests (#732)
Browse files Browse the repository at this point in the history
(cherry picked from commit d4e9edb)
  • Loading branch information
baurine authored and breezewish committed Sep 8, 2020
1 parent 4b57ab6 commit 3a4cd15
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Load tiup cache
- name: Load TiUP cache
uses: actions/cache@v1
with:
path: ~/.tiup/components
Expand All @@ -46,7 +46,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
source /home/runner/.profile
tiup update --nightly --all
tiup update --nightly
tiup playground nightly --tiflash=0 &
- name: Build UI
run: |
Expand All @@ -55,6 +55,20 @@ jobs:
NO_MINIMIZE: true
CI: true
REACT_APP_MIXPANEL_TOKEN: ""
- name: Debug TiUP
run: |
source /home/runner/.profile
tiup --version
ls /home/runner/.tiup/components/playground/
DATA_PATH=$(ls /home/runner/.tiup/data/)
echo $DATA_PATH
tiup playground display
echo "==== TiDB Log ===="
head -n 3 /home/runner/.tiup/data/$DATA_PATH/tidb-0/tidb.log
echo "==== TiKV Log ===="
head -n 3 /home/runner/.tiup/data/$DATA_PATH/tikv-0/tikv.log
echo "==== PD Log ===="
head -n 3 /home/runner/.tiup/data/$DATA_PATH/pd-0/pd.log
- name: Build and run backend in the background
run: |
make
Expand Down
7 changes: 5 additions & 2 deletions ui/tests/e2e/search_log.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ describe('Search Logs', () => {
await ppExpect(searchForm).toClick(
'button[data-e2e="timerange-selector"]'
)
const secondsOf4weeks = 28 * 24 * 60 * 60
const secondsOf1Hour = 60 * 60
await ppExpect(page).toClick(
`div[data-e2e="common-timeranges"] div[data-e2e="timerange-${secondsOf4weeks}"]`
`div[data-e2e="common-timeranges"] div[data-e2e="timerange-${secondsOf1Hour}"]`
)
// to hide dropdown
await ppExpect(searchForm).toClick(
Expand All @@ -65,6 +65,9 @@ describe('Search Logs', () => {
// to hide dropdown
await ppExpect(searchForm).toClick('div#instances')

// input keyword
await ppExpect(page).toFill('input#keywords', 'welcome')

// start search
await ppExpect(searchForm).toClick('button#search_btn')

Expand Down

0 comments on commit 3a4cd15

Please sign in to comment.