Skip to content

Commit 143877e

Browse files
authored
test: Use Playwright + agenda start/end dates fix (ietf-tools#4471)
* test: agenda-neue - separate timezone controls assertions to allow retries * test: agenda-neue - use dom query selectors instead of first() / eq() * test: agenda-neue - playwright * test: fix playwright setup for ci * test: playwright - remove safari + fix timezone local * test: upload playwright report * test: playwright - fix trace upload * test * test: playwright - agenda search * test: fix startdate timezone * test: playwright - agenda table events * test: playwright - remove only filter * test: remove exit early flag * test: allow longer tests * test: agenda materials dialog * test: agenda filter by area/group * test: agenda calendar view * test: agenda settings * test: jump to day * test: fix agenda jump to day timezone parse * test: increase test timeout * test: remove fail fast * test: test sharding + increase delay * test: fixes * test: use macos image * test: fixes * test: agenda color assign + future + live meeting tests * test: agenda mobile tests * test: remainder of tests for playwright + optimizations * test: red line intersection accept close value * test: add delay for agenda search tests * chore: cleanup old tests + adapt build workflow * ci: fix build workflow * ci: fix build workflow order * fix: point to playwright floor plan images + readme
1 parent 5c8545e commit 143877e

39 files changed

Lines changed: 6065 additions & 23508 deletions

.github/workflows/build.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -171,42 +171,46 @@ jobs:
171171
name: coverage
172172
path: coverage.json
173173

174-
tests-cypress-modern:
175-
name: Run Tests (Cypress - Modern)
174+
tests-playwright:
175+
name: Run Tests (Playwright)
176176
if: ${{ github.event.inputs.skiptests == 'false' }}
177177
needs: [prepare]
178178
runs-on: macos-latest
179+
strategy:
180+
fail-fast: false
181+
matrix:
182+
project: [chromium, firefox]
179183

180184
steps:
181185
- uses: actions/checkout@v3
182186

187+
- uses: actions/setup-node@v2
188+
with:
189+
node-version: '18'
190+
183191
- name: Run all tests
184192
run: |
185193
echo "Installing dependencies..."
186194
yarn
187-
echo "Start Vite Preview..."
188-
yarn preview &>/dev/null &
195+
echo "Installing Playwright..."
196+
cd playwright
197+
mkdir test-results
198+
npm ci
199+
npx playwright install --with-deps ${{ matrix.project }}
189200
echo "Running tests..."
190-
yarn cypress
191-
192-
- name: Upload Video Recordings
193-
uses: actions/upload-artifact@v3.0.0
194-
if: ${{ always() }}
195-
continue-on-error: true
196-
with:
197-
name: videos-modern
198-
path: cypress/videos/
201+
npx playwright test --project=${{ matrix.project }}
199202
200-
- name: Upload Screenshots
203+
- name: Upload Report
201204
uses: actions/upload-artifact@v3.0.0
202205
if: ${{ always() }}
203206
continue-on-error: true
204207
with:
205-
name: screenshots-modern
206-
path: cypress/screenshots/
208+
name: playwright-results-${{ matrix.project }}
209+
path: playwright/test-results/
210+
if-no-files-found: ignore
207211

208-
tests-cypress-legacy:
209-
name: Run Tests (Cypress - Legacy)
212+
tests-cypress:
213+
name: Run Tests (Cypress)
210214
if: ${{ github.event.inputs.skiptests == 'false' }}
211215
needs: [prepare]
212216
runs-on: ubuntu-latest
@@ -256,6 +260,7 @@ jobs:
256260
with:
257261
name: videos-legacy
258262
path: cypress/videos/
263+
if-no-files-found: ignore
259264

260265
- name: Upload Screenshots
261266
uses: actions/upload-artifact@v3.0.0
@@ -264,14 +269,15 @@ jobs:
264269
with:
265270
name: screenshots-modern
266271
path: cypress/screenshots/
272+
if-no-files-found: ignore
267273

268274
# -----------------------------------------------------------------
269275
# RELEASE
270276
# -----------------------------------------------------------------
271277
release:
272278
name: Make Release
273279
if: ${{ always() }}
274-
needs: [tests-python, tests-cypress-modern, tests-cypress-legacy, prepare]
280+
needs: [tests-python, tests-playwright, tests-cypress, prepare]
275281
runs-on: ubuntu-latest
276282
env:
277283
SHOULD_DEPLOY: ${{needs.prepare.outputs.should_deploy}}

.pnp.cjs

Lines changed: 42 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
2.52 KB
Binary file not shown.
95.4 KB
Binary file not shown.
10.1 KB
Binary file not shown.
59.1 KB
Binary file not shown.
60.3 KB
Binary file not shown.

client/App.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ const agendaStore = useAgendaStore()
2424
2525
const appContainer = ref(null)
2626
27-
// INIT
28-
29-
agendaStore.fetch()
30-
3127
// --------------------------------------------------------------------
3228
// Handle browser resize
3329
// --------------------------------------------------------------------

client/agenda/Agenda.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ const titleExtra = computed(() => {
227227
return title
228228
})
229229
const meetingDate = computed(() => {
230-
const start = DateTime.fromISO(agendaStore.meeting.startDate).setZone(agendaStore.timezone)
231-
const end = DateTime.fromISO(agendaStore.meeting.endDate).setZone(agendaStore.timezone)
230+
const start = DateTime.fromISO(agendaStore.meeting.startDate, { zone: agendaStore.meeting.timezone }).setZone(agendaStore.timezone)
231+
const end = DateTime.fromISO(agendaStore.meeting.endDate, { zone: agendaStore.meeting.timezone }).setZone(agendaStore.timezone)
232232
if (start.month === end.month) {
233233
return `${start.toFormat('MMMM d')} - ${end.toFormat('d, y')}`
234234
} else {
@@ -353,6 +353,8 @@ onBeforeUnmount(() => {
353353
// MOUNTED
354354
355355
onMounted(() => {
356+
agendaStore.fetch(route.params.meetingNumber)
357+
356358
handleCurrentMeetingRedirect()
357359
358360
// -> Hide Loading Screen

client/agenda/AgendaSettings.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
3131
n-divider(title-placement='left')
3232
i.bi.bi-globe.me-2
3333
small Timezone
34-
n-button-group.mt-2(style='justify-content: stretch; width: 100%;')
34+
n-button-group.mt-2#agenda-settings-tz-btn(style='justify-content: stretch; width: 100%;')
3535
n-button(
3636
style='flex-grow: 1;'
3737
:type='agendaStore.isTimezoneMeeting ? `primary` : `default`'
@@ -47,7 +47,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
4747
:type='agendaStore.timezone === `UTC` ? `primary` : `default`'
4848
@click='setTimezone(`UTC`)'
4949
) UTC
50-
n-select.mt-2(
50+
n-select.mt-2#agenda-settings-tz-ddn(
5151
v-model:value='agendaStore.timezone'
5252
:options='timezones'
5353
placeholder='Select Time Zone'
@@ -61,7 +61,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
6161
//- .d-flex.align-items-center.mt-3
6262
//- n-switch.me-3(v-model:value='agendaStore.listDayCollapse', disabled)
6363
//- span.small Collapse Days by Default
64-
.d-flex.align-items-center.mt-3
64+
#agenda-settings-tgl-colorlgd.d-flex.align-items-center.mt-3
6565
n-switch.me-3(
6666
v-model:value='agendaStore.colorLegendShown'
6767
aria-label='Display Color Legend'
@@ -71,7 +71,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
7171
template(#trigger)
7272
i.bi.bi-info-circle
7373
span Only displayed when a color is assigned to at least 1 event.
74-
.d-flex.align-items-center.mt-3
74+
#agenda-settings-tgl-infonote.d-flex.align-items-center.mt-3
7575
n-switch.me-3(
7676
v-model:value='agendaStore.infoNoteShown'
7777
aria-label='Display Current Meeting Info Note'
@@ -81,19 +81,19 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
8181
template(#trigger)
8282
i.bi.bi-info-circle
8383
span Any update to the note will result in this setting being turned back on.
84-
.d-flex.align-items-center.mt-3
84+
#agenda-settings-tgl-eventicons.d-flex.align-items-center.mt-3
8585
n-switch.me-3(
8686
v-model:value='agendaStore.eventIconsShown'
8787
aria-label='Display Event Icons'
8888
)
8989
span.small Display Event Icons
90-
.d-flex.align-items-center.mt-3
90+
#agenda-settings-tgl-floorind.d-flex.align-items-center.mt-3
9191
n-switch.me-3(
9292
v-model:value='agendaStore.floorIndicatorsShown'
9393
aria-label='Display Floor Indicators'
9494
)
9595
span.small Display Floor Indicators
96-
.d-flex.align-items-center.mt-3
96+
#agenda-settings-tgl-groupind.d-flex.align-items-center.mt-3
9797
n-switch.me-3(
9898
v-model:value='agendaStore.areaIndicatorsShown'
9999
aria-label='Display Group Area Indicators'
@@ -103,7 +103,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
103103
template(#trigger)
104104
i.bi.bi-info-circle
105105
span Will not be shown on smaller screens, regardless of this setting.
106-
.d-flex.align-items-center.mt-3
106+
#agenda-settings-tgl-redline.d-flex.align-items-center.mt-3
107107
n-switch.me-3(
108108
v-model:value='agendaStore.redhandShown'
109109
aria-label='Display Realtime Red Line'
@@ -113,7 +113,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
113113
template(#trigger)
114114
i.bi.bi-info-circle
115115
span Only shown during live events. Updated every 5 seconds.
116-
.d-flex.align-items-center.mt-3
116+
#agenda-settings-tgl-boldertxt.d-flex.align-items-center.mt-3
117117
n-switch.me-3(
118118
v-model:value='agendaStore.bolderText'
119119
aria-label='Use Bolder Text'
@@ -140,7 +140,7 @@ n-drawer(v-model:show='isShown', placement='right', :width='panelWidth')
140140
n-divider#agenda-settings-colors-header(title-placement='left')
141141
i.bi.bi-palette.me-2
142142
small Custom Colors / Tags
143-
.d-flex.align-items-center.mt-3(v-for='(cl, idx) of state.colors')
143+
.agenda-settings-colors-row.d-flex.align-items-center.mt-3(v-for='(cl, idx) of state.colors')
144144
n-color-picker.me-3(
145145
:modes='[`hex`]'
146146
:render-label='() => {}'

0 commit comments

Comments
 (0)