### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

Refactor matplotlib tests. ### Description

Close #2226

Refactors matplotlib tests:

- Prevent dangling selenium webdriver after test
- For asynchronous tests, use promise-await instead of selenium WebDriverWait
- Enable xfailed tests

<!--
- [ ] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation
!-->

package:
  name: glpk
  version: "5.0"

source:
  sha256: 4a1013eebb50f728fc601bdd833b0b2870333c3b3e5a816eeba921d95bec6f15
  url: https://ftp.gnu.org/gnu/glpk/glpk-5.0.tar.gz

build:
  library: true
  script: |
    CFLAGS="-fPIC" emconfigure ./configure  --prefix=$PWD
    emmake make -j ${PYODIDE_JOBS:-3}

package:
  name: glpk
  version: "5.0"

source:
  sha256: 4a1013eebb50f728fc601bdd833b0b2870333c3b3e5a816eeba921d95bec6f15
  url: https://ftp.gnu.org/gnu/glpk/glpk-5.0.tar.gz

build:
  library: true
  script: |
    CFLAGS="-fPIC" emconfigure ./configure  --prefix=$PWD
    emmake make -j ${PYODIDE_JOBS:-3}
